# ULN2003 driving Relays with status indicator

How to drive the ULN2003 to show the on/off status of relays (green LED for ON and Red for off)?

• Welcome to EE.SE. Have you created a diagram or worked this out on paper? What software tools do you have to help you out? – Sparky256 Jul 17 '16 at 16:35
• The ULN' is for driving the relays. The LEDs are your problem. – Ignacio Vazquez-Abrams Jul 17 '16 at 16:35
• @Sparky256 Thanks for your kind words, I just used this schematic with a 1k resistor and it works, Is it possible to add an other LED to show the off state? – Mehran Jul 17 '16 at 17:10

simulate this circuit – Schematic created using CircuitLab

Figure 1. On and off indications using one Darlington buffer output.

• R1 drives the green LED as in your schematic.
• When Q1 turns off current flows through RLY1 to light the LED. If, for example, the coil resistance was 300 Ω then about 5.5 mA would flow through that circuit. It is very unlikely that the relay will remain on with 5 mA through the coil.

To give yourself some confidence check the minimum hold-on voltage for your relay and measure the voltage across the coil when R2 and the red LED are in series.

[@Sparky256's comment:] If Q1 is OFF, won't there be current flow through R1 and R2 and both LED's? Or enough to keep the Green LED dimly lit.

Figure 2. A Finder 12 V relay with a 300 Ω coil.

At 5.5 mA calculated above the voltage across the coil of this relay would be $V = IR = 5.5m \times 300 \approx 1.7 V$. Let's be generous and say that the LED forward voltage will only be 1.5 V at small current. That leaves 0.2 V across the 1.8k series resistor so the current R1 and the green LED would be $I = \frac {V}{R} = \frac {0.2}{300} \approx 0.7~mA$.

Figure 3. LED forward current and voltage relationship.

Depending on the efficiency of the LED this might be a problem. It will be very faint in relationship to the red LED which would be on at this time.

@Spehro's comment: I would suggest adding an NPN voltage follower (eg. 2N4401) to the lower side of the coil (collector to +12, base to ULN2003 output Q1, emitter to R2 (1.5K). That way the current through the coil when off will certainly be negligible.

simulate this circuit

Figure 4. Schematic for Spehro to edit.

• If Q1 is OFF, won't there be current flow through R1 and R2 and both LED's? Or enough to keep the Green LED dimly lit. – Sparky256 Jul 17 '16 at 17:23
• Good point. See the update. – Transistor Jul 17 '16 at 17:40
• I would suggest adding an NPN voltage follower (eg. 2N4401) to the lower side of the coil (collector to +12, base to ULN2003 output Q1, emitter to R2 (1.5K). That way the current through the coil when off will certainly be negligible. Big improvement for one inexpensive part. – Spehro Pefhany Jul 17 '16 at 17:42
• @Mehran: Thanks for accepting my answer but you couldn't have tested it already! In any case it's a good idea to wait a day or two to see if better answers come along. Spehro, for example, has a modification. Once you accept it's a disincentive for others to answer. – Transistor Jul 17 '16 at 17:45
• @SpehroPefhany: Sorry I don't follow your idea. When off the current through the coil lights the red LED. It's the voltage across it we wish to keep low to prevent the green turning on. I've posted Figure 4 for you to edit if you feel like it. – Transistor Jul 17 '16 at 17:52

To get "OFF" state indication use a second ULN2003 driven by the first one. Because the bias current to drive a ULN2003 will make your "ON" LED's come on dim, add a 1K resistor across the ON LED's so bias currents will not turn them ON. This way the first IC turn on the relays and the ON LED, while the second IC turns on the OFF LED (Not at the same time). You can tie all Vcc lines together.

• Am I missing something obvious? Where do bias currents come into this? – Transistor Jul 17 '16 at 17:22
• I should say leakage current through the Green LED and the relay coil. It is enough to turn on a second IC but the Green LED may come on dimly. – Sparky256 Jul 17 '16 at 17:26
• Thanks but you've posted this on Sparky's answer. Which answer are you using? – Transistor Jul 17 '16 at 18:04