variable relays?

Excuse the correct termonology here. Im trying to make a circuit to control a lamp using my arduino.

With a relay I can use a 5V signal to control a 240V AC lamp, making it switch from 0 to 1 (Off to On) without any problem, but is it possible to get a variable relay, to allow me to dim the lamp?

short of a motor and a wall dimmer I cant think of a nother way to do it?

Does anyone have a better idea? Thanks, Mathew

Does anyone have a better idea?

I typed Arduino dimmer into google's search box. 84,900 results in 0.37 seconds.

yeah i did that too, came up with lots of info about dimming LED's or using a motor to turn an actual dimming switch.

read a few articules on using a relay and timing the on / off power cycle to achive the end result, but I think the clicking would be a bit off putting.

I was thinking something along the lines of an electronic potentiameter (varying a 0 - 5 V line to vary a 0 - 240 line) that can handle AC. But I dont know if such a thing exists. Thanks Mathew

Maybe what you are looking for is a MCU based TRIAC circuit? Try search that to see if you find anything :)

I think you need to look at triac designs.

[edit]Beaten to the draw yet again![/edit]

Some light reading: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=hardware;action=modify;message=4;thread=1274955112 It looks like a fairly poor OCR post, but some useful background and search terms.

But I dont know if such a thing exists.

What you want is a phase angle controller. The mains is switched to the load every cycle. Dimming is achieved by delaying the switch on time at the start of each cycle. There are lots of them about, here is a link to a typical one.

http://uk.farnell.com/jsp/search/browse.jsp?N=500006+1001698&Ntk=gensearch_001&Ntt=phase+angle+controller&Ntx=mode+matchallpartial

It takes a special type of CCFL to be dimmed, they cost more as they have more electronics. If you're using incandescent you'll be ok with a triac dimmer. If you survive. :)