LED lamp driver linear constant current source (Flicker-free!) - Page 1
Forum section: electronics / projects

author: Victorman222
author_rank: Regular Contributor
timestamp: February 13, 2024, 02:35:00 pm
content: Warning! Mains voltage!A simple circuit that is basically a transistor current source which due to the low currents involved in lamp can be used with reasonable efficiency.Some improvements could be replacing TL431 with a regulator that has lower quiescent current which will allow R1 to be increased, playing around with R4 value and LED amount to ensure 'just enough' drop on transistor.On the other hand, to simplify the circuit we could replace the TL431 with a zener but then R1 would have to be a bit lower value.Resistor R2 has to be able to handle the capacitor charging inrush current.The layout fit nicely on a single sided board with unetched back side to improve heat dissipationFor the lamp i used a piece of very thin copper clad laminate intended for multi-layer PCB's and attached it to an old transistor heatsink. Sadly the heatsink rear side is not flat and thus it cannot be glued to make a nice heatsink PCB. Instead some screws and thermal paste were used, so its pretty much held by surface tension.The first one i made is working well for 6 months already and i made two more yesterday, they were tested by running overnight in worsened thermal conditions (lying face down).

author: cosmicray
author_rank: Frequent Contributor
timestamp: February 13, 2024, 03:25:45 pm
content: The SMD LEDs you are using, what forward voltage are they rated ... the typical ~2.5 V - 3 V ?The 2835 LEDs I have been tinkering with are rated ~18.5 V, and very likely because they have 6 LED emitters inside wired in series.

author: pqass
author_rank: Super Contributor
timestamp: February 13, 2024, 04:20:32 pm
content: A few issues...a. resistors are only rated 250V. Since you'll have 340 VDC peak, instead of a 150K R1, use 3x47K (E12 series, or 2x75K for E24) for max. safety.b. the TL431 has a max.input voltage of 37V, although you may get away with it (seehere). Or stack a HV zener orVbe Multiplier.c. 72 LEDs @3V each adds up to 216V. So Q1 has to drop 100V (340-216-4(for R2)-20(for R4)) which will dissipate 4W @40mA(+1W for R2+R4). I hope your Q1 has >100Vce. Also, your LEDs will dissipate 8.6W (216*0.40), so overall not very efficient. Add more LEDs?d. you should thoroughly clean that board with IPA given the high voltage DC everywhere. Doublecheck creepage distance is maintained (6mm in your case assuming 16mm/KV). Those exposed screws seem very close to the LEDs. Nylon instead?And...e.you should put a high value bleeder resistor (2x180K in series) across the HV caps since they'll only discharge 'till LEDs total Vf (216V).Nevermind. You have a discharge path through R1+RV1+R3. You don't want to zap yourself during repairs; at least it's of no danger to others if you keep the PCB in a closed plasitc box (with air holes).

author: coromonadalix
author_rank: Super Contributor
timestamp: February 13, 2024, 05:24:03 pm
content: i don't think its a good idea / project the main transistor will overheat, even at low amps even, under 1 amp .... no isolation what so everdangerous projectits like re-inventing the wheelJust buy a dedicated led driver ... the cheap crapchina will blink when the capacitors are failing, if you have good led drivers, you wont get flicker

author: Victorman222
author_rank: Regular Contributor
timestamp: February 13, 2024, 06:07:06 pm
content: Quote from: pqass on February 13, 2024, 04:20:32 pmThanks for the tips!a. The soviet 1W metal film resistor is 500V max rated, but the boards i assembled had 2x 0.5W(350V max) 75K resistors in series, the resistor voltage ratings was something i considered.b. That hasn't gotten me yet, but i think placing the capacitor C1 that is crossed out would mitigate that, but need to be careful that the charge current doesn't overload resistor.c. Yes, the 72 LED number isn't ideal, but the nominal mains voltage in Ukraine is 220V +10% -15% and at my flat voltage does sometimes drop to 210V, and when i was making this lamp i didn't want any flicker so sacrificed the efficiency. Q1 has 100V Vce so that is definitely sketchy. Another factor here is that the filtering capacitors are very small so there is a DC and ripple component. I measured 50VDC and 16VAC so 72Vpeak at Q1 and 14V on R4 at 30 mA with about 225V in the mains. Perhaps current could be increased slightly but that would just be shifting the drop from transistor to resistor. In the next one i will use a better transistor and try to decrease the value of R4 and redesign the LED board.d. Yes, it will be cleaned. As for the creepage on the driver PCB it is 2.5mm at the worst (that is the pitch of the bridge rectifier), at the LED board it is very bad.e. The tl431 seems to discharge them, couldn't measure anything with meter and no sparks with screwdriver.Overall the thing i took to heart the most writing this up is to show more respect to the mains and high voltages with creepage distances etc. Thanks!

