standby indicator LED schematic - Page 1
Forum section: electronics / projects

author: Megawilsound
author_rank: Contributor
timestamp: January 11, 2020, 10:53:29 am
content: Hi allI am trying to build a 240VAC to 5VDC power supply for a project.I am using the LC7805 for the voltage regulator with a bulk standard full-bridge rectifier and a power-on indicator LED, what I am wanting to add is a standby indicator LED. I have looked in the usual places with no luck in finding a schematic that I can use.Any help in this would be gratefully appreciated.ThanksMegawilsound.

author: mariush
author_rank: Super Contributor
timestamp: January 11, 2020, 12:24:22 pm
content: You need to limit the current going through the led, so it won't burn out.The easiest way to do that is to add a resistor in series with the led, to limit the current.You have the classic formula Ohm's law : Voltage = Current x ResistanceFrom this formula you can derive the formula you need to calculate the resistor value:Voltage power supply - (number of leds x Forward voltage of a single led) = Current x Resistance.The forward voltage of a led is the minimum voltage the led needs to light up, and it's usually specified in the datasheet.The value varies depending on the chemistry of the led, but typical values are 1.7v..2v for red leds, 2.2v for green and other colors, 3v for blue or white leds.So let's say you want to use a red led with an average forward voltage of 2v, and you want to limit the current to 5mA (0.005A) because after all it's a stand-by led, not a laser pointer.Your linear regulator outputs 5v so you can put the numbers in the formula:5v (power supply voltage) - 1 led x 2v (forward voltage of led) = 0.005 (current in A) x ResistanceSo Resistance = (5v - 2v ) / 0.005 = 3/0.005 = 600 ohm600 ohm is not a value in theE seriesso it would be hard to find, though you could produce it by chaining 6 100 resistors.However, you can see that 560 and 680 would be in the E12 series, and 620 is in the E24 series, so all three values would be super easy to obtain. 560 ohm would give you slightly more current than 5mA, while 620 would give you a bit less current than 5mA.Now as for actual schematic, first of all you would need to use a transformer to convert the high voltage to some lower voltage, because linear regulators like 7805 can not be powered with 230v.Transformers also provide isolation, which makes things safe for you.Linear regulators work by taking in some higher voltage (for example 9v DC) and they output the desired lower voltage (ex 5v) and they throw out the difference in the form of heat on the chip.By design, linear regulators also need to have the minimum voltage higher than output voltage by some amount, which is listed in datasheets as "Dropout voltage". In the case of 7805, this dropout voltage is around 1.5v - 2v.So, you need to have a minimum input voltage of 7v, but let's go with 7.5v.IF you take a transformer, that will take as input some high AC voltage and will output some lower AC voltage.The bridge rectifier converts this lower AC voltage into a really wavy DC voltage, which will have peaks equal to sqrt(2) [1.4142] x Vac, minus the losses in the bridge rectifier, which are equal to 2 x Voltage drop on diode inside the rectifierSo for example, a transformer that outputs 12v AC will have peaks of DC voltage after rectification equal to around 1.4142 x 12 - 2 x 0.8v = 15vBut remember, this is a wavy DC output, that 100-120 times a second peaks to 15v, but lots of times it's well below 5v... and you want to always have a minimum of 7.5v, for the linear regulator to work all the time.To achieve this, you need to add a capacitor on the output of the bridge rectifier, to act like a buffer of energy.You can approximate how big the capacitor should be with this formula :Capacitance (in Farads) = Current / [ 2 x Mains AC Frequency x (Vdc peak - Vdc min) ]So for example, if you want 1A of current and you're in a 230v country where the AC frequency is 50 Hz, and you want minimum 7.5v then with the transformer that outputs a peak of 15v you will have :Capacitance = 1 A / [ 2 x 50 Hz x (15v - 7.5v) ] = 1 A / 100 x 7.5 = 1 / 750 = 0.001333333 Farads or 1333 uFSo, to be sure I'd have at least 7.5v when the regulator takes up to 1A of current, I'd need at least a 1333 uF ... so I'd probably go with a 1500 uF or a 2200uF capacitor.With this particular example, a bigger capacitor could be used, but would not make the circuit better. In fact, a bigger capacitor would only keep the minimum voltage higher than 7.5v, and that only makes the linear regulator produce more heat, so it may make the circuit more expensive because you may have to add a bigger heatsink.Also, when the capacitors are really discharged and you start a power supply, the capacitors absorb energy and fill up really fast, so there's a big pulse of current going through the transformer. This makes it harder to calculate a good fuse value for the transformer, if you decide to add one... because too high of a fuse makes it pointless and if the fuse is too low, the fuse may be tripped when the capacitor sucks that energy right at the start.

