RE: [AVR-Chat] Light dimmer signal to digital converter?
2007-07-16 by Tim Mitchell
Manne Tallmarken wrote: > Hello folks, > > I have a 230 V AC power line that is connected to a light dimmer. I > want to determine how much this signal is dimmed, e.g. what the duty > cycle is (i guess the dimmer regulates the duty cycle?). 8-Bit > precision is enough (or less as well) > > Any suggestions how to connect the power line to the microcontroller? > > My first thought was to connect a resistor and zener diode in series > and an optocoupler over the diode, thereby making it possible to read > the value from the other side of the optocoupler, but all > optocouplers seems to need at least 20 mA through the led which would > make the resistor suffer 4.5 watts... > I have done this before and it doesn't work very well. Domestic-type light dimmers give a very unpredictable and irregular output - it is hard (sometimes impossible depending on what load is on the dimmer) to extract any timing information out of it. You will need to do a lot of work with an oscilloscope and different loads to get an output you can do anything with. My application was non-isolated so we just used some resistors but your optocoupler idea should work (with a lot less than 20ma) - remember that the line voltage is quite low at the start and end of the mains cycle. -- Tim Mitchell tim@sabretechnology.co.uk http://www.sabretechnology.co.uk Sabre Technology (Hull) Ltd, 3a Newlands Science Park, Hull HU6 7TQ Registered in England and Wales no.3131504 t:01482 801003 f:01482 801078