PLEASE HELP~ How can I dim two 220v ac lamps?

I am live in hong kong....and very newable in arduino....
I want to use arduino to do a interactive installation, and using a infared distance senser to dim 2 ac lamps. how can I do it?

this is no budget project...I can't buy very expensive hardware....thank you :cry: :cry:

I have a sharp infrared sensor, GP2Y0A710YK0F

you may want to look for a chinese forum for arduinos, or start your own! ubuntu server + phpbb + modx cms!

to get you start find some solid state relays that are designed for 220v ac, then use PWM (pulse width modulation) to dim them.

test it with LEDs first, and check the arduino guides! then find some solid state relays

find some solid state relays that are designed for 220v ac, then use PWM (pulse width modulation) to dim them.

Sorry this will not work. Solid state relays switch off only at the zero crossing points. Therefore once a PWM switches it off it will stay on for the rest of the mains cycle and not dim.

Get an AC dimmer and feed it with a variable voltage derived from a PWM signal that has been filtered to take away the high frequency components.

grumpy_mike, isn't that why you'd want to turn on the SSR with the PWM and also would require a zero-crossing detector? The concept is to turn the SSR on at a time X after zero-crossing and off ASAP so the SSR really turns off at the next zero-crossing. I know this is how it works using Triacs.

Another option I was thinking about would be to take a standard light dimmer and change out the dimmer POT with a digital POT and some kind of isolation to keep Arduino away from the AC voltages. The OP doesn't come across as being electronically or electrically savvy so keeping it to mostly off-the-shelf parts is probably best. Maybe even X10 based for the dimming if there's a 220V version.

i would use
12V LED lamps, which use not so much power (2W for a "60W-light"),
and a L293 (1A driver) (or a thyristor/transistor or so) at a arduino PWM pin...

u would need a 12V voltage source (PSU), which should be properly shaped, so that u dont waste the saved energy in that PSU... :slight_smile:
a Switched-mode power supply would be fine, i think...

If I use 12V power, can I use 100W light bulb?? because I need to light up a big model....about 1.5m high....

hm - the LED light sources use much less power (just 10%)...
so u only have to power a 10W load, if u want "100W light"... :slight_smile:

an Incandescent light bulb - Wikipedia incandescent light bulb, that uses 100W electricity produces 110cd (110 candela).

there are single LEDs with up to 60cd at just about 10% of the electrical power...

when u combine several LEDs, u can get a light source that is as light as an incandescent light bulb, but it produces less heat, which might be good for ur model...

these r LED light sources from ebay.com:
650lumen
http://cgi.ebay.com/NEW-10W-HIGHPOWER-WARM-WHITE-STAR-LED-650-LUMEN-12V-USE_W0QQitemZ250347335688QQcmdZViewItemQQptZBI_Electronic_Components?hash=item250347335688&_trksid=p3286.c0.m14&_trkparms=72%3A570|66%3A2|65%3A12|39%3A1|240%3A1318|301%3A0|293%3A1|294%3A50

"30W" http://cgi.ebay.com/3-x-36-LED-Day-White-light-bulb-12V-MR16-spot-lamp_W0QQitemZ360121467172QQcmdZViewItemQQptZUK_Light_Bulbs?hash=item360121467172&_trksid=p3286.c0.m14&_trkparms=72%3A570|66%3A2|65%3A12|39%3A1|240%3A1318|301%3A0|293%3A1|294%3A50

The concept is to turn the SSR on at a time X after zero-crossing

Yes it is but a solid state relay don't work like that. It has a digital input that turns on the load as soon as you apply a logic input.

only have to power a 10W load, if u want "100W light"

