# Backup power supply with led

My project requires a backup power supply, and I want to include an LED to determine when the backup power supply becomes active. My thought was a voltage divider to limit current to the LED, and allow the excess to bypass the LED and go straight through to the load.Would connecting a BJT as an amplified Zener where the Zener is in fact the LED be relevent?

I am told the correct way to do this would be to utilize a transistor, however I cannot think of a way to connect a transistor where I am not connecting it or an LED to ground(else there will always be current regardless of whether the backup power supply is active), or running the full load current through the gate of a transistor.Would a BJT be better here?

What is the correct way to approach this? I suspect using a transistor would be correct, I have just not been able to create a working circuit with a transistor myself!

When the 12v supply is droped it is disconnected and creates an open circuit.

Use a PNP - -e.g. 2N3906; connect emitter via a 1N4148 (or any other) diode to +9V; connect base via ~ 10k to +12V. Connect the collector via a R (e.g. 10k) suitable for LED brightness to the LED to GND.

When the 12 V falls below 9V-2*0.7, the PNP will will turn on and light the LED.

The 1N4148 is to protect the E-B junction of the PNP if 12 V is present and 9 V not. If you are still concerned, you can add > 1Mohm in parallel with the E-B junction also.

• A schematic might better illustrate what you mean. Commented Jan 1, 2016 at 2:45
• Yes, it could, but I don't have time to create one & there is enough info in my comment to understand the concept. Commented Jan 1, 2016 at 2:57
• I tried this circuit, link The led doesnt light, and I am measuring positive voltage at the gate of the transistor(seems to be passing through the emitter into the base?). Edit: Forgot to add my load. The load is an Arduino connected from between D1 and D2 to ground Commented Jan 1, 2016 at 3:42
• (The diode D3 is backwards). Change the 12 V to 0 V -- the LED will light. Commented Jan 1, 2016 at 4:01
• "When the 12 V falls below 9V-2*0.7, the PNP will will turn on and light the LED." True enough, but for instance with the 12 V at 10 volts the LED will be on, but the backup will not be supplying power. Commented Jan 1, 2016 at 4:03

Welcome to Electronics.StackExchange!

The "circuit never worked" because D3 and LED1 have 12v on their cathodes (11.3v realistically), which is less than the 9v they are being supplied with, so they are "reverse-biased" and do not conduct.

Here is the Wikipedia entry on diodes for reference.

What would help you 100x more than a concise answer to this particular question (as jp314 provided), is learning how to use diodes and transistors effectively.

There is a great, free series of textbooks available online for electronics study. Please see Lessons In Electric Circuits by Tony Kuphaldt. If you study the first three volumes with vigor, you will have no problem finding your own solutions to questions like these.

• The purpose of my diodes here is that when the main powerr supply(12v) is active, the D3 diode is revrse biased and does not conduct, preventing flow through the LED. Is my understanding incorrect in this? Commented Jan 1, 2016 at 3:40
• No, D3 is just to protect the B-E junction of Q1. When the 12 V is > 9V, the PNP is off (B-E reverse biased), and so LED is off. When the 12 V is < 9 V, the base of the PNP is pulled low; the PNP is on, and the LED lights. Commented Jan 1, 2016 at 4:03
• So the 12v supply is the "main" and the 9v is the "backup?" That wasn't mentioned before. When the "main" 12v supply is off, LED1 and D3 will be forward-biased and could illuminate. There are many issues with it, and jp314's solution would be much more robust. Commented Jan 1, 2016 at 16:38