Pages: [1] 2   Go Down
Author Topic: AC Light Dimming via Arduino  (Read 4958 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Learning about electriconics one arduino project at a time
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,

I am asking for guidance on whether this personal home project is feasible.

I want to dim my room light via arduino, also using a solenoid to control the physical switch itself.
Would this be a feasible home project, and if so, could someone point me to which specific arduino board to buy?

Thanks,
-
----------------
tofu
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"Dimming" AC power electronically is quite a tricky task.

Manual dimmers are effectively a large potentiometer (actually called a Rheostat).  To do it electronically is somewhat harder.

The accepted method of doing it is kind of like PWM, but with special timing.  The AC waveform is chopped off at certain percentages through its cycle to reduce the power.  This takes special hardware, and interfacing it is not a task I would enjoy.

Your best bet would be to get an infra-red dimmer plate to replace your existing wall switch, and program the Arduino to send the right remote codes through an infra-red LED.  That way you have the remote control as well smiley-wink
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any arduino would work, try an uno
why do you want to control the physical switch?
You can use a triac and with detecting when it crosses zero, dim the lights
I have a lutron dimmer with remote in my room, so btw I couldn't get the infrared to work, its its own protocol and wasn't able to it with ken sheriffs ir library,
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have a lutron dimmer with remote in my room, so btw I couldn't get the infrared to work, its its own protocol and wasn't able to it with ken sheriffs ir library,

You'd want to "record" the IR signal using an IR receiver connected to the Arduino, then you can replay it back again.  That way you don't care what the protocol is.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I tried with that and it didn't work, and I know the hardware worked It did with a normal protocol
I think its a little too complex for that library, it sends like 4-5 different codes in succesion thta aren't always the same
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
Learning about electriconics one arduino project at a time
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the replies!

Also, would the task be made simpler if I use an inverter to turn the AC supply into a DC supply? Forgive me if that is a stupid idea, I'm not the best at circuit design

Ideally, I would like to have the WHOLE light mechanism under my command, switch and dimming.

The eventual plan is to have it voice controlled via a windows app integrating the dragon naturally speaking SDK.

Once again, thanks for the help!

-
--------------
tofu
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mechanical dimmer and small servo to turn it?
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An inverter makes ac out of dc, but anyway probably the easiest would be to get a 12v power supply and use 12v leds strips that you can easily dim with a mosfet and pwm from the arduino
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
Learning about electriconics one arduino project at a time
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tell me if this would work guys.

I would hook up the line to a rectifier, converting the current to direct. I can ground the neutral line, and use an arduino controlled autotransformer/rheostat to achieve the dimming. Does this sound good?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ehh, close
do you have to control the 120v incandescent bulbs? I suppose if you got a mosfet with a high enough vds you could do that, but that wouldn't be the best way, there's no need to make it dc unless you want to power something that needs it
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
Learning about electriconics one arduino project at a time
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well for one im going to switch out my CFL for an LED driven bulb.
Secondly, I would think that the software and hardware involved for dimming a DC LED bulb would be less sophisticated, correct?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Depends if its dimmable, some are some aren't, and some need special way of dimming(which idk about)
I think if you get a dimmable led the easiest way would be with a triac,
You could even make your own switch on the wall with your own ir setup for remote control, just pick a protocol you like or have a remote for and house a little circuit board in the switch box, use those unbreakable plastic plates and drill an ir reciever in it
Logged

Belgium
Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be careful when playing with mains powered lights.
You could rectify the mains but YOU CAN NOT GROUND any rectified DC mains voltage.
This will set any equipment connected to the arduino to mains voltage ( e.g. touching metal parts of the computer/USB connector .... you use to program the arduino will be live) VERY DANGEROUS  !!!!

first experiment with low voltage projects, mains voltage is dangerous to life

Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Out of interest I just came across this circuit: http://pcbheaven.com/circuitpages/Voltage_Controlled_AC_Light_Dimmer/

It transforms the voltage down to 9V with a transformer, full wave rectifies it, then does some jiggery-pokery with a 555 to drive a triac at just the right moments.

Looks an interesting circuit.  I may have to investigate testing it out some time.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12534
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can ground the neutral line

NO!

Don't do it. Don't even think about doing it.

Neutral is not ground. Depending how your supply is connected and what your neighbours are doing, it could be a significantly different voltage. If you connect that to your local ground you make your local ground absorb the current imbalance between the three phases in your neighbourhood. That can easily be more current than your local ground is designed to handle. It might manage it (without damaging anything) but on the other hand you might find that your local ground now has a voltage on it. If you manage that, it could be extremely dangerous.

I strongly advise you abandon any thought of directly manipulating or wiring into mains voltage circuits. Given the level of understanding implied by your proposals, I don't believe you're in a position to do it safely. More worrying, I don't think you appreciate how much you would have to learn to do this safely.

If you haven't been taught to deal with mains voltage electricity, stay well away from it. You only need one mistake to kill you, or somebody else. Either buy a professionally designed device to do what you want, or convert the problem to low voltage.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1] 2   Go Up
Jump to: