0
\$\begingroup\$

I'm planning on controlling some external circuits using the parallel port by switching on relays that can switch on the external circuits.

Am I right in thinking the pins have a voltage of 3-5V when high and a maximum current of 50mA? The most sensitive relays I can find require 5V and 1A (eg, http://www.maplin.co.uk/dpdt-1a-miniature-relay-37494)

\$\endgroup\$
  • 3
    \$\begingroup\$ You shouldn't drive inductive loads (i.e. relays) with digital pins (i.e parallel ports) \$\endgroup\$ – user3045 Jan 23 '12 at 22:51
  • \$\begingroup\$ What do you suggest I use instead? \$\endgroup\$ – Matt Jan 23 '12 at 22:58
2
\$\begingroup\$

No, that's the maximum current. The coil resistance is 180 Ohms at 5 V -> 28 mA.

Edit: And if you want to switch at 3 V, find a different relay. This one isn't specified at other than 5 and 12 V.

\$\endgroup\$
  • \$\begingroup\$ Ah, so is that the maximum current that can be passed through the coil or the actual circuit being activated? And if the pins only provide 3V, will this still activate the relay? \$\endgroup\$ – Matt Jan 23 '12 at 22:44
2
\$\begingroup\$

Drive the relays with something like a ULN2803 connected to the port. There are many variants of this chip: it's an 8-channel darlington driver with kickback diodes built in and it costs about a buck in single quantities.

I used to have a standard circuit back in the day that plugged into a PC printer port and gave 8 relay outputs and 4 digital inputs. The outputs were driven by a 2803 and the inputs were buffered using 1489 RS232 level translators. It was fairly bulletproof.

\$\endgroup\$
  • \$\begingroup\$ I read some other Q&A's and decided to abandon the parallel port idea, and ordered a USB microcontroller (teensy) instead. I imagine I'll still have the same problem of being unable to power inductive loads, so really I need a general way of safely using a digital signal to eventually power a relay. \$\endgroup\$ – Matt Jan 25 '12 at 3:47
1
\$\begingroup\$

I would use a Darlington transistor.

\$\endgroup\$
  • \$\begingroup\$ Would that protect the circuit and provide a higher voltage for the relay? Or am I misunderstanding the article? \$\endgroup\$ – Matt Jan 25 '12 at 3:58
1
\$\begingroup\$

use an external power supply to run relay coils and a uln2803 (8 transistor switchs built in) to switch current then power is not limited to port. the pins are protected from induction kick back.

\$\endgroup\$
0
\$\begingroup\$

Even though you can drive an inductive load (relay, motor etc.) with a parallel port you shouln't. You should always use a H-Bridge.

\$\endgroup\$
  • \$\begingroup\$ So using digital pins to control relays could be dangerous/damaging? I read through the article but all I'm seeing is a motor-control circuit and can't see where it addresses this issue. Could you explain further please? \$\endgroup\$ – Matt Jan 23 '12 at 23:14
  • 1
    \$\begingroup\$ You don't need an H-bridge for a relay. \$\endgroup\$ – Brad Gilbert Jan 23 '12 at 23:23
  • \$\begingroup\$ Depends on the relay; better safe than sorry \$\endgroup\$ – user3045 Jan 25 '12 at 1:18
  • \$\begingroup\$ That makes sense, but how does a H-bridge stop the relays inductance from affecting the circuit? \$\endgroup\$ – Matt Jan 25 '12 at 3:51
  • \$\begingroup\$ The drivers have a high reverse impedance \$\endgroup\$ – user3045 Jan 25 '12 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.