Dimming 220V Lamps with Arduino

Hi Folks,

I am pretty new to the world of electronic circuits, so here's me newbie question:
I want to build a dimmer for a 220V Light bulb.

I tried this by using an SSR from sharp (the S202SE2). The SSR is "an integration of an infrared
emitting diode (IRED), a Phototriac Detector and a main output Triac", which seemed good to me.

I connected one side of the SSR to the powered light-bulb, the other side to my Arduino board.
When sending HIGH or LOW voltages, the lights turn on and off, so far so good!
But when I send a PWM signal, the light does dim a little bit, but as pulse width gets smaller, the light starts flickering dramatically instead of dimming... :frowning:
Do i need things like capacitators or so? As I said, my expertise in electronic circuits is pretty low..

I have seen Massimo's post, advising to buy the Vellema K8064 dimmer pack, put it seems like a lot of circuits for just dimming one lamp?

What are the basics I need to know about dimming lamps?

Thanks a lot people,

Marcus

To dim lamps using PWM, you need the triac to switch on and off part way through the sine wave... Most SSR's are designed not to do this--they switch one and off at the zero crossing, since switching on and off during the posiitve or negative rise of the wave generates scads of noise. There isn't a really easy way to do what you want to do... See Light dimmer circuits link for an explanation of how dimmers work.

If I were goign to attempt it, I would try using an existing commercial dimmer pack with an analog control signal input, and send it a voltage to dim the lights.

Another option would be to hack an existing domestic dimmer, and replace the variable compoenent with an optically isolated resistor or something like that. Here is a link to an infrared-controlled dimmer.. the Arduino could send control codes via infrared, which is a great idea, since the Arduino and the AC are separated. http://store.qkits.com/moreinfo.cfm/K6712

Options that aren't optically isolated are very messy, as you run the chance of the AC feeding back into your Arduino, with ensuing kaboom! There really isn't a cheap and fast solution to this, unfortunately. Maybe someone else has the quick and dirty solution?

Here are some commercial solutions, fwiw. Note the big inductors, to reduce noise.

http://www.pwrseries.com/brochure/dim.htm

Solid State Dimmer Module here: Blue Point Engineering Inc. - Control Device Product - Add on's

Thanks Daniel for your quick introduction to dimmers.
Now I see more the core of the problem.

For my use it will be probably best to buy a straight-out-of-the-box solution. I am thinking of buying a velleman K8064 dimmer kit that Massimo had suggested in another post. It's is a dc-controlled dimmer with an optical-isolated control-voltage input.

Another possible idea has come to mind:
What happens if I drive a classic light bulb with for instance 12V or 24V DC?
If this would work, I wouldn't have to worry about the zero-crossings from the AC and simplify and cheapen my design.

Marcus

Hi

the Velleman dimmer looks perfect-- it has an optically isolated input, so things are safe. And Massimo is always right, so whay not go with it? :slight_smile:

With DC, yes you could just send the PWM signal to a "big honking" Mosfet, as we say here, and let it amplify the PWM signal. The downside is that is usually takes a while to get those ciuits right. You would still need optical isolation, the input matching from the optoisolator to the MOSFET driver, the MOSFET driver, and then maybe some inductors to kill the noise. Small light bulbs would be a snap, but larger ones, on the order of a few amps, would present more problems. Any time I have tried to save money that way, I usually end up blowing $20 in FETS before I get a reasonably good design!

One other possibility is to use a darlington circuit with a 2N3055 as the output, but that geenrates a lot of heat. That's how they switched big DC loads back in the 70's... not that I remember that far back, but I've seen pictures, and talked to people who were there. :wink:

These links will give you the gist of a 2N2055 based dimmer circuit:

http://ourworld.compuserve.com/homepages/Bill_Bowden/page6.htm#eyes2.gif

interestingly, they don't have a lot of inductors and the like... so maybe it will work!

good luck...

Thanks for the links and repy :slight_smile:
Being that electronica (but not digital) newbie, I have decided to go out and buy the Velleman 8064 kit downtown. It cost me actually only ? 17,95. So I guess I saved out on frying 20$ worth of MOSFETs. (Not to mentioned converting schematic design into a real circuit).

It took me 2h 45 minutes to build it (I was very thorough and careful). I hooked it up to the 220V mains, lightbulb and Arduino board, with a small capacitator in parallel and TADA! An Arduino-controlled dimmer. : ))))

Next day I bough another 3 kits, and the next kit took me only 1h 20minutes to build...
So it's well worth getting one. :slight_smile:

To all that read this post, here is another converted Massimo-believer (yes, he is always right) and a supporter of the Velleman K8064 kit.

Marcus