A4988 w/EMC2 & 4N25

Hi All,

I’m working on a CNC project and am having trouble with 4N25 optocoupler. This circuit works fine if I connect my parallel port directly to the A4988 breakout board, but either doesn’t work at all or, if I touch the floating resistor from pin 6 of the 4N25, is very sporadic and jerky. Sorry for the crazy schematic. I’m using an '04 Thinkpad to run EMC2.

Any suggestions for improvements would be greatly appreciated. What is the risk to my parallel port if I just connect the step/dir output directly, without isolation?

Thanks, Pedrejo


Hello.

I think many folks use these stepper drivers without the optoisolator, but I can’t really quantify the risk for you. Also, the risk depends largely on what else you do and how dexterous or clumsy you are.

Several aspects of the left side of your circuit look suspect to me. First off, is your Arduino ground connected to the computer ground? (By the way, some of your isolation benefits are lost if you stick the Arduino in the picture since you could potentially short something out while working on that; if you’re using the Arduino as just a power supply, it’s an expensive and not particularly good one.)

My biggest concern is your parallel port voltage. I have a feeling modern computers, and especially laptops, might not give you 5V signals (I didn’t do a test since I couldn’t quickly find a computer with a parallel port), in which case the LED in your circuit might always be on. What voltage is your output pin when the LED is not connected? If the pin can go to 5V without a load, something is wrong in how you wired or measured the circuit since the voltage should be able to go from very close to 0 to very close to 5V and not be at the 3.5V you have indicated in your diagram.

- Jan