What software are you using?
Hi,
I've interfaced a Mesa 5i20 with the G540, and everything went fine until I tried using the charge pump. Seems that the signal is too weak to drive the charge pump directly (only 3.3V is supplied by the FPGA for high).
So, I've tried using a optocoupler circuit, and for short times, seemed to work fine. Short times, because the additional output transistor I've used in open collector seems to be destroyed rather quickly (had to use a 150ohm pull-up resistor, higher values didn't work).
I've tried also using a TTL gate to drive the pin (a 7404 circuit), based on the push-pull output, but without success.
Does anybody have an ideea about what current is needed to successfully drive that charge pump?
What software are you using?
Gerry
Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Emc2, but the software is not an issue here. The waveform generated is ok, and while the open-collector setup worked, was perfectly suited to enable the G540.
Even in the current state (using the 7404), can feed back the generated signal to a 5i20 input, and I do get a clean signal. Unfortunately, that signal doesn't seem have the required power to drive the input of the G540 (the output is at around 2V(high) when connected to G540)
Replace the 7404 with a 74ACT04 or better yet, a 74ACT14 and everything will work OK.
Mariss
Mariss, many thanks for your input. Wasn't able to find a 74ACT14, so I'm gonna use a 74AC14, output specs appear to be identical.
Couple more question, will anything improve regarding noise rejection/signal stability if I use the same circuit for the other wires (basically, the step/dir wires)?
Also, is this setup also required for the PWM input of the G540 (spindle control)? haven't got that connected yet, but will want to use it rather soon.
Both families are nearly the same; the ACT device has a 1.5V logic threshold while the AC device has a 2.5V threshold at a Vdd of 5VDC.
I'm a little baffled why you are using otpo-isolation in the first place. Every input and output on the G540 is internally opto-isolated already.
Mariss
Well, the opto-isolation is there to protect the FPGA. Since I do use some 12V devices on other FPGA lines, I tend to stay on the safe side (the FPGA tolerates only 5V).
The G540 interface is just a small part, and as I've said, worked fine directly connected to the FPGA (without the charge pump). What I'll probably do, just to be safe, is to add some 74AC14 gates between the FPGA and G540 just to bring the signal up fom 3.2V to a 5V level.
Thank you
The G540 inputs from the DB-25 connector are designed to work with 3.3V and 5V logic levels. What is required is the hardware drivers have active pull-up instead of pull-up resistors. The 74AC/74ACT series does an excellent job because its outputs can sink and source 24mA at TTL spec logic voltage levels (-24mA @ 0.4V and +24mA @ 3V).
I would avoid using external opto-isolators for the STP/DIR inputs. The ones we use for these inputs are high-speed optos (HCPL-2531). A photo-transistor opto is way too slow to drive these inputs.
Mariss
Mariss, thank you for all your input, really helped a lot. Taking a hint from your previous remark about the opto-isolators, I've done away with those for the G540 part.
I ended with using a single 74HC14 (my 74AC14s are still on the way), and voila, everything is working like a charmOnly proves that the simplest solution is usually the best one. Will insert the 74AC14 when it arrives, just to be safe.
In case of the 5i20 board, the outputs are indeed pulled high by resistors (3.3k), and have no chance to drive the charge pump circuit. But everything else seemed to work OK (step/dir), have used the setup (G540+5i20) for quite a while and I saw no apparent issues. Based on your remark, that an active pull-up is needed, will probably use the same circuit for the step/dir pins. Couldn't hurt, I suppose. Maybe this will help 'revive' the broken A axis module (which I don't currently use/need), if not, will need to order a G250X to replace it. BTW, are the optos for step/dir on the G250X board?
The 74HC family is marginally adequate because of current sink/source limitations. This can be improved if you have spare inverters by wiring multiple inverters in parallel. It would take all 6 74HC inverters in parallel to equal a single 74AC series inverter.
I can't find a datasheet for an LVT817 device so perhaps the number is in error. My comments about your circuit diagrams:
The first circuit provides the better bandwidth because it limits the Miller capacitance effect of the photo-transistor. FYI, Miller Effect limits transistor bandwidth because the current required to charge/discharge Ccb (collector to base capacitance) is injected into the base to emitter junction. This injected current is in the opposite direction to the base current used to turn the transistor on or off. This opposing current is proportional to the dv/dt on the collector so it severely limits rise and fall times on the collector when the base is an open circuit as in a photo-transistor.
The Miller Effect is limited if the collector voltage excursion is limited. In your first circuit Vce ranges between Vsat (0.2V) and the follower transistor's Vbe (0.6V). The excursion is only 0.4V on the collector.
The second circuit has no Miller compensation and the photo-transistor collector has a 4.8V excursion (5V - 0.2V Vsat). This will limit bandwith.
The NPN in the first circuit has a 150 Ohm collector load resistor. It would be appropriate for a 50MHz bandwidth but your opto comes nowhere close to that (50kHz max). Use a 10K NPN collector load and then follow it with the 74AC inverter.
The G540 high-speed STP/DIR optos are on the motherboard. The G250 drives have no optos onboard.
Mariss
Mariss, the 74HC was used based on being "on hand". Even with the output current limitations, has proven to be more than adequate for this purpose. The charge pump starts to work from about 1kHz up, fill factor between 20% and 80%. I'm more than happy with how stable it looks. Once I receive the 74AC14 circuits that I've ordered, probably will exchange them.
I have also added other 74HC14 for all the pins used to connect to the G540. The final circuit is attached. The result? Well, from a 120IPM max, with motors tuned, my machine's performance shot up to 350 IPM, and haven't even re-tuned the motors or touched anything else. What a spectacular difference a clean signal makes! Couldn't be more pleased. In my case, 350IPM (~150mm/sec) translates to a step frequency of 60kHz. Probably can squeeze a bit more than that after I re-tune the motors.
Thank you for everything, you've made another customer happy![]()
Good to hear that. One persnickety comment about your circuit; never leave a CMOS logic unterminated like the top inverter in your diagram. A floating input causes the device to draw unnecessarily high supply current and touching the floating input (static discharge) may cause the inverter to destroy itself and the other 5 inverters in the package. Terminate all unused inputs to GND or + logic supply voltage.
Mariss