Hello Guest it is March 28, 2024, 03:52:49 PM

Author Topic: Anomalies in the LPT signalling  (Read 3468 times)

0 Members and 1 Guest are viewing this topic.

Anomalies in the LPT signalling
« on: February 16, 2010, 09:02:22 AM »
Hi to all,

I am getting some unexpected results from the LPT port. I hope you will bear with me while I give a full explanation. I use the circuit attached to verify that I get the correct TTL signals from my LPT port pins. When I use a little software called LPTinterface.exe I get logical results, ie when I make say pin 2 high I get the LED in the circuit go off and when I make pin 2 low I get the LED lit up. The same happens on other pins up to 7 that I have tried. I have measured the current and the LPT can apparently supply as much as 35mA to the optocoupler at about 3.5Volts.
The problem starts when I use the Mach3 software. All the necessary configurations are done but when I try to jog in the x or y or z direction using the arrow keys, the LED toggles the first time I push the appropriate arrow key but the LED stays in the same condition indefinitely regardles of which arrow key I push next. This happens when the "low active" column is not ticked. 
On the other hand when the "low active" is ticked I sometimes get a very dimly lit LED for the pulses as long as the key is kept down. Can anyone tell me what is happening and how to overcome this problem. I have to add that when the pins are connected to a step motor driver it won't drive the motors unless I use a buffer circuit as an interface. Is there any reason why the LPT should be able
to drive the below circiut using the LPTinterface.exe but not when using Mach3?
I have increased the pulse duration to the max. of 25mS still with no improvement.
I will be grateful for any help.
Cheers Bluebirdiran

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Anomalies in the LPT signalling
« Reply #1 on: February 16, 2010, 02:07:30 PM »
I am certainly far from being an expert with electronics but seems what you are seeing will be correct if you are testing a Step pin.
 Probably the reason you are needing to buffer is that your LPT is putting out a low voltage (3v)  and your drive is requiring more.
Hood
Re: Anomalies in the LPT signalling
« Reply #2 on: February 21, 2010, 03:42:04 AM »
Here's a thought in another direction, Do you know how much current your port can sink????

If a pull up resistor is supplied from the the PC PSU +5V or a wall wart etc.... to Pin 1 of the coupler, and the port connected to pin 2 the opto-coupler would protect the output from reverse voltage and can likely sink more current than it can source...

A quick look at "a" tlp521 data sheet says
INPUT DIODE
Forward Current 50mA
Reverse Voltage 6V

so 35mA isn't enough for the one I looked up

1.15 typical forward voltage drop from 5 volts = 3.85V/.050 = 77Ohms so thy a 82Ohm 10% or a 75 ohm 5%
at a port high forward V of 5-3.5-1.15 =0.35V/75=4.6mA so you should be good to go.


Same "MIGHT" work with a couple of diodes and a resistor, but no guarantees on this one.... .7v for a regular diode... shotkeys are lower .3ish

supply +5V------>|--------^^^^-----------X---------->|--------+3.5V port
                                 1Kohm   

Take your signal at "X"   it will boost it .7V to 4.2Vhigh and .7v low... which "should" satisfy CMOS and maybe TTL Levels and only 5mA to sink but the i think the inputs to the drives should be happy with the voltages. (The reason I suggest two diodes is that 1.4V+3.5V=4.9V and 1KOkms on .1v is 100uA so it shouldn't affect the port)
If someone is willing to try this maybe on a PCI card that puts out 3.3 - 3.5 volts Id love to hear the results, because I just thought of this.


My answer for one of your questions is that if, as I believe, an active high means that the port is low until it sends a high step pulse, of a few micro seconds, the low will not supply current so the transistor is OFF and the LED is forward biased with voltage=ON. If the active low puts the port high, the transistor is now biased and is sinking the current, so the LED is OFF. If you go +5V to resistor to LED to transistor the LED will be on when the port is high not low.

I think I spent way to long on this, but as long as this helps you or someone down the road.... all is not lost :p