Go Down

Topic: AC Light Dimming [success] (Read 39171 times) previous topic - next topic


As there was a question on the necessity of  exactly 45 k resistors (that has been answered already), I just want to make a general remark about the resistors  in a zero crossing circuit like this: Obviously you do not want to make them too small and burn out your optocoupler, but in a circuit like the one discussed here ( http://fleck.rullz.lv/acdimmer/ac_dimmer_220V_circuit.png ), The intention is too keep the optocoupler in saturation until the zero crossing. If one cooses the resistors too big, upon appraoching the zero crossing the voltage might already  have dropped  too much to maintain  enough current through the optocoupler to get a positive spike on the secundary site of the optocoupler circuit. Your interrupt therefore may be triggered a bit before the actual zerocrossing, which may screw up yr timing. In principle it is possible that if you want full power of yr lamp and you would switch it on before yr zerocrossing, thinking you have switched it on immediately after your zerocrossing, your lamp would in fact be immediately turned off again


OK, here is another success story for AC Light Dimming.
I was reading this topic,
ppl there asked about 220V AC Light Dimming, also, I was interested in making this, so I did. this works perfectly for 220V 50Hz mains.

First of all - basics, you can't just use MOC3020 (or similar) to dim AC light, because of sync problem, you need to tell arduino when to turn triac on and when off, if not in time, light will just blink. To do that, in old forum you see opto-coupler H11AA1, it has two LEDs inside, easy to use for AC, thou, H11AA1 are not available here at local stores, so i had to use 4N35 and bridge rectifier!
In this way you just let arduino know, when the phase changes in mains and use that info to toggle opto-triac!

OK, here are the files for this project: http://fleck.rullz.lv/acdimmer/
circuit, arduino code and Lazarus Project to control light! :)

For those with 60Hz mains, you have to change number "34" in line:
My guess would be around 27 for 60Hz, but as i don't have 60Hz mains here, i can't try! If somebody can, let me know, i will update post etc...

Also all comments are welcome, bad and good...

I do it and plugged 220V. Also i uploaded your code to the Arduino Uno. Then i checked LOAD pins with multimeter but there is no voltage. Do i need anything for voltage?


This project runs very well on an UNO.
Is it possible to port the sketch over to ATTiny45 or ATTiny85?
If so, how would one go about handling the timing as the UNO runs at 16MHz and the ATTiny runs at 8MHz?


I used this this device to control Virbation machine in industrial area with 110V 50hz. It has feature to adjust iteslef to work on 220v 60hz. Based on description perfectly fine for light dimming and fan speed control.




if you looking to better tools working with 110V/220 As well with easy and safe to connect and simple to program i recommend you to see this


this device allowing you to control AC voltage "on off or even as dimmer " simply by sending PWM rather than right a complex code which allow you to integrate it with more advance project.

no thing is impossible except that the state of your mind keeps it so...

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131