Electronic – arduino – How to test if zero crossing is working

arduinoopto-isolatorzero crossing

I used circuit like this:
enter image description here

On led I get: 3.3 mA and 1.3V

What is the best way to test if zero crossing works with arduino or multimetar?

Best Answer

A simple test is to use a multimeter to measure the voltage on the output. Since it should be PWM you should see something between 5V and 0V. If you see 5V or 0V, then it's not working, but if you see something between the two, it's probably working.

Another option is to connect an LED with an appropriate resistor between 5V and the output, then sweep your eyes across the LED. 100Hz is very low frequency, and it should appear that instead of a solid light streak in your vision there should be a dotted line of light pulses if the zero crossing is working correctly.

Another option is to connect a small, low power speaker and series resistor between 5V and the output. You can then hear the 100Hz zero crossings if it's working correctly.

If you have an arduino, though, it's easy enough to count the number of pulses per second and verify correct operation.