Bollocks. >:(
Using LED for high level illumination is difficult and not one for a beginner. It is not just a matter of supplying voltage to it you have to control the current and with high current LEDs you can't just put a resistor in line. Then you have to get rid of the heat with a massive cooling system. Yes you can do it but it is complex.

thank you all~ and 10W led is very very expensive.......

Can i diy something like K8064?? DC controlled dimmer?? any idea??

I can't find K8064 in Hong kong... I asked a shop to order, but they say I need to order 10 in one time......

no budget....

is it this: http://store.qkits.com/moreinfo.cfm/K8072 ?
it looks like it uses a mechanical relay (or what is it in the right lower corner?)...
a mechanical relay cannot be used as a dimmer...
and it costs about 32USD...

they ship to asia, too: http://store.qkits.com/shipping.cfm
but it costs 42USD...

@Grumpy_Mike:
and why can i just turn on my 60 LED lamp and light my bedroom (i mean, if others can't, why can i... my bedroom is at least 2m high...)...?
and what heat? isn't it true, that those glowing coils in conventional light bulbs get very hot (they can burn cotton through a vacuum and the glass hull)...

is http://www.apogeekits.com/light_dimmer.htm

hm - ok - it looks like the recommended "solid state relay"...

but:

  1. it is still expensive (33USD)
    and
  2. it needs a 12V control signal (0V off? ... 12V on?)...

That apogee kit looks like what I was going to suggest. Use a digital pot for the control voltage.

According to the manual for that unit. It can use 0-12v for control, or 0-5v.

ok - i read the manual of that thing and it can be used for 0V..5V...

but:
1.
the arduino doesnt have an DAC, so that we will need a further device, that transforms a digital value or a PWM signal into an analog value...
and
2.
that apogee kit needs assembling and possibly has dangerous voltage levels at some contacts, so that u need to be much more careful than with a 12V PSU...

find some solid state relays that are designed for 220v ac, then use PWM (pulse width modulation) to dim them.

Sorry this will not work. Solid state relays switch off only at the zero crossing points. Therefore once a PWM switches it off it will stay on for the rest of the mains cycle and not dim.

that's exactly how you need it to operate. For example, 60Hz is a ~16mS cycle and so one cycle(zero to zero) would be 8ms. If you want a light at 50% power, turn the SSR on(pin x high) at tZeroCrossing+4mS and make sure to turn it off ~1mS later so when it hits the next ZeroCrossing it turns off. Repeat.

Since the OP mentioned 100W lightbulb to light the model, that's less than 1A at 110V, .5A at 220V so a small 3A rated SSR should do the trick.

It was recently done but with triacs instead of SSRs for a much cheaper solution but does require wiring/working with HighVoltages in a breadboard configuration so the SSRs are better for a rookie. Hey, maybe the OP can ask if the guy will breadboard him a dual unit for $50 and ship it.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861/0

And remember I mentioned X10? This guy got parts from eBay, one of them was the RS232 driven FireCracker RF modules and he write an Arduino interface so he could dim X10 modules.

http://www.instructables.com/id/SYNSWRSFMMD5UZ4/

And you know, there is always the option of using 2 R/C Servo motors to turn/move a standard dimmer switch. This option is really a mechanical interface so all of the electronics are low voltage Arduino hookups and there are dozens of servo sketches out there. There's still the Arduino coding but that's not going to kill ya. :wink:

Doug

33USD is ok for me....but can't find in hong kong... :-/

And you know, there is always the option of using 2 R/C Servo motors to turn/move a standard dimmer switch. This option is really a mechanical interface so all of the electronics are low voltage Arduino hookups and there are dozens of servo sketches out there. There's still the Arduino coding but that's not going to kill ya. Wink

YES~ this is also a method~ thank you~~ But i want to more direct to control the dimmer. Because I want the light have dimming pattern, like breathing :slight_smile:

YES~ this is also a method~ thank you~~ But i want to more direct to control the dimmer. Because I want the light have dimming pattern, like breathing

Servo's rotate and your software controls the rotation. So for breathing, you would rotate the servo back and forth which would turn the simmer knob back and forth. If you can turn a dimmer knob to simulate breathing with your fingers, a servo can do the same.

Do you know how to program software at all?

Doug

that those glowing coils in conventional light bulbs get very hot

Yes they are designed to withstand the heat far in excess of heat the that solid state electronics can stand.

If you want to see what you need to get heat from a high power LED look at this thread:-

http://www.candlepowerforums.com/vb/showthread.php?p=2642422

As for the origional question please read:-

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861

and

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228160907/29#29

Note 120V lamps are very similar to 220V lamps when it comes to dimming them.