![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Gecko Drives Discuss all Gecko drives here and get direct support! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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. |
|
#3
| |||
| |||
| 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 |
|
#4
| |||
| |||
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 |
|
#5
| |||
| |||
| 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 |
| Sponsored Links |
|
#6
| |||
| |||
| 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. |
|
#7
| |||
| |||
| 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). |
|
#8
| ||||
| ||||
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 |
|
#9
| |||
| |||
| 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 |
|
#10
| ||||
| ||||
| 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 |
| Sponsored Links |
|
#12
| |||
| |||
| 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. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
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 |