Application Example

This application note shows the user how to implement a zero cross detector with a minimum of external components. It should be noted that this solution will not give any galvanic isolation for the microcontroller against the AC mains. The zero cross sense resistor can be a way for electronic noise to get into the system.

This will not be described in this application note. See “AVR040: EMC Design Considerations” for further details on this.

The application uses ATmega16, but the code can be recompiled for any AVR® device.

The example code is written for Atmel®START.

It can be downloaded from the "BROWSE EXAMPLES" entry of Atmel START for both Atmel Studio 7 and IAR IDE.

Double click the downloaded .atzip file and the project will be imported to Atmel Studio 7.

To import the project in IAR, refer Atmel START in IAR. Select "Atmel Start Output in External Tools" → "IAR".