Welcome Guest, you are in: Login

Fruit Of The Shed

Navigation (Circuit Ideas)






Search the wiki

»

Page History: Really Simple Zero Crossing Detect

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2016/11/29 14:18


!!! WARNING, THIS CIRCUIT DEALS WITH POTENTIALLY LETHAL VOLTAGES !!!

If you don't feel confident in doing this, best avoid trying unless you have a low power AC source (a transformer, signal generator etc...). You will need to lower the value of the input resistor accordingly.

Zero crossing detect circuits are used to indicate the point at which an AC signal swings from positive to negative swinging through its zero volt point.

This might be to allow the switching of current or audio at a nice place to prevent interference or current surges etc.

These are my thoughts on a really simple ZCD circuit which I got down to three components! I used a dual opto-coupler with 2.5Kv isolation, a big resistor to drive its LEDs via the mains and then paralleled the transistor outputs. Remember Mains is usually given as RMS which means you'll need to divide by 0.7071 to get the peak voltage you can expect on the input. In the UK, Mains is 240v RMS which gives about 340v peak. The main resistor is 150K which gives about 2.2mA maximum at 340v. But the power dissipated across it is about 0.77W. for long term use you should be looking at a 1Watt resistor here. I didn't have a 1W device so for the sake of the test and as it was only for a few minutes I used a 0.5W resistor. It does get noticably warm during 10 minutes of use at mains power so my fears are justified here - DON'T TEST THIS WITH THE POWER ON!!!

For the later tests I operated this with 20V P-P and it was good to 1Khz... the pulses tend to flatten out a lot above that. If you want faster edges on your pulse, you could place the output onto the base of a small transistor which would then form a Darlington pair with the two in the opto-coupler. This transistor would "saturate" at about 0.6v which would sharpen the edge and make it much more responsive to the changing voltage - I haven't tried this though as I was more interested in getting a tiny component count. You might like try/comment... Best pulse shaping would be achieved with a Scmitt trigger device, either an inverter or similar or straight into a Schmitt input on a micro-controller.

Image

Here's the crazy simple schematic:

Image

and here is my quick knock-up on a breadboard

Image

This produces a nice pulse of 800uS (Vcc=3.3v) and 1mS (Vcc=5v) - not exactly square but definitely good enough to be seen and not a terribly slow rise time.

Image
Image
Image

and here is a photo of the AC waveform with the pulses added together - I had to do it like this because my camera exposure was too quick and wouldn't capture both traces. The pulse edges seem to be around the 2v mark - which is to be expected from the opto-coupler.

Image