# analog light dimmer circuit connected to microcontroller

Discussion in 'Microcontrollers, Programming and IoT' started by arisu1love, Oct 26, 2010.

1. ### arisu1love

10
0
Oct 26, 2010
Hello everyone, I need help to modify this light dimmer circuit which is connected to PIC12C508 microcontroller. This circuit is designed for the 120Vac main line. Is it possible to modify it to suit for 240Vac main line? Can anyone please give me a guideline on how to modify this circuit for 240Vac?

2. ### Resqueline

2,848
2
Jul 31, 2009
In principle: double RV1 voltage rating, double R1 resistance, halve C3 capacitance. A 60 to 50 Hz change will modify the C3 factor by 20% but it's not really that critical.
Q1 seems to be a 400V device. It will hold but not with much to spare (for spikes) so be prepared for it to short out in a year or four, or exchange it for a 600-800V triac.

3. ### arisu1love

10
0
Oct 26, 2010
Thank you for your help! Would you care to explain the theoretical calculations behind the changes in the values of components for 120Vac to 240Vac? I would like to understand more on how you knew that you had to double this and half that.

Sorry, I am quite weak in understanding electrical circuits....

4. ### Resqueline

2,848
2
Jul 31, 2009
Varistors are transient (spike) absorbers and are chosen on basis of the intended peak mains voltage. Doubling the mains usually requires doubling the rating of these.
R1 protects the rectifier/ power supply from high-frequency (transients/ spikes). Again doubling the mains has the potential of allowing twice as high spikes appearing.
C3 has a specific impedance at a specific frequency. It works as a loss-less dropping resistor for the following rectifier-zener circuit. In order to maintain the same current flow with double the voltage drop it needs to have a twice as high impedance.
Capacitor Impedance: Z [Ohms] = 1 / (2 * pi * f * C) where pi = 3.14, f = 50 or 60 [Hz], C = 0.0000001 [Farads]. Ohms Law: I [Amps] = U [Volts] / R [Ohms]

5. ### arisu1love

10
0
Oct 26, 2010
Thank you very much for your explanation, now I understand more. I will try to source out the necessary replacement components and build this circuit to work for 240Vac.

Is there a need to consider for other parameters such as the surge current rating for the triac besides the voltage rating?

Last edited: Oct 27, 2010
6. ### Resqueline

2,848
2
Jul 31, 2009
I guess the triac is a 4A unit. That'll amount to twice the lamp wattage on 240V mains. Surge? Idk., triacs are basically pretty much the same all around afaik.