Crossing detector both directions

Thread Starter

noweare

Joined Jun 30, 2017
115
Hello,
I am trying to detect each zero crossing of mains A.C. voltage.
Do i need to use two opto-couplers like what is shown in the circuit or
is there a device that works for both directions. v1 and v3 shown in the
circuit would go to a micro-controller that fires the triac through a diac
which is not shown in the schematic.
Thanks in advance
Joe
 

Attachments

ronsimpson

Joined Oct 7, 2019
4,691
How about a full wave bridge on U1. If you add the 4 diodes right at U1 they can be low voltage low current. The power line voltage is not at this point the signal is only +/- 1.5 volts.
1571848027956.png
 

Tonyr1084

Joined Sep 24, 2015
9,744
Use a transformer, anywhere from 5 to 12 volts and a full wave bridge rectifier. Couple the output to a gate. Each time the wave goes from zero to V+ you can count that as a single crossing. Keep in mind that with a full wave rectifier you're converting the negative going waveform into a positive going wave form. So each positive waveform is representative of a zero crossing.

Next things we (I)'d like to know:
Why do you want to detect zero crossing?
What frequency are you trying to detect zero crossings?

You DO understand that zero crossings are going to be double the frequency, right?
 

Thread Starter

noweare

Joined Jun 30, 2017
115
Use a transformer, anywhere from 5 to 12 volts and a full wave bridge rectifier. Couple the output to a gate. Each time the wave goes from zero to V+ you can count that as a single crossing. Keep in mind that with a full wave rectifier you're converting the negative going waveform into a positive going wave form. So each positive waveform is representative of a zero crossing.

Next things we (I)'d like to know:
Why do you want to detect zero crossing?
What frequency are you trying to detect zero crossings?

You DO understand that zero crossings are going to be double the frequency, right?
Hello Tony,
I am trying to build a spot welder to make lithium ion battery packs. I want to detect zero crossing then delay some time before firing the triac. It is so I can control the power into the secondary to get a good weld. I also want to count zero crossing edges because I want to control how many cycles get applied to the secondary. I will have to check if my micro can detect both pos and neg going pulses, if so then I just need one opto coupler and my question was moot. I just did not think of it at the time.
Thanks for that.
 

eetech00

Joined Jun 8, 2013
4,705
Hello,
I am trying to detect each zero crossing of mains A.C. voltage.
Do i need to use two opto-couplers like what is shown in the circuit or
is there a device that works for both directions. v1 and v3 shown in the
circuit would go to a micro-controller that fires the triac through a diac
which is not shown in the schematic.
Thanks in advance
Joe

There are zero crossing opt couplers. Usually used to control AC mains via a digital control circuit
Is that what you mean?

eT
 

Thread Starter

noweare

Joined Jun 30, 2017
115
There are zero crossing opt couplers. Usually used to control AC mains via a digital control circuit
Is that what you mean?

eT
Yes, I will output a signal from my microcontroller to a diac - triac circuit that is not shown. I thought I would need to rising edges, one on pos. half cycle, one on the neg half cycle to let the micro know to start counting before turning on the triac. I have not checked yet but if my micro pin can react to both neg and pos going edges then I can use what I have.
 

ronsimpson

Joined Oct 7, 2019
4,691
There are zero crossing opt couplers. Usually used to control AC mains via a digital control circuit
Is that what you mean?
Those opto(s) are nice in that you can turn on the opto any time you want and it will wait until the next zero crossing to actually turn on.

What is wanted is a way for a micro to see the crossing, delay some time, turn on the triac. I am assuming the delay is to create a duty cycle to reduce power.
 

eetech00

Joined Jun 8, 2013
4,705
Yes, I will output a signal from my microcontroller to a diac - triac circuit that is not shown. I thought I would need to rising edges, one on pos. half cycle, one on the neg half cycle to let the micro know to start counting before turning on the triac. I have not checked yet but if my micro pin can react to both neg and pos going edges then I can use what I have.
What exactly is the micro controlling? Does it really need to know when the sine wave crosses zero if an external chip is doing that?

eT
 

Thread Starter

noweare

Joined Jun 30, 2017
115
What exactly is the micro controlling? Does it really need to know when the sine wave crosses zero if an external chip is doing that?

eT
When the micro gets the zero detectors edge it delays some time then turns on the triac to deliver power to the welding transformer.
 

LesJones

Joined Jan 8, 2017
4,511
This is how I did it for my weld pulser.
Weld_PulserV03.png
The mains transformer I used has a secondary voltage of about 6 or 7 volts RMS. The 12 volt zener it to clamp any spikes. It does not conduct with the normal output of the bridge rectifier. The diode D1 is to allow in circuit programming.

Edit. The two errors in the schematic spotted by Ronsimpson in post #21 have now been corrected in the schematic. (I should have also included a fuse in series with the transformer promary before posting it.

Les.
 
Last edited:
Top