Powering LED from mains - Page 1
Forum section: electronics / beginners

author: sansan
author_rank: Contributor
timestamp: January 04, 2021, 12:26:00 pm
content: Greetings everyone..Please help me with this circuit.So, I try to power my LED from the mains using capacitor.My mains is 220V 50Hz, the capacitor is 1.5uF, the LED is 1W with hefty heatsink on it.the circuit looks like this :I think the capacitor would only pass about ~100mA, but my LED just get instant death.Am I still need a limiting resistor for it? or something wrong with that circuit?Thanks.

author: Manul
author_rank: Super Contributor
timestamp: January 04, 2021, 12:49:36 pm
content: The problem is that at the moment of turn on, the voltage is most likely not zero. In fact it is random. So for example if you turn on while the mains cycle is at the positive peak, you essentially get a rising edge with a frequency much much higher then 50Hz. So the impedance of that capacitor will be much smaller and the current will be huge at this moment. Obviouslly enough to damage a LED as you saw yourself.Edit: You could include current limitting resistor, but for high power LED it is not practical, because it will waste many watts of power. For higher current you should really use some sort of switching converter.

author: ledtester
author_rank: Super Contributor
timestamp: January 04, 2021, 01:08:17 pm
content: In this video starting at 18:46, bigclive explains that a resistor is used to limit inrush current:https://youtu.be/Q23uh7AjjXw?t=18m46s

author: sansan
author_rank: Contributor
timestamp: January 04, 2021, 03:08:38 pm
content: Thank you Manul & ledtesternow I understand what happens.And putting a limiting resistor is impractical, simply too hot!I'll use phone charger(5V) output instead to power the LED.

author: Zero999
author_rank: Super Contributor
timestamp: January 04, 2021, 03:50:04 pm
content: Quote from: sansan on January 04, 2021, 03:08:38 pmThe idea is to use the capacitor, as well as the resistor, which won't get to hot because it's a low value, as it won't dissipate much power. It works best for long strings of LEDs, so the voltage drop across the resistor, is much less than the LEDs.QuoteAssuming your figures of 100mA and 1W are correct, then a 5V power supply won't work. P = V*I, so for 1W at 100mA, you need at least 10V, which is an unusual forward voltage for an LED. The numbers you've given, just don't add up.I agree that using a small mains power supply, is the safest option. Find out the forward voltage of your LED and use a power supply with >10% higher voltage and a suitable curent limiting resistor.

author: mstevens
author_rank: Regular Contributor
timestamp: January 04, 2021, 04:04:09 pm
content: Quote from: sansan on January 04, 2021, 12:26:00 pmLaconically... Yes.

author: Manul
author_rank: Super Contributor
timestamp: January 04, 2021, 04:26:40 pm
content: Mostly for educational purposes, youcanmake such capacitor circuit to work, but again practicality is questionable. Rough process:1. It is best to take full bridge rectifier. Look in datasheet, what maximum pulse current it tolerates.2. Choose current limiting resistor R1, so the maximum possible current does not exceed diode bridge maximum allowed. Lets say around 10A.3. Choose capacitor C1 to set LED current.4. Choose capacitor C2 to be at least 200x bigger then C1, so that C1/C2 divider does not exceed LED forward voltage. Also it needs to be low enough ESR such that at peak pulse current, the drop voltage does no exceed LED forward voltage.It should work reliably, but if your LED becomes open, the capacitor C2 will go overvoltage. So LED should always be connected.Edit: Added R2 for high voltage capacitor discharge, as suggested by SiliconWizard

author: Zero999
author_rank: Super Contributor
timestamp: January 04, 2021, 04:37:13 pm
content: Quote from: Manul on January 04, 2021, 04:26:40 pmThat's good advice, but you'll probably find it's the LED, which is the weakest link, rather than the bridge rectifier.QuoteA capacitor rated to the full mains voltage could be use to solve that problem, but fortunately LEDs normally fail shorted, rather than open.

author: Manul
author_rank: Super Contributor
timestamp: January 04, 2021, 04:43:22 pm
content: Quote from: Zero999 on January 04, 2021, 04:37:13 pmLED is not forgotten. The C1/C2 ratio keeps it safe. I wrote about it.Quote from: Zero999 on January 04, 2021, 04:37:13 pmHigh voltage capacitor will be bulky and expensive at this capacitance, so practicality drops. You are right - LED usually fails short.

author: Zero999
author_rank: Super Contributor
timestamp: January 04, 2021, 07:51:47 pm
content: Quote from: Manul on January 04, 2021, 04:43:22 pmYou're right. When there's a transient, it will form a capacitive divider, which will reduce the voltage to below the LED's forward voltage, during the initial on transient. Eventually it'll charge up, causing the LED to glow. It also has the added benefit of reducing flicker.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 04, 2021, 08:18:45 pm
content: Quick additional note: I'd use a Class-X cap for C1, and a resistor parallel to it - high value such as 1Meg - so that the cap gets discharged when the circuit is unplugged, otherwise it may hold a dangerous voltage across it.Now the proposed bridge above has indeed the added benefit of reducing flicker to a negligible level, whereas your original circuit will awfully flicker. You probably won't be able to notice it unless by a stroboscopic effect, but even so, I wouldn't recommend it: a 1W LED is quite bright already, and flickering at a few 10's of Hz, I don't think it would be ultra safe: seehttps://epilepsysociety.org.uk/photosensitive-epilepsy

author: Zero999
author_rank: Super Contributor
timestamp: January 04, 2021, 09:19:23 pm
content: Good point and talking of safety, the heatsink should be earthed.

author: sansan
author_rank: Contributor
timestamp: January 04, 2021, 09:49:40 pm
content: Quote from: Zero999 on January 04, 2021, 03:50:04 pmMaybe there is a misinterpretation about what I draw. I mean, the1W LEDis the LED power dissipation (specification) figure, not the intended power to use.The led Vf is only 3V. So I still have 2V. I only need about 18Ω or 22Ω resistor, that only dissipating roughly 200mW.It's a cheap LED, I don't think I can find any datasheet anyway..I'm too sleepy right now..Thanks everyone.