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
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...
a Switched-mode power supply would be fine, i think...
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...
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.
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...
@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)...
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.
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.
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.
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
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.