On Sat, 2010-11-13 at 19:32 -0500, Peter Cauchy wrote:
> >> I am running the OPTO off the USB 5v supply.  The parallel port, USB and
> >> motor supply ground are all tied together.  The USB 5v is tied to OPTO.
> >> Pin 7 on parallel port is tied to DIR and pin 8 to PULSE.  The other
> >> inputs are left unconnected.
> > If the offending output is driving the opto, the more sensible approach
> > is to utilise the higher sink capability of most logic outputs. Then
> > high-state output is not a limitation.
> 
> The USB is being used only for the 5v for OPTO isolation power (5.12v) 
> to the driver.
> 
> The signal for dir and pulse is from the parallel port and low logic is 
> 1.2v and high is 3.3v-4.6v.
> 
> I have tried a 1k resistor and the voltage was only 3.3v.

To add to the confusion, this is what I believe is in your driver
inputs. The driver controls high voltage and large currents to the
motor. These large signals are not compatible with a computer parallel
port, so a device called an opto-isolator is used on the inputs to
isolate the PC side of the driver from the motor side. The opto-isolator
uses light to pass the input information in the signal to the motor
side. One example is a 4N35 which is obsolete but is very common:
http://www.fairchildsemi.com/ds/4N/4N35-M.pdf 

On the first page of the above datasheet is a diagram of what is inside
of the chip. Pins 1 and 2 are connected to an LED. When the LED is
activated the light from it goes across and switches on a
photo-transistor, no electrons are exchanged, only photons. So, the most
basic goal for using the driver inputs is to turn the input LED's on and
off. On the Slo-syn, all of the opto-isolator pin 1's (one each for;
PULSE, DIR, AWO, and RDCE) are tied together and connected to OPTO.

OPTO  o-----+-------+-------+--------+
            |       |       |        |
           LED     LED     LED      LED
            |       |       |        |
            LR      LR      LR       LR
            |       |       |        |
            o       o       o        o
        
          PULSE   DIR     AWO      RDCE

The "o"'s above are Slo-syn input pins, LR are current limit resistors
which are usually installed to limit the amount of current going through
the LED, which should not be more than 16 mA. The value of the limit
resistor is determined by the voltage at OPTO which is normally 5 V.
Page 14 of the manual shows one option for using 12 V on OPTO, which
needs a supplemental current resistor (560 Ohms). If you connect
parallel port pins directly to the drive inputs, you get this:

 USB 5V----OPTO--o-----+-------+-------+--------+
 GND                   |       |       |        |
  |                   LED     LED     LED      LED
  |                    |       |       |        |
  |                   LR      LR      LR       LR
  |                    |       |       |        |
  |                    o       o       o        o
  |                   PULSE   DIR     AWO      RDCE
  |                    |       |       |        |
  |                     /        /      /        /
  |                    /        /      /        /  PC Parallel Port
  |                    |        |      |        |
  |-------------------GND------GND----GND------GND

The parallel port pins act just like switches to ground. The USB 5 V and
parallel port are part of the PC so the circuit between the two is
completed inside the PC. The wire from the GND's to USB shows the
connection. USB 5 V is just like a battery, so if you close one of the
parallel port switches, current will loop through the closed circuit.
One issue with this circuit is that each element has voltage and current
limits. The LED has a 16mA limit, the parallel port switch has anywhere
from 3mA to 24mA current limit and close to 3.3 or 5.1 voltage limit.
The other elements usually have higher limits so we don't usually need
to worry about them. Except the USB has a current limit, which needs to
be greater than the current drawn by the sum of the four input currents.
Since some parallel ports are only good to 3mA and/or 3 Volts, buffer
chips or a buffered break-out board is needed to beef up the switches.
Because the internal current limit resistors, one need to insure that
there is a full 5V at OPTO at all times, even with all four inputs on.
One way to experiment with this circuit is to use an LED in place of the
opto-isolator or driver input.
                        /
5V -------LED----LR----/   --------+
 |                    PPPin        |
 +--------------GND----------------+

Using just an LED and a resistor, you can simulate the driver input. The
value of the resistor is determined by using Ohm's Law. The + side of
the LED sees 5V, GND is 0V, so all of the voltage is used across the
LED, LR and PPPin, or 5V = Vled + Vlr + Vppp. Vppp is probably so small
that we don't need to worry about it. One characteristic of diodes is
that they have a pretty constant ON voltage. From the 4N35 datasheet,
the forward voltage is typically 1.2V (1.2V is common for normal LED's,
0.6V for small signal diodes and transistor bases, but it's always best
to check the datasheet). So 5V = 1.2 + Vlr or 5 - 1.2 = Vlr, also Vlr =
current x resistance (Ohms law, V=IxR). We need to limit the current to
16mA, so 5 - 1.2 = .016 x R or R = 3.8 / .0016 = 238 = 270 Ohms. The
above assumes that the switch can take 5V and 16mA. Some parallel ports
can do this, others can't, so beware. One can use a voltmeter across the
LED and LR to verify the calculations. This method is used all the time
in setting up CNC to PC connections. You can also place an LED in line
with the input wire to see the Slo-syn signals:

USB 5V-----OPTO--o-----+-------+-------+--------+
GND                    |       |       |        |
  |                   LED     LED     LED      LED  Opto-isolator inside
  |                    |       |       |        |   driver
  |                   LR      LR      LR       LR
  |                    |       |       |        |   --------------------
  |                    o       o       o        o
  |                   PULSE   DIR     AWO      RDCE
  |                    |       |       |        |
  |                   LED     LED     LED      LED  LED on input pin
  |                    |       |       |        |
  |                     /        /      /        /
  |                    /        /      /        /   PC Parallel Port
  |                    |        |      |        |
  |-------------------GND------GND----GND------GND

but then 5V = Vled + Vled_opto + Vlr, so the current limit resistor will
see 1.2V less, so the current will be reduced but is likely to work
okay.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to