Dimming a 220 AC LED-bulb with a 110v DC PWM driven circuit

I got asked to create a dimmer for a Filament dim-able LED (AC 220-240v) Bulb (several of them actually), and i so a looked at doing a zero-crossing detecting circuit and then driving a TRIAC circuit as explained in this instructable, But when i started measuring the bulb (3.5w) i found that only in 1 direction i found about 5M of resistance, from which i came to the conclusion that it is actually a DC-Bulb running on 110-120v
Now that would make the whole thing a lot easier to do, no need for zero-crossing detection, just PWM driven should work.
Outside of the fact the working with Mains power is always tricky and dangerous and i would want to separate the PWM source (an Arduino) using an Opto-coupler, i could let the Opto-coupler just drive a transistor that is up for the voltage and the power.
Now i hope i will get many warnings on what not to do, and advice on how to do this and what parts to use.
And maybe it will be easier just to build an AC dimmer although it is actually a DC bulb.

Come to think of it, aren't these bulb running on half-duty-cycle for starters ?half duty cycle.JPG

half duty cycle.JPG

But when i started measuring the bulb (3.5w) i found that only in 1 direction i found about 5M of resistance, from which i came to the conclusion that it is actually a DC-Bulb running on 110-120v

No such thing as a D.C. filament bulb. Not sure what you have. Do you have a link?
Also if a filament bulb did have 5M resistance in one direction and nothing in the other it would not light anyway.

Ha they have changed the meaning of the word filament. In fact that is a filament “effect” bulb not actually a filament bulb.

Now that would make the whole thing a lot easier to do, no need for zero-crossing detection, just PWM driven should work.

No it won’t.

Deva_Rishi:
Now that would make the whole thing a lot easier to do, no need for zero-crossing detection, just PWM driven should work.

in fact there do exist dimmer boards that take PWM input. I think the have an ATtiny on board (could be another controller), which reads the PWM input and then handles the zero crossing and phase cutting part.

Ok, so that's clear !

https://www.youtube.com/watch?v=qstka-42HUM

https://www.youtube.com/watch?v=NffhdAz9pc4

this answers a lot of questions !

Now that would make the whole thing a lot easier to do, no need for zero-crossing detection, just PWM driven should work.

No it won't.

Clear !

in fact there do exist dimmer boards that take PWM input. I think the have an ATtiny on board (could be another controller), which reads the PWM input and then handles the zero crossing and phase cutting part.

Also clear ! My original thought was to do the zero-crossing using the method advised in the instuctable link i posted, but see if i could control/dim multiple outputs. I would only need 1 zero-crossing detection to drive several Triac's
With the full cycle length at 10ms, i figure the time required to switch a pin will be negligible.
Now the question remains, will the digital dimming of the bulb work, or will the circuitry on the inside of the bulb complicate matters (the youtube showed dimming with an old style analog dimmer..)

Grumpy_Mike:
Ha they have changed the meaning of the word filament. In fact that is a filament “effect” bulb not actually a filament bulb.

ah Yes of course it is ! (i thought the LED would have tipped you off about that) now just for the sake of testing i decide a to put a rectifier bridge in between and there is no visible difference in lighting intensity (actually just a single diode caused visible flashing) so i can conclude that whatever electronics is in the bulb it probably has a rectifier bridge for starters, Now does anyone think PWM dimming will work in between then extra rectifier bridge and the bulb ?

If the bulb is quoted as "dimmable" in its specification, you need to use phase control dimming. So get back to your zero-crossing detector and Triac controller with opto-isolators.

Deva_Rishi:
Now does anyone think PWM dimming will work in between then extra rectifier bridge and the bulb ?

Possibly. At 500 Hz it might work, no faster. Now what are you going to use to switch it? Phase control with a TRIAC would likely be much easier.

And your Subject heading is misleading. It is a 220 V bulb.

Paul__B:
If the bulb is quoted as "dimmable" in its specification, you need to use phase control dimming. So get back to your zero-crossing detector and Triac controller with opto-isolators.

I will the parts are on the way i do need to sort this out one day, the issue i am forseeing is that since i want to receive DMX to determine dimming i will have 2 interrupts going and i figure it may be easier to program the PWM dimming in combination with that.

Paul__B:
Possibly. At 500 Hz it might work, no faster.

what makes you say that the use of an opto-coupler would limit the speed a tad i suppose, my concern is actually that the 100Hz phase cutting may cause flicker but is suppose i could put a rectifier-bridge and a capacitor afterwards.

Paul__B:
Now what are you going to use to switch it?

Well i am far from sure, the high voltage is an issue to be considered mainly and a bit of googling pinted me towards a BU406. If i put the rectifier bridge followed by a fair size capacitor(high voltage of course), drive the BU406 with an opto-coupler circuit (PC817 should do) from a PWM output and put another capacitor between the BU406 and the bulb, then am i overlooking something ? (probably.. )

Paul__B:
And your Subject heading is misleading. It is a 220 V bulb.