author: pqass
author_rank: Super Contributor
timestamp: February 13, 2024, 06:14:47 pm
content: Rant...How is anyone suppose to learn anything these days if all they do is one-click shop on Amazon?Q: What could go wrong?A: The transistor overheats (due to lack of heatsink capacity), shorts, puts 340V across 470R+100R+LEDs raising the current to 217mA (from 40mA). Which will likely vaporize the weakest LED and the whole string goes dark (the fuse will be fine, of course).There are many products we own with cap-dropper power supplies that are not isolated (LED bulbs). That's not an issue if they are well insulated or within a grounded metal box. Being able to import products into the country gives no assurance they are safe or meet UL/CSA.Nowadays, everthing has a 3 cent MCU. Jim Williams would be so disappointed.

author: Benta
author_rank: Super Contributor
timestamp: February 13, 2024, 07:26:29 pm
content: That circuit is dangerous in another way (ask me how I know...).The combination TL431 + Darlington in that configuration will with 99% certainty oscillate in the 1...100 MHz range (impossible to predict the exact frequency).There are ways to alleviate this, but you're not using them. One is to avoid a Darlington, the other is to add a base resistor.Yes, it'll drop gain, but that's the whole point.Simulate and verify it carefully, otherwise you may kill radio reception in your surrounding area.

author: BrokenYugo
author_rank: Super Contributor
timestamp: February 13, 2024, 08:05:45 pm
content: Not far off conceptually from how the basic LED bulbs work, there the LED string runs just below the rectified mains voltage, the regulator IC just drops enough volts for ripple rejection at lowest expected mains voltage more or less to minimize losses in the regulator. The IC also usually implements some sort of thermal throttling to prevent the bulb baking itself in an enclosed fixture.

author: cosmicray
author_rank: Frequent Contributor
timestamp: February 13, 2024, 08:38:04 pm
content: Quote from: BrokenYugo on February 13, 2024, 08:05:45 pmFrom what I have observed, the chips are run close to their rated current, with a thermal profile also close to the limits. Somewhere I recall reading that the bulbs are designed/intended to be operated with the base up (towards the threads) so that heat being generated will rise away from the chips. One LED chip fails, and the bulb is done for (even if the remainder are functionally intact). To keep the BOM count low, I suspect that many manufacturers are using 18-19 V chips.

author: jmelson
author_rank: Super Contributor
timestamp: February 13, 2024, 11:11:08 pm
content: A properly-designed LED switching driver will have very little flicker. At 100 KHz, you surely won't see the flicker anyway. I have done some lower voltage versions, using some TI LED driver chips. The LEDs have about a 10-15% current fluctuation, due to a series inductor and flywheel diode.Jon

author: Benta
author_rank: Super Contributor
timestamp: February 14, 2024, 12:02:01 am
content: Quote from: jmelson on February 13, 2024, 11:11:08 pmPerhaps you should note the OP's location. There are some limitations on component deliveries.

author: Victorman222
author_rank: Regular Contributor
timestamp: February 14, 2024, 06:35:39 pm
content: Quote from: Benta on February 13, 2024, 07:26:29 pmThanks! Missed that somehow. Measured it (voltage on R4) with oscilloscope and luckily there was no oscillation but i put a 2K resistor and a ferrite bead in series with the base of transistor.Quote from: jmelson on February 13, 2024, 11:11:08 pmYes, the title was making a comparison to the capacitive dropper lamps, a switching led supply is probably the way to go.

author: DavidAlfa
author_rank: Super Contributor
timestamp: February 14, 2024, 06:44:23 pm
content: Linear regulator? This is useless. There're plenty of constant current buck regulators for this.What's going on lately with the revolutionary inventions?