Para Port - 4N25 - Stepper Driver?

Discussion in 'The Projects Forum' started by Pedrejo, Apr 26, 2011.

  1. Pedrejo

    Thread Starter New Member

    Apr 25, 2011
    2
    0
    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
     
  2. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,000
    1,512
    In your schematic you show the input to the opto connected to both an Ardino and a computer? You can't use both at the same time. You show no connection to the 'enable' pin of the A4988 it needs to be tied either high or low (+5V or 0V) which ever you want to do.. You should get the data sheet and application notes for the A4988 and read them and make sure you have done every thing they call for.

    On another note will the 4n25 switch fast enough for the speed you want to move the axis? I also don't think you should have any connection to the base of the opto transistor. A "floating resistor" will act like an antenna for stray signals from the motor wiring.
     
    Last edited: Apr 26, 2011
  3. Pedrejo

    Thread Starter New Member

    Apr 25, 2011
    2
    0
    Thanks for the reply.

    The +5V input through the LED side of the opto was one of the schematics I saw. I should have mentioned that I also tried using the output from the port through a 330 Ohm resistor to pin 1 with pin2 to ground with the same results. But I was assuming a +5V output. Now that I know the output is +3V, I should maybe try a 180 Ohm resistor? Could that be the entire cause?

    I'm not sure if I'm reading it right, but it looks like the schematic for the break out board shows the enable pin pulled down with a 100k resistor.

    http://www.pololu.com/picture/0J3359.600.png

    With nothing connected to the base, I get zero movement. My stepper will follow the axis movement very roughly if I connect a 100k resistor to the base and hold the other end between my fingers.
     
  4. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,000
    1,512
    Most breakout boards for CNC use a HCPL2631 or something similar. It will switch faster and provides a gain in the circuit, this allows the faster switching. The 4n25 and similar are fairly slow.

    You haven't supplied any information about your stepper motor or motor power supply. Steppers don't like to, especially when coupled to the axis screw, go from a dead stop to near full speed, with out a 'ramp up' to that speed. Most steppers in CNC will need more than the 1 or 2 Amps this driver will give.

    Please show a schematic of all your connections and the specs on the motor and power supply. And the speed and step size you are using.
     
  5. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    This is what I would expect from a transistor that is forward biased but not in saturation. When you touch the 100k the base will be injected with hum. The positive going part of the hum will forward bias the transistor further.

    Laptops don't typically come equipped with par ports any longer. Is this a real port or a USB/Parallel Port converter?
     
Loading...