Ah yes sorry, but i am intending to drive it with 110v DC, i will correct that, it is sold as a 220 AC but since it has a rectifier bridge in there it is actually both.

Deva_Rishi:
I will the parts are on the way i do need to sort this out one day, the issue i am foreseeing is that since i want to receive DMX to determine dimming i will have 2 interrupts going and i figure it may be easier to program the PWM dimming in combination with that.

Not sure where the interrupts have to do with DMX or whether an interrupt is required for phase control either. In fact, I can't see what advantage an interrupt would give you. :astonished:

Deva_Rishi:
what makes you say that the use of an opto-coupler would limit the speed a tad i suppose, my concern is actually that the 100Hz phase cutting may cause flicker but is suppose i could put a rectifier-bridge and a capacitor afterwards.

A dimmable bulb presumably contains a switchmode down-converter operating at a high frequency - many kilohertz in general. The higher the frequency the smaller and cheaper the inductor and capacitors though the switching transistor and diodes must be capable. Of course the switching transistor must work at about 350 V, so it is a rather critical component which is why I queried what you might propose to use.

So where the switchmode converter is running at a certain frequency and you want to switch it rapidly on and off, you do not want to try to do that at anywhere near the same (order of magnitude) frequency or they will "fight".

Deva_Rishi:
Well i am far from sure, the high voltage is an issue to be considered mainly and a bit of googling pointed me towards a BU406. If i put the rectifier bridge followed by a fair size capacitor(high voltage of course), drive the BU406 with an opto-coupler circuit (PC817 should do) from a PWM output and put another capacitor between the BU406 and the bulb, then am i overlooking something ? (probably.. )

BU406 sounds plausible. 5 Amps should be way more than 5 LED bulbs will draw, 400 V gives a very modest margin over rectified 220 V and it switches fast.

So you drive the BU406 via a PC817 which is nominally rated up to 80 V as maximum. Where are you going to get this driving voltage?

How will you put another capacitor between the BU406 and the bulb? In series? How would that work? Can't put it in parallel.

Deva_Rishi:
Ah yes sorry, but i am intending to drive it with 110v DC, i will correct that, it is sold as a 220 AC but since it has a rectifier bridge in there it is actually both.

What has the rectifier bridge got to do with it? 220 V is 220 V, AC or DC (actually, the peak of 220 AC to which the capacitor charges is more like 310 and that is only if it is 220 and has not floated up to 250 V). It does not become 110 because you rectify it. :astonished:

Not sure where the interrupts have to do with DMX

DMX reception is done using the UART and is pretty much a continuous stream (well except for the 80us break) of Serial data at 250kbps, every received byte triggers an interrupt that stores the byte in the buffer, this is actually a fairly CPU intensive process at that speed. Also the zero-crossing detection would normally use an interrupt, at least that seems easiest to me.

A dimmable bulb presumably contains a switchmode down-converter operating at a high frequency - many kilohertz in general. The higher the frequency the smaller and cheaper the inductor and capacitors though the switching transistor and diodes must be capable.

a what ? ah a small switching power supply so to speak.. yes it might have and that may cause problem, ok so hence the lower frequency.

So you drive the BU406 via a PC817 which is nominally rated up to 80 V as maximum. Where are you going to get this driving voltage?

didn't think that far ahead, maybe another transistor in between ? Maybe i am not understanding the question here, if i apply 6v to the base of the BU406 isn't that going to be enough to open the transistor ?

How will you put another capacitor between the BU406 and the bulb? In series? How would that work? Can't put it in parallel.

ah no of course, silly me that would not work, sometimes (well not just sometimes..) i get confused, i was hoping to convert the PWM signal into something smooth.. nevermind.

BU406 sounds plausible. 5 Amps should be way more than 5 LED bulbs will draw

yes actually driving only 1 bulb should be enough, it being a 5 watt one (the one i have now is 3.5w) i am hoping that the TO-220 won't really need a heat-sink outside of it's package. But of course i am open to suggestions.

What has the rectifier bridge got to do with it? 220 V is 220 V, AC or DC (actually, the peak of 220 AC to which the capacitor charges is more like 310 and that is only if it is 220 and has not floated up to 250 V). It does not become 110 because you rectify it.

again, yes sorry, something about power supply building has gotten me confused (to convert a multipurpose 3 - 12vDC powersupply to act as a 9vAC powersupply i ended up bypassing the rectifier bridge and setting the switch to 4.5v ..) And yes Mains power in Holland has increased from 220v to 240v of the last 20yrs Not just floating up this has been done on purpose to conform to other countries. Anyway, i see now that a DC-dimming solution has other complications that may not outweigh it's benefits (if there are any, well programatically i think there are) and of course i am concerned 'flickering' mainly at low dimming levels and higher frequencies would be less visible, though as long as i don't have the parts for the AC-dimming i can only guess if it will be an issue. (of course the guy who thought of doing a deco thing with those type of bulbs would prefer an answer straight away when he asks 'can you do it ?'

I actually ordered some TIP50G's only 1A but higher voltage (and fast enough as well) wasn't sure about the BU406 max-voltage