Phase shift mains AC to de-flicker LEDs - Page 1
Forum section: electronics / projects

author: Lupin III.
author_rank: Contributor
timestamp: March 20, 2020, 12:18:06 pm
content: I have a few COB LEDs with integrated mains "power supply" (like these:https://www.ebay.com/itm/20W-LED-COB-Chip-110-220V-Smart-IC/232273725866). They are really cheap. Maybe not the best for living room ligthing, but definitely good enough for shop or workbench lights. The only problem I got with them is that because they ride the mains voltage sine they have visible flicker when you move your eyes quickly.So I was thinking, if you get two of those, but shift the mains AC phase to one of them by a series capacitor, the visible flicker could be substantially reduced. Similar to how you create another "phase" with a series capacitor if you want to run a 3-phase motor on a single phase.This should work, but what value capacitor would I need approximately to shift enough for a 20, 30 or 50W COB? Would something similar work with an inductor in series to shift in the other direction?

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2020, 12:28:15 pm
content: Stupid question: why not just use LEDs with a proper filter capacitor which doesn't flicker?Trying to bodge crappy LED drivers isn't worth the expense.

author: Circlotron
author_rank: Super Contributor
timestamp: March 20, 2020, 12:37:08 pm
content: Maybe put the mains into a bridge rectifier and filter capacitor then feed this dc to the LED lamp.

author: richard.cs
author_rank: Super Contributor
timestamp: March 20, 2020, 01:45:47 pm
content: Quote from: Lupin III. on March 20, 2020, 12:18:06 pmThis was historically done on some fluorescent fittings. One tube with an inductive ballast and one with a capacitive one so the two flicker out of phase. I suspect for what you want a better LED driver would be the preferred solution (by far).If you do want to try it I suspect your first step should be to de-goop one and reverse engineer the supply circuit used. This might work without modification from DC, though this is far from guaranteed. Almost certainly they just conduct over the top portion of the AC waveform and if they regulate current at all they may do so at a value that blows them up if you go to 100% duty cycle by feeding them DC. Note that you will need to drop significant voltage across your reactance to get a phase shift approach to work, this might mean running 110 V devices from 220 V, which means if you're in a 110 V country the idea may be unworkable.

author: Lupin III.
author_rank: Contributor
timestamp: March 20, 2020, 01:52:01 pm
content: Please stay on topic. If you know it won't work, tell me why. If you know it will work and how to calculate the capacitor value, I would appreciate it as well, if you'd tell me. But "Why..." or "Why not..." is not helpful.Quote from: Zero999 on March 20, 2020, 12:28:15 pmPutting a capacitor that costs less than 1€ in series with a <2€ LED is hardly an expense, neither in time nor money.Quote from: Circlotron on March 20, 2020, 12:37:08 pmThe drivers need the off-time, because that's what they are built for. On DC they'd overheat. Also a bridge rectifier and a smoothing cap for an up to 50W device would be quite big.

author: Lupin III.
author_rank: Contributor
timestamp: March 20, 2020, 01:57:26 pm
content: Quote from: richard.cs on March 20, 2020, 01:45:47 pmThe circuit is simple it's pretty much a one-chip solution per 10W of LED string. The flicker comes from only conducting when the mains sine is higher than the foward voltage of the LEDs, then the chip starts regulating the current. I'm in Europe, so 230V. If I go by AC motor running caps they are in the order of a few µF for motors <100W to create the shifted phase. Would the a cap for the LED load be in the same order?

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2020, 02:28:17 pm
content: No one can answer the question because there isn't enough information.Do you know the internal schematic of the LED driver?If it's a capacitive dropper, all a series capacitor will do is reduce the brightness slightly.If the driver has a bridge rectifier on its input then adding an extra capacitor to the output or running it on DC should work.My advice is to avoid cheap LEDs like that because they often fail prematurely. Cheap often doesn't save money in the long run.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 20, 2020, 02:39:09 pm
content: Quote from: Zero999 on March 20, 2020, 02:28:17 pmAs far as I can tell they are like LED light bulbs, if they fail you throw them out as they are only about $1-2 each.OP, I do think it's a bit like the Irish road directions: If you want to go to X, I wouldn't start here if I were you.

author: StillTrying
author_rank: Super Contributor
timestamp: March 20, 2020, 02:46:14 pm
content: vintageteardown.com/teardown/50w-cob-led-with-module-integrated-driver/

author: richard.cs
author_rank: Super Contributor
timestamp: March 20, 2020, 02:52:36 pm
content: I've attached a very simplified LTSPICE model.The LED is modelled as having a forward voltage of 250 V, an on-resistance of 100 Ohms and an active circuit limiting the forward current to 200 mA. You would need to tweak this to match your LED and drive. Run the model and plot V(line,neutral) and I(I1).I find that if I put a capacitor in series then about 4u7 will shift the conduction earlier by around 1.2 ms, which is only 22 degrees. A smaller capacitor shifts it further but also significantly limits the LED current. A series inductor of around 500 mH (huge!) will shift it about 1.5 ms, around 27 degrees, the other way before the LED current starts to drop.If I change the model to be closer to a 110 V device (say 130 V forward voltage, 50 Ohms on, 400 mA limiting circuit) then I can put in greater X:R ratio before the LED current starts to drop and I can get phase shifts of around 90 degrees each way but there is a strong danger of just blowing up the active current source feeding a 110 V from 230 V like this. Essentially youmusthave enough series reactance to drop it out of regulation or as soon as the current source starts to cut in it will increase the voltage drop and be destroyed (unless they use the high voltage components in the lower voltage models).TLDR: You can simulate it. You can't phase shift 230 V ones enough to matter without seriously dimming them, and whilst you can phase shift 110 V ones enough you can't allow the driver to operate without risking destruction so the only thing you're gaining over a driverless device is the rectifier.

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2020, 02:55:08 pm
content: Quote from: greenpossum on March 20, 2020, 02:39:09 pmThe trouble is the damage they might do, when they fail: think fire and smoke.My advice is for the original poster to return them to the seller, giving flicker as a reason why they're unacceptable and demand a refund. Sellers shouldn't get away with selling crap like this. It's not the buyer's responsibility to fix defective goods.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 20, 2020, 02:55:36 pm
content: Quote from: StillTrying on March 20, 2020, 02:46:14 pmThat website was blocked by my browser because of an expired HTTPS certificate.

author: StillTrying
author_rank: Super Contributor
timestamp: March 20, 2020, 03:01:20 pm
content: That website was blocked by my browser because of an expired HTTPS certificate.Me to, but I just clicked past the warnings.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 20, 2020, 03:12:00 pm
content: Here's a safe website with a link to a long YouTube video teardown:https://hackaday.com/2019/02/15/cob-led-teardown/

author: StillTrying
author_rank: Super Contributor
timestamp: March 20, 2020, 03:24:10 pm
content: Here's a safe websiteLOL I'm checking suspicious websites all the the time, that one isn't.LED drivers are BP5132H.

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2020, 03:32:43 pm
content: Yes, I do remember Big Clive doing a video now, but he didn't reverse engineer the schematic.Looking at the photograph, there appears to be a full wave bridge rectifier on the top right hand side of the board. Adding a suitable 400V rated capacitor across the DC side should reduce the ripple greatly, as well as increase the duty cycle, hence the brightness. The downside is it will get hotter more quickly. Hopefully the driver will have some over temperature protection and reduce the current, otherwise it will fail more quickly.A better approach would be to power it off a DC power supply with a lower voltage, than the mains peak voltage but, it's still more sensible to use a higher quality LED lamp, rather than cheap crap.

author: tunk
author_rank: Super Contributor
timestamp: March 20, 2020, 04:06:04 pm
content: Diodegonewild have also looked at them (including schematic):

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2020, 04:18:17 pm
content: Oh, I also forgot to say:The metal circuit board must be earthed for safety's sake. It's also quite likely they don't meet the bare minimum safety standards as they will lack sufficient insulation between the live parts and earth. If you mush use them, then I repeat, ensure the aluminium board is properly grounded!

author: Lupin III.
author_rank: Contributor
timestamp: March 20, 2020, 06:16:29 pm
content: Quote from: richard.cs on March 20, 2020, 02:52:36 pmThanks Richard. I'll try that out. Even a 22° shift may already make a difference, since the "dark time" will be shorter. The flicker is at 100Hz, assuming the LEDs conduct about half of those 10ms, so 5ms, a 1.2ms shift is considerable.Quote from: Zero999 on March 20, 2020, 04:18:17 pmI know this, which is why the heatsink IS already earthed. And not only that, the COB is in a plastic/glass lamp housing (with vent holes for airflow), so the heatsink can't even be touched unless you poke throuh the holes with a screwdriver.

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 20, 2020, 07:26:06 pm
content: May not be possible, depending on the driver. Some turn off the entire array when the voltage gets too low. More efficient ones will switch in various banks to drop more voltage as the input voltage rises. If you have one of these, then supplying a lower DC voltage will be fine and won't overheat the driver. If you have the former, then you may risk overheating it by running on DC.Getting 230V or 120V DC isn't particularly easy. Perhaps a dimmer circuit into a bridge rectifier + cap would work, but the peak current might kill the dimmer.Your phase shift idea is an interesting one but I don't think there's an easy way to do it. Phase shift by inductor or capacitor implies an attenuation in the signal (see any RC or LR bode plot). Then again consider overpowering the module; if you use a diode to switch over to your shifted AC, then you're power the module for more % of the time.As for questions about why this project should exist, I agree with Lupin that they're unhelpful. I see this all the time on the forum. Some people just want to hack things, and they don't need to justify that to the world.

author: strawberry
author_rank: Super Contributor
timestamp: March 20, 2020, 07:50:59 pm
content: I recommend reduce LED bulb/TV current by ~20% to double useful life. As manufacturers push them to the limits to earn more money.PFC choke could boost voltage up to LED threshold level and therefore limit fliker

author: Someone
author_rank: Super Contributor
timestamp: March 20, 2020, 09:51:15 pm
content: Quote from: Lupin III. on March 20, 2020, 01:52:01 pmBut asking for everyone else to donate their time is no expense....Quote from: Lupin III. on March 20, 2020, 01:52:01 pmHow do you know it will overheat on DC?....Quote from: Lupin III. on March 20, 2020, 01:52:01 pmIf it does overheat on DC then they have set the current limit to work with the rectified AC duty cycle, run it on DC and adjust the current limit so the heating (RMS) losses remain steady (or lower).As mentioned above modifying a badly designed bargain priced device is usually a loss making exercise, throwing good money after bad (https://en.wikipedia.org/wiki/Sunk_cost#The_fallacy_effect). Any solution is likely to cost more in time and resources than simply buying a more appropriate device to begin with.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 20, 2020, 09:59:09 pm
content: Quote from: StillTrying on March 20, 2020, 03:24:10 pmI'm not worried about my browser, but I don't want to support sloppy websites and their sloppy maintainers.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 21, 2020, 01:11:16 pm
content: Connect a large capacitor in parallel with the bridge rectifier, then connect another capacitor in series with the AC input to limit the current. (Use an AC power meter to check if you got the right value, making sure it's the same or lower compared to the unmodified power usage.) It might be more economical to use a series inductor if you're supplying a lot of modules.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 21, 2020, 02:30:19 pm
content: Think about the fundamental physics:The flicker happens because the mains cannot provide power to the LED during low line voltage part of the period.How do you "shift phase"? By adding a delay. How do you add the delay? Bystoring energyand releasing it.Now, how do all the proper, non-flickering LED lights work? By storing energy! No special gimmicks required: just add the filter cap to the rectified mains. Buying non-flickering lamps off-the-shelf obviously solves the problem. If you want to bodge the existing drivers, I'd just try to find where the DC link is and add capacitance there.

author: Zero999
author_rank: Super Contributor
timestamp: March 21, 2020, 02:35:46 pm
content: Quote from: Lupin III. on March 20, 2020, 06:16:29 pmGood, but that might not be enough.The PCB probably doesn't meet the necessary requirements of creepage and clearances. Earthing shouldn't actually be required for safety. It's there in case the insulation fails. The insulation should be robust enough to withstand high voltage transient spikes due to lightning.https://www.smps.us/pcbtracespacing.htmlPoor insulation also increases the risk of fire. Is the housing flame retardant? I hope so.

author: Circlotron
author_rank: Super Contributor
timestamp: March 22, 2020, 01:52:56 am
content: Possibly the simplest and most effective, yet hopelessly too expensive method would be to have after the input bridge rectifier a choke input filter and then a big electro. If the choke is big enough the dc voltage will be 90% of the rms voltage or about 63% of the peak AC voltage. The led driver might be perfectly happy running continuously on this lower voltage. Added bonus is the choke (again, if big enough) would protect the circuit from mains borne transients and spikes. But like I said, unlikely to be cost effective. You could of course have an external bridge, choke and electro big enough to power a large number of lamps. That might change the cost effectiveness somewhat, especially if it contributed to longer lamp life because of lower voltage and no mains nasties.Edit -> of course, at switch on the LC output might resonate up to double voltage for a moment...

author: Zero999
author_rank: Super Contributor
timestamp: March 22, 2020, 10:40:14 am
content: Quote from: Circlotron on March 22, 2020, 01:52:56 amPerhaps a fluorescent ballast would do the trick? If you're lucky you can quite often get them for free from the tip. They're currently throwing lots of them away where I work, as they upgrading the lighting to LED, but I have no use for them..

author: Circlotron
author_rank: Super Contributor
timestamp: March 22, 2020, 12:01:18 pm
content: ^^ I know that mercury arc ballasts have a gapped core, so they will tolerate DC. I expect that fluoro ballasts are the same. Good suggestion!

author: Lupin III.
author_rank: Contributor
timestamp: March 23, 2020, 05:50:39 pm
content: Quote from: richard.cs on March 20, 2020, 02:52:36 pmTook some convincing to get LTSPICE to model this without getting stuck in the simulation. It really doesn't like the mains source to be connected via a capacitor only. A few 1Meg resistors to connect "floating" parts of the circuit did the trick. I also replaced the Zeners by a voltage controlled switch (controlled by the rectified mains) and another voltage source to simulate the forward voltage of the LEDs. Makes everything very adjustable to fit reality.The output power drops quite a lot with the phase shift. On the other hand it doesn't really matter that much if the LEDs run at half the power considering how bright they are. If I find some inductor to shift a second LED the other way a little bit, I got the same output power with less flicker and longer LED life.Quote from: NiHaoMike on March 21, 2020, 01:11:16 pmThat's another nice idea. Now that I got LTSPICE running I'll see what approximate component should be.To those still saying "it's not worth it" or "just get proper LEDs". The LEDs are totally fine for general lighting use, even with the flicker. This is a project to hack something, to try things out and learn something. I fully intend to use components from parts bin or old PCBs, unless they'd cost me less than a Euro per LED. If I can't do it that way, so be it.Quote from: Zero999 on March 21, 2020, 02:35:46 pmAll three phases to the home are equipped with surge protectors. There are RCDs on all circuits. The lamp is screwed to a concrete ceiling, the room is pretty much occupied all the time when the light is on.But you gave me an idea. Building a 3-phase lamp! No flicker anymore! I'd just need to run a few additional wires from the outlets. The only problem: I don't need a sun in my workshop.

author: Zero999
author_rank: Super Contributor
timestamp: March 23, 2020, 07:26:46 pm
content: If you have a three phase power supply, then the obvious solution is to put each LED lamp on a different phase. This is often done with old fluorescent and discharge lamps in large offices and factories. The lamps themselves will still flicker of course, but the light in the room not so much.If you want to hack, then how about making your own LED lamp driver?

author: Poe
author_rank: Frequent Contributor
timestamp: March 24, 2020, 02:06:32 am
content: I simply increased the flicker frequency by adding additional off time and compensated by increasing the current during the on-times.So instead of receiving a constant ~13W for ~6ms, then off for ~2ms near zero-cross (75%DC @120Hz)...I drive it with ~20W for 2ms after Vin >30V, then off for 2ms near Vpk, then repeat until under 30V. It's basically off for 50% of the time with a frequency of 240Hz.Power is about the same. Largely eliminated the visuals by just adding a few passives to the existing drive circuit.