Arduino drive DC Relay


For a small 5V relay, use 5V arduino supply and a 2N2222 transistor.
For larger relays, use separate external power supply and TIP102 transistor to drive the relay coil

Arduino drive DC Relay using ULN2803

If you are using Arduino (or any other TTL device) to control 4 channel relays or more, I would suggest to use ULN2803 Line Driver instead of Transistors or FETs. You can use ULN2003 which is much more cheaper if you plan to use not more than 7 channel relays.

The ULN2803 Integrated Circuit (IC) is a "Eight-way Line Driver". It allows you to interface TTL signals (5v) with higher voltage/current (50V/500ma) loads.

As shown in figure 1 and figure 2, an Arduino is control 8 relays, one using ULN2803 line driver and the other one using transistors, both circuit are equivalent.



Notice that using a ULN2803 to drive 8 relays is much more simpler and cheaper compare to using 8 transistors. R1-R8 (current limit resistor) and D1-D8 (flywheel diode) can be eliminate when use with ULN2803 since the ULN2803 is already built-in with resistor & diode as shown in figure below.


Labels: my.