author: Megawilsound
author_rank: Contributor
timestamp: January 11, 2020, 01:26:46 pm
content: Hi, mariushThanks for the information.What I am looking at doing is adding a standby LED to my project.I have a basic power supply in mind.I will be adding a Mains Power Switch at the back of the unit and an on/off switch at the front of the unit with an LED to indicate that it is on.ThanksMegawilsound.

author: mariush
author_rank: Super Contributor
timestamp: January 11, 2020, 01:49:41 pm
content: If you put the resistor and the led like in the picture... all the current powering devices will go through that resistor and the led. You don't want that.You want the resistor and led like in my picture. The resistor and led have to be between the + and - of the output.Also, you need some "bulk storage" capacitor after the bridge rectifier, otherwise 100-120 times a second, the voltage will go between 0v and around 15v DC (for a 12v AC output transformer). So for a decent amount of time the input voltage is less than that ~7v required for the regulator to actually output stable 5v. You're basically relying on the C101 capacitor to smooth out the choppy output of the regulator (imagine that 50% of the time, the 7805 regulator doesn't output anything because the input voltage is below 7v)So put a capacitor right after the bridge rectifier to raise the minimum voltage like I explained (you have the formula in my previous post)C102 is a decoupling capacitor, it doesn't have to be 0.33uF ... the value is not critical. Usually 0.1uF is used.. and ceramic capacitor should be usedF101 a 1A fuse is a bad choice. If you put a capacitor after the bridge rectifier, for a few ms while the capacitor charges, it will draw way more than 1A... either use a time delay fuse or don't put it there, put it before the transformer (and adjust the current accordingly).For example, if you have 12v 1A on the output, that's 12 watts. So 12 watts / 230v AC = ~0.052 A .... so you could probably safely use a 0.1 .. 0.25A fuse.

author: Twoflower
author_rank: Frequent Contributor
timestamp: January 11, 2020, 01:55:07 pm
content: I think Megawilsound would like to have an LED lit if no load is present (Standby indicator). In the original post he wrote that he has already a power LED (hopefully like the schematic from mariush).This standby LED is more complicated as you need to measure if there is any load present. SO you need a shunt resistor to measure the current, an amplifier to increase the the voltage drop on that resistor to power an LED in case no voltage drop is present.

author: mikerj
author_rank: Super Contributor
timestamp: January 11, 2020, 01:59:54 pm
content: You need to describe what you expect this standby LED to do i.e. when it should illuminate and when it should go it. "Standby" typically refers to a load rather than a power supply i.e. a low power state from which it can be switched into a fully functional state.

author: Benta
author_rank: Super Contributor
timestamp: January 11, 2020, 05:51:24 pm
content: The question is far too diffuse. Please describe what exactly the LED should do. "Stand by" can be anything.

author: iMo
author_rank: Super Contributor
timestamp: January 11, 2020, 06:09:46 pm
content: I think OP wants to have the LED connected at the 240V side.

author: Benta
author_rank: Super Contributor
timestamp: January 11, 2020, 06:23:41 pm
content: Quote from: imo on January 11, 2020, 06:09:46 pmCould be. But until he clarifies his wish it's anyone's guess.

author: Megawilsound
author_rank: Contributor
timestamp: January 12, 2020, 04:49:30 am
content: Hi, all thanks for the interest.I am not too confident that I am explaining what it is I am looking at doing.so here goes again.I have straight forward power supply as detailed in the image in my last post.The device I am working on will have two power supplies, one from a USB connection, this will not provide the unit with enough power for all its functions. I am going to keep the USB supply separated from the one provided by the Mains power unit.Both the Mains inlet and the USB will be located on the back of the unit, along with the mains power switch and the main fuse access.To the front of the unit, I want to add a second power switch with a power-on indicator LED and a second LED indicating that the unit is still connected to the mains.So what I am looking for is a schematic of a power supply with a stand by function.I hope that makes it clearer now.Megawilsound

author: sleemanj
author_rank: Super Contributor
timestamp: January 12, 2020, 05:11:51 am
content: Simplest solution, use an SPDT switch for your front panel power, in the 5v from the reg to the common (center pin), the "off" position to your standby led, the on position to your powered-on led and the output terminal or whatever.When switch is off, the SB LED shines, when the switch is on the ON LED shines.Excuse the crudity of the diagram...

author: Megawilsound
author_rank: Contributor
timestamp: January 12, 2020, 09:40:38 am
content: Hi sleemanjThanks for your reply.This is such a simple solution don't know why I did not think of it, probably not enough coffee.ThanksMegawilsound.