AC Light Dimming [success]

1cecream:
is it absolutely necessary to use 45K ohm resistors?

Hi there, I've used two 47k resistors of 1/2W. If you check the datasheet of the 4n35 you can find the maximum current and typical voltage from which you can compute the minimum size of your resistors. Then compute the power that it will dissipate and increase resistance until the power is below the rating of the resistor.

I've built the circuit and it works good for all dimming levels. However when I connect the circuit to the mains, there seems to be a current peek or something, making the lamp flash. It also seems to have an effect on the arduino controlling the moc3023 as an interrupt is triggered unexpectedly. Someone can help me to overcome this effect? Is this due to "inrush current" or "snubbing" of the triac?

Many thanks!