On Thu, 2009-10-08 at 00:27 +0100, Andy Pugh wrote: > Seeing as how we have at least a few people here who really understand > pull-ups etc (and I am not one of them) > > I did have everything working fine, but then I blew some drivers > meddling with things, and when I replaced them I took the opportunity > to get a bigger driver for the X/Z axis (what it calls itself depends on > whether it is a lathe or mill config file loaded.) > > Previously I had the amp-enable lines all connected to the same > parallel port pin and it worked fine, logic positive. Pin goes high, > amp turns o. This was when all the drivers were > this type. > http://www.motioncontrolproducts.co.uk/pdf/MSD325_stepper_drive_datasheetV2.0.pdf
That seems risky to me because generally the LED in the opto-coupler needs 10 to 20 milliamps to turn on well enough to switch the coupler's output. You have three LED's to sink current for, which is 30 to 60 mA. Generally, a parallel port pin is designed to sink or source about 3mA (some can do much more, but which ones?). I would prefer to see the parallel port pin connected to three inputs of a driver chip like a 74LS244. Each of the three outputs of the 74LS244 could be connected to an opto-coupler input. You can also put a regular LED in series with each opto-coupler input, to get a visual indication of the input's state. If the LED doesn't light up or is dim, you most likely have a problem. > Now I have added one of these drives, but I can't get it to work the same way > (I daisychained all the +5 lines together externally) > http://www.motioncontrolproducts.co.uk/pdf/MSD542-V2.0_stepper_drive_datasheet.pdf > > Ideally I would like the amps disabled if the PC is off, and only > actually enabled if EMC is running and active. If you don't mind modifying your stepper drivers, you could cut the 5 Volt OPTO traces going to each opto-coupler and have the 74LS244 source the LED instead of sink. Also you could use a twisted pair (CAT5) with one wire from the 74LS244 output to the LED + side, then the other wire go from the - side back to the 74LS244 ground. > As far as I can see it all should be logic-negative as I had it wired, > but it would seem odd to require a current through the opto-isolators > to turn the drives off. That does seem to be what the 325 datasheet > says, though (The 525 datasheet seems to be complete gibberish) That's because of the sink arrangement. When the EMC2 output is High, both sides of the opto-coupler LED are high, so there no current will go through the LED. Generally you need around .6 Volts across the LED and between 10 to 20 milliamps for normal operation. When the EMC output is Low, the minus side of the LED is zero volts (sinking to ground), the LED + side is around .6 Volts and the + side of the 270 Ohm current limit resistor is 5 Volts. > It is no trouble to change parallel port pins if a particular one has > useful boot-up behaviour, nor am I at all concerned about having to > use negative logic. (I just didn't know enough about source/sink > capacity of parallel ports when I built the system in the first place. > > I currently have +5V from a PSU connected to the three "OPTO" > terminals. I think I have the p-port ground pins connected to the 0V > of the same CPU, but on reflection I am not totally sure... I think I > might have a half-witted arrangement where p-port ground is not > connected to 5V ground, but the 0V lines of all the PSUs (Independent > 5V, 12V and 30V ones) are common. What I possibly should have is the > 5V ground connected to the P-Port ground (it only actually drives > opto-isolators and reflective opto limit switches and could almost > certainly float independently) and the other PSU grounds connected to > chassis ground. The circuit has to be closed for the opto-couplers to work. The 5 Volt OPTO supply will put 5 Volts on the opto input, the parallel port will try to sink this to the PC's ground, which will need to sink it to the 5 Volt OPTO supply's ground. > Currently I can't turn off the MSD542 and one of the MSD325 drivers > keeps randomly dis-enabling, so I need to do something slightly > cleverer. If you go over more than 3 mA on the parallel port, 50 mA on a driver chip, or 30 mA on a opto-coupler input, you may blow the device out. A parallel port is really hard to fix, a driver chip or opto-coupler is cheep to replace. > I would have liked to have linked the enable optos in series > to reduce the p-port load, but I don't think that is possible with the > internal resistors and the internally-commoned +V on the 325 optos. > > -- > atp You can get more of what you want if you can modify the stepper driver inputs. Maybe they provided jumpers to allow you to do this. You will need to understand how LED's, driver chips, current limit resistors and grounds work together, but it's not rocket science if you take your time, draw out the circuits and ask questions. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
