Zero crossing detector hardware.
Posted: Sat Nov 11, 2017 3:48 pm
If you want to pick up the zero point of the AC mains, a novel method (see attachment) is to use an opto isolator with two emitters reverse connected in parallel. The only time a positive signal is available, is when both LED emitters are not conducting (mains is at zero).
RB0 interrupt will be evoked every time the AC gets to a zero condition.
The main transformer uses a diode to supply the rest of you circuitry via the 5v regulator so no extra transformer is required.
Uses -
Light intensity control
Accurate timing (divide by 50 for 1 second action (60 USA)
Counting
Mains synchronizing (Grid inter-tie etc)
State programming - Allows an interrupt to gather I/O information. Could eliminate the requirement to use input icons making the program easier to read.
RB0 interrupt will be evoked every time the AC gets to a zero condition.
The main transformer uses a diode to supply the rest of you circuitry via the 5v regulator so no extra transformer is required.
Uses -
Light intensity control
Accurate timing (divide by 50 for 1 second action (60 USA)
Counting
Mains synchronizing (Grid inter-tie etc)
State programming - Allows an interrupt to gather I/O information. Could eliminate the requirement to use input icons making the program easier to read.