Electrical – Pc lpt (parallel) port input pin, how much current does it draw

cnccurrentparallelpcie

I need some help to understand what's going on with my project:
I am building an cnc machine and i use the parallel port to communicate with it…
I use the native port to drive the motors and emergency stop. ( i purchased st v2 5 axis board which works fine)
For the limit switches i use a second lpt port provided by a pci express card.
Here i face the problem, with this card…
My limit switches are sn04-p2 (10v to 30v pnp normal closed)
I've built a board using octocouplers (pc123)
Since i can't feed 10v or 12v or 30v dirrectly to the lpt port.
So what does this board do? Isolates the 12v (currently used by limit switches) from the 5 volts that is feed into the lpt port to keep the pin high…

The optocoupler works, but i can't provide sufficient current on the 5v side to pull up the input pin from the lpt adaptor card…

If i feed 5v directly on the input pin works without problem. (Jumper from usb for example)
So i got my multimeter and measured the current drawn by the input pin … and is 99-100 mA… which in my opinion is HUGE …

Anyone know why? Or is this normal?

I feel safe using this "pull up/high" state, because if anything goes wrong with the limit switch, or wires, then no 5v and machine is stopped…

Thanks!

Best Answer

The optocoupler works, but i can't provide sufficient current on the 5v side to pull up the input pin from the lpt adaptor card...

If i feed 5v directly on the input pin works without problem. (Jumper from usb for example) So i got my multimeter and measured the current drawn by the input pin ... and is 99-100 mAh... which in my opinion is HUGE ...

From your description, you are trying to drive an output pin as an input, which is a mistake.

Either you are misusing a pin which can only be an output, or else you are using a pin which can be an input in one of the extended modes, but is an output in your present mode.

Especially in the bi-directional case, you should use something like a current limit resist to keep the fault current reasonable in the case where software has not suitably configured the port; preferably you would also have your circuit only try to drive these pins when enabled by software.