CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > Gecko Drives


Gecko Drives Discuss all Gecko drives here and get direct support!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-23-2008, 08:07 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road
Step Pulse Sniffer

This thread has to do with work on a tester that can check the integrity of your parallel port, your PC capability and how you have it configured to generate STEP and DIRECTION pulses from your CNC program. A lot of things can go wrong if what gets put out from your parallel port isn't right. This tester should catch most problems including very occasional glitches.

The design schematic, CPLD code and printed circuit board files will be open source (public domain). I do not expect or want any compensation ($$$) for this work. It is meant to be helpful as a diagnostic to people that have problems or concerns with their parallel port. This circuit will either clear it as being OK or give indications where it is not performing correctly.
--------------------------------------------------------

Here's the first cut on the Step Pulse Sniffer schematic. Circuit description:

1) U1, U2 makes a window comparator for the input STEP_IN. STEP_IN gets scaled-down to 0V / 2.5V to keep the input within the LM339 input common mode range. The lower threshold is set to 0.5V and the upper threshold is set to 4.5V (relative to STEP_IN levels). STP_L goes low if lower threshold isn't met, STP_H goes hi if upper threshold isn't met. PULSE LOGIC LEVEL lights the red LED if either threshold is not met.

2) Q2, Q3 and U5 creates a constant amplitude ramp wave (0 to 2.5V) whose frequency is equal to the STEP_IN frequency. Q2 is a current source controlled by U5 which charges the 10nF cap. Q3 dumps the cap at the STEP_IN rate (200nS DUMP time). U5 is a integrator that servos Q2 to maintain an average 1.25V on the 10nF cap. The integrator response time is tailored to be too slow to respond to pulse period variations but fast enough to servo the ramp amplitude during accel/decel. A STEP_IN pulse that has a period 10% longer than the previous on will have a ramp amplitude 10% higher, (2.75V). 10% less and the ramp amplitude will be 10% lower (2.25V).

U3 and U4 makes another window comparator to detect if the ramp amplitude exceeds a 2.5V +/-10% limit. P_LONG and P_SHORT inputs to the CPLD. It lights the JITTER red LED if the period to period variations exceed that threshold limit.

This technique falls apart below 30 RPM so Q1 detects a low-speed threshold and causes the CPLD to ignore phase jitter via the SPD_L input.

3) Minimum STEP_IN pulse width is measured by the CPLD. Each STEP_IN pulse starts a 2uS timer. If the STEP_IN is not true when this timer times out, the P_WIDTH output turns on the PULSE WIDTH red LED.

4) The CPLD tests for the presence or absence of STEP_IN pulses. If no pulses are sent for 1 second, it lights the PULSE PRESET red LED.

5) Fault events on the PULSE LOGIC LEVEL, PULSE PHASE JITTER and PULSE WIDTH may be of such short duration that your eye may not catch them. That is why the red LEDs will stay lit for a minimum of 1 second in the event of a transient fault event. Alternately, they can be set to stay on forever until reset. This is useful should a problem occur someplace in the middle of an hours-long CNC application.

6) The CPLD Verilog code is yet to be written. I don't see any obstacles there; the logic required is pretty simple. The limits above are tailored for our 10 microstep drives but they can be changed to any other value easily. I will breadboard the design and do a double-sided board layout. The resulting gerber files, Verilog file and completed schematic will be available to anyone who wants it. This thing will run from a 5VDC supply so the board layout will have a USB connector for power. The board will also have pass-thru operation; plug it into the parallel port, plug the port cable into it, run the sniffer while you are running the motors. The sniffer is designed to with STEP_IN rates from 0Hz to 200kHz.
Attached Files
File Type: pdf PULSE SNIFFER.pdf‎ (32.1 KB, 174 views)
Reply With Quote

  #2   Ban this user!
Old 11-23-2008, 09:00 PM
P.Passuello's Avatar  
Join Date: Dec 2005
Location: New Zealand
Posts: 142
P.Passuello is on a distinguished road

It is truly a pleasure seeing you develop a project from scratch and I will follow this one with interest.
Cheers
Peter
__________________
The ingenuity of idiots is unlimited.
http://www.youtube.com/user/cncnutz
Reply With Quote

  #3  
Old 11-23-2008, 09:35 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

OK, next up will be filling that big box named "XC2C32A CPLD" with something. That something will first be a logical schematic (gates, D-Flops, etc) followed by translating the schematic into Verilog code.

For those that are interested. Xilinx (CPLD and FPGA purveyors) very often have some real deals on development boards. The last one was $29 for a 256 macrocell CPLD on a very nicely worked-out development board hardware, a USB power and JTAG programming cable and their ISE development software DVD. Very easy to use, very inexpensive.

Secondarily, I have always wanted a good surface-mount CPLD engineering breadboard specifically targeted for motion control. Since none was available (what a shock!) , I designed my own. It accepts 2 CPLDs (XC2C32A and XC2C64A), has a JTAG header, CLK oscillators, has an onboard 2 to 8-bit DAC, 4 trimpots, 6 SOIC-8 op-amp and or comparator pads, configuration header blocks, tactile switches, 4 indicator LED circuits, 12 0603 passive pads per op-amp/comparator (144 total), 3 SOT-23 pads per op-amp/comparator (36 total), built-in 1.8V, 3.3V and 12V regulators that accept up to 100VDC in and a complete G203V dual-bridge all n-channel MOSFET power section including high-side short-circuit protection circuitry terminating to 5mm and 3.5mm terminal blocks. In short, everything you need to develop motor drives (stepper, step servo, DC-brush servo or 3-phase brushless servo). I'm debating about making this public as well; haven't decided yet.

Mariss
Reply With Quote

  #4   Ban this user!
Old 11-24-2008, 11:43 AM
 
Join Date: Mar 2003
Location: Orange County, California
Posts: 317
jemmyell is on a distinguished road
what about a software interface?

How about an event buffer on board that can be read by external software though an appropriate interface? a USB interface would be ideal, but serial may work if the amount of event data is small enough. One second of event data could be retrieved then displayed for analysis.

A Mach3 plugin would give actual real-world feedback at a high level.

-James Leonard
__________________
James Leonard - www.DragonCNC.com - www.LeonardCNCSoftware.com - www.CorelDRAWCadCam.com - www.LeonardMusicalInstruments.com
Reply With Quote

  #5  
Old 11-24-2008, 11:50 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

James,

That would be nice but what I have in mind is a 32 macrocell $1 CPLD. 32 macrocells means there are only 32 single-bit registers available. That is not nearly enough for that level of sophistication.

Mariss
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-24-2008, 01:12 PM
 
Join Date: Jan 2007
Location: usa
Age: 24
Posts: 198
Adamj12b is on a distinguished road

This sounds great. I am very interested in seeing how this turns out. I also like the idea of it reading back to mach 3, but im sure would be alot more work to do.

-Adam
__________________
www.adambrunette.com - Converting My Harbor Freight X2 And My Jet Jvm-830 Knee Mill, As well as many other projects.
Reply With Quote

  #7   Ban this user!
Old 11-24-2008, 01:56 PM
 
Join Date: Apr 2007
Location: USA
Posts: 5,913
CarveOne is on a distinguished road

If Mariss has no objections to it, there is no reason that others can't expand on his design to add this feature at a later time. For now, Mariss probably sees this as "feature creep" that he hasn't the time to implement himself. His goal now is to help us weed out computers with bad parallel port signals that costs his company too much time and expense. I see it as being a "good thing" for the whole cnc community that he is willing to do this.

If he is going to let us have the full details of his sniffer creation maybe Gecko or someone else should consider selling a parts kit for those who don't want to build from scratch. I would buy a simple ziploc bag of parts versus etching a board and acquiring all of the parts anyday.

CarveOne
__________________
CarveOne
Resistance is not futile. It is voltage divided by current (R=V/I).
Reply With Quote

  #8   Ban this user!
Old 11-24-2008, 02:46 PM
Santa Fe Al's Avatar  
Join Date: Mar 2007
Location: USA
Posts: 122
Santa Fe Al is on a distinguished road
Step Pulse Sniffer - As a product

Hi Mariss,

The more I think on this project of yours, the more I can see a major need for something like this. I am very glad that someone (you) finally had the idea to do this. Especially, with all the problems guys/gals are having with their computers and CNC machines. I guess the time for this has found its proper place in the scheme of things.

I've been checking this Zone and have come up with an astounding number of threads in reference to driver problems.

It is quite obvious, as you have already stated, that not many people think of the PC as the culprit before blaming the driver(s). After all, it is a computer and computers work as intended!!

Just as a thought, since you are building drivers - Good ones - perhaps you might consider incorporating this device in your lineup of wares to sell. Consider the number - lack of - calls you would be receiving about their driver(s) not working. I believe Marcus recently stated that he is receiving at least five calls per day. Also, the reduction of blame thrown your way every time someone has a problem with their CNC machine not operating properly.

This would be a great aid not only on initial setup, but any other time changes are made or problems develop.

This device would most certainly make their lives, and yours, easier. Perhaps you could include the Step Pulse Sniffer, for a few dollars, as an addition to driver purchases. It doesn't need to be fancy. A populated board with the necessary plug-ins would be sufficient.

I am putting this forward because I don't believe I will be able to build such a device without an extreme learning curve. SMT is way different from normal soldering. Methods and equipment are way out of my league.

Everything I am doing, relating to CNC is a learning curve. Add to that doing my own remodeling - big house - and kids and Grand kids and time just disappears for the necessary dedication to such a project.

What you and others can do in a few hours, would take someone like myself weeks. Waiting for parts to arrive, studying procedure, collecting the necessary equipment for a - perhaps - one time deal, etc. We only have Radio Shack or a 50 mile - one way - drive for a $2.00 part. Even with a list, things get forgotten or missed. Plus, a goodly portion of a day is lost going from retailer to retailer and because the wife wants to have lunch, while there. Cost would be very high for the required production to take place.

Those who already have the expertise, and many of the parts in stock to be able to build this devise, are the lucky ones. Personally, I can't go out and buy just one or two of what I need and shipping is a real cost saving killer. I believe others may be in the same boat. Oars seem to be in short supply. Already, I've had to buy three 50 drawer cabinets and numerous trays to hold my excess parts. I'm not telling what my receipts look like.

These are just my thoughts and feelings about my situation, and perhaps others' situations, and a cheaper way for me to acquire what is an outstanding idea you had (have).

Although these are my personal problems, thanks for listening to my ramblings.

Al
Reply With Quote

  #9  
Old 11-24-2008, 07:08 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

Al,

I understand your point but it would be a tough sell for an individual user from a product point of view and a problem maker for us:

1) You may only need it once or twice in your life. Many times you won't even know you need it.:-)

2) You bought it, everything comes up 'green LED'. You want to return it for a refund. What good did the money you spent do after all?

3) You may need 3 drives or 3,000 drives a year depending on you business. Either way you won't need more than one Sniffer. There is no economy in volume production possible with this item.

4) The burden of interpreting the results falls on us. An imagined support call: "I plugged in the Sniffer and it reports 'red LED' on step pulse phase jitter. What do I do with (fill in CNC program name here) to fix it? What do you mean it may be my PC? What's wrong with it? You should know; you sold it to me."

The only way I see it working out is we build some and sell them at cost as an unadvertised and unsupported product. It would be a very helpful in the right hands, a terrific headache for us otherwise.

Mariss
Reply With Quote

  #10   Ban this user!
Old 11-24-2008, 08:44 PM
Santa Fe Al's Avatar  
Join Date: Mar 2007
Location: USA
Posts: 122
Santa Fe Al is on a distinguished road

Originally Posted by Mariss Freimanis View Post
Al,

..........

The only way I see it working out is we build some and sell them at cost as an unadvertised and unsupported product. It would be a very helpful in the right hands, a terrific headache for us otherwise.

Mariss

Hi Mariss,

I could most definitely live with something like that. I guess I should have taken into consideration the many types of people who may be using something like this.

I can also imagine them using the device, finding nothing wrong and trying for a refund.

In conjunction with your statement, there are always those who don't want to think their way through a problem and opt for someone else to do their thinking for them.

It was an idea taking into consideration only the positives of this device. I shall begin thinking in a more devious manner before finishing any typing.

Al
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-25-2008, 06:34 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

Sounds interesting, I am in to see how it goes.

Cheers.

Russell.
Reply With Quote

  #12   Ban this user!
Old 11-25-2008, 06:57 AM
 
Join Date: Jul 2006
Location: USA
Age: 38
Posts: 841
Fixittt is on a distinguished road

While I can see your points Marriss... I see this sort of tool being a great benifit to many.

The fact that such a devise would be used BEFORE the driver, it needs to be unsupported. From geckos companies point of view. I can also see a new section sprining up on the zone and mach3 forums utilizing and covering many aspects of how to CHANGE optimize pulses. Right now its all a trial and error situation because without a scope and the knowledge of how to use it properly we have no way of seeing the pulses. I can also see many OEM sellers supplying these to end users as part of a kit. Also raising the price of the steppers a couple $10 or so should offset the cost of the sniffers. And sending them out with all the drivers may help diagnose issues. The bulk orders could also get a larger price break as they may not need 20 sniffers.
I certanly would be interested in having a few of them here so when I am helping others, I can toss one in the mail to them.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Step Pulse Multiplier RotorRouter Gecko Drives 15 08-02-2010 01:00 PM
G903 Step Pulse Multiplier Board? The_Doctor Gecko Drives 5 05-05-2008 12:29 PM
G340 step pulse multiplier pescado_loco Gecko Drives 0 01-12-2008 07:46 PM
Relations between chopping frequency and step pulse rate bunalmis Stepper Motors and Drives 14 05-30-2006 11:37 AM
MACH3 Maximum Step Pulse rate Ken_Shea Mach Software (ArtSoft software) 4 09-21-2005 08:14 AM




All times are GMT -5. The time now is 05:51 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361