Continuing from my previous post, I will now present the second experiment which is a Zero Crossing Detector using the On-Chip Analog Comparator in ATmega328. Table of Content What is On-Chip Analog Comparator How to Use On-Chip Analog Comparator Zero Crossing Detector Circuit ZCD with On-Chip Analog Comparator Coding Setup() […]

I use this method from the ATmega328p application notes to make Zero Crossing Detector. Please check the following link for more details: https://www.microchip.com/en-us/application-notes/an2508 Simplest Zero Crossing DetectorCircuit The circuit uses two 1Mohm resistors to limit the current to less than 1mA at the microcontroller input port. Then connect directly to […]