Zero crossing detection circuit code

DO i need to consider the input frequency when writing the code?

Hi,
You will need to input to the controller a reference pulse that represents the zero crossing point in the AC you are going to control.
You use an Interrupt on that input, so that the sketch will stop and note when it has occured.
Then use this as the reference point for your phase control.
You can work the frequency out from this as well.

Tom.... :slight_smile:
There are a number of SCR motor control projects that do this, use the search box in the top right hand corner of the page to look for SCR or phase motor control, also gargle (google) it.

http://openenergymonitor.org/emon/

I know this site has a lot for energy monitoring.

uncleeee:
DO i need to consider the input frequency when writing the code?

What code?

How to use this forum