Zerocross test issue

Thread Starter

Benengineer

Joined Feb 6, 2016
133
Hi Guys,
I try to test zero cross in embedded system. I have line voltage at frequency 60Hz input for relay and main zero cross. Here is the circuit.
upload_2016-5-5_20-57-23.png

I got huge delay,
upload_2016-5-5_20-59-50.png
I took R15, R26 and R17 out. The delay short almost 2 times.
upload_2016-5-5_21-2-18.png

Is there any way to shorten it more?

Thanks,


Mod edit: moved here from Completed Projects forum.
 
Last edited by a moderator:

Picbuster

Joined Dec 2, 2013
1,047
How accurate do you need the zero point in relation to voltage?
What jitter do you allow at detection point? (zero point)
Reason for my question: Vf diode and 'on' moment of led and detection in photo xtor will never be at zero and to make things worst and will be sensitive to temperature.
 

Lestraveled

Joined May 19, 2014
1,946
Remove diodes D7, D11, D123 and the capacitors C9, C11 C85. They are not needed and are slowing your circuit down.

You did not state what the line voltage is but for certain R15 and R16 are too high.

This is not a very good design. If you want some suggestions, post some specs.
 

Thread Starter

Benengineer

Joined Feb 6, 2016
133
Remove diodes D7, D11, D123 and the capacitors C9, C11 C85. They are not needed and are slowing your circuit down.

You did not state what the line voltage is but for certain R15 and R16 are too high.

This is not a very good design. If you want some suggestions, post some specs.
The line voltage is from 120VAC to 277VAC. Please let me know what to do after remove those parts you mentioned.
Thanks
 

Thread Starter

Benengineer

Joined Feb 6, 2016
133
How accurate do you need the zero point in relation to voltage?
What jitter do you allow at detection point? (zero point)
Reason for my question: Vf diode and 'on' moment of led and detection in photo xtor will never be at zero and to make things worst and will be sensitive to temperature.
I don't know any jitter at zero point. What we want to do is just to reduce the delay time to 25-50us. Is it possible to do it?
Thanks,
Ben
 

Thread Starter

Benengineer

Joined Feb 6, 2016
133
Remove diodes D7, D11, D123 and the capacitors C9, C11 C85. They are not needed and are slowing your circuit down.

You did not state what the line voltage is but for certain R15 and R16 are too high.

This is not a very good design. If you want some suggestions, post some specs.
The reason that diodes D7, D11, D123 and the capacitors C9, C11 C85 are rectified line voltage from 120VAC to 277VAC at 60Hz. I don't want to negative cycle. I already took out R15, R26 and R17. After then, its delay time shorten about half. It is very good. But I want to reduce more. I also tried put 10K resistor R between pin3 of photocoupler and ground. please see the below:
upload_2016-5-6_10-13-50.png

Thanks,
 

Lestraveled

Joined May 19, 2014
1,946
I don't think this circuit will function well from 120Vac to 277Vac. At 277Vac (428 volts peak) the optoisolator will only see 2.2 mills (peak) with 200K input resistance. This means that the LED has stopped emitting long before the voltage reaches zero. It gets even worst at 120Vac. This circuit acts more like a peak voltage detector than a zero voltage detector.

This what I would do:
- Lower the input resistance (R15 + R16) to between 2200 and 5000 ohms (20 watt wire wound, check the voltage rating of resistors)
- Leave D7 in the circuit.
- Change D9 to a zener diode, 5 V @ 1 watt.
- Remove C9
- Add a 330 1/4W resistor between the cathode of D9 and pin 1 of U8.

- Remove C10 and R19 and the red 10K resistor you wrote in.
- Lower R14 to 470 ohms.

The above changes causes the optoisolator to be driven at nominal current levels thus actually turning off very near zero volts.
 

Thread Starter

Benengineer

Joined Feb 6, 2016
133
I don't think this circuit will function well from 120Vac to 277Vac. At 277Vac (428 volts peak) the optoisolator will only see 2.2 mills (peak) with 200K input resistance. This means that the LED has stopped emitting long before the voltage reaches zero. It gets even worst at 120Vac. This circuit acts more like a peak voltage detector than a zero voltage detector.

This what I would do:
- Lower the input resistance (R15 + R16) to between 2200 and 5000 ohms (20 watt wire wound, check the voltage rating of resistors)
- Leave D7 in the circuit.
- Change D9 to a zener diode, 5 V @ 1 watt.
- Remove C9
- Add a 330 1/4W resistor between the cathode of D9 and pin 1 of U8.

- Remove C10 and R19 and the red 10K resistor you wrote in.
- Lower R14 to 470 ohms.

The above changes causes the optoisolator to be driven at nominal current levels thus actually turning off very near zero volts.
How do you get 428 peak voltage at 277V? I got 277 x √2 =391V. please let me know.

Thanks
 

MrAl

Joined Jun 17, 2014
11,474
Hello there,

As others have noted, lots of problems with this circuit. It needs to be totally re-thunk :)

Another problem is that the opto isolator diodes cause asymmetrical triggering, which can be significant at 120vac as the asymmetrical delay is about 31us. This means that on the rising edge of the first half cycle you get a minimum delay of 31us after the zero cross, and on the falling edge you get a signal 31us before the actual zero cross. This might be ok if it was the same for every half cycle, but it's not because the negative half cycle doesnt do anything. That means one zero cross will trigger 31us late and one 31us early, which will he significantly asymmetrical for your application going by your previous notes.

There are a lot of ways to improve, depending on how you would like to do it. For example, a solution for the above might be to use two optos where they both connect to the output but the inputs are connected in reverse parallel. But other problems include the sensitivity which was mentioned in previous thread, which woudl also have to be improved to actually get sensing near the zero cross.

Any delay in the opto itself has to be improved by either raising the output impedance or increasing the input current, and also checking the specs on that particular opto to make sure it fits the requirements.

I had to do this many times in the past both professionally and as a hobby. I never used an opto isolator for any of those applications. It's hard to get the drive right without an active device ahead of it. I remember one time i used a transformer, the same one that was used to create the DC supply for the product. Tapping off the secondary an AC signal provided all the signal i needed as well as isolation.
Another modern technique, if you understand the risks, is to tap right off the 120vac power source but keep everything else isolated from any human contact. That's a little more involved, but is often a choice in products that are completely encased.

A simple theoretical fix would be to use Schmitt triggers ahead of the optos. That would require half wave rectification of the 120vac line for the power source. A little more involved again, but doable with some fairly simple parts like a NPN transistor perhaps.

The reason everyone says get rid of the series diodes is because they prevent the opto from turning off fast. Without them, it will turn off faster. That's not enough though, as the sensitivity issue has to be addressed also to get this thing working properly.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,420
Are you concerned about both positive and negative zero crossing times or only one of the crossings?
How close do you want the signal to be to the zero crossing?
 

Picbuster

Joined Dec 2, 2013
1,047
I agree with mr MrAl.
to complete use a Schmitt trigger and measure the length of pulse ( eq T)
You know that the total period Tp=1/freq in micro sec
you measure T in micro sec
difference (Tp-T) here you calculate Schmitt trigger threshold expressed in time
From end T to zero point = (Tp-T)/2 ( assuming that Schmitt trigger is accurate and symmetrical)
now You are able to calculate exact zero point in your software and are able to tweak when needed.
All based on a stable input frequency.
 

Lestraveled

Joined May 19, 2014
1,946
The biggest issue here is the high line voltage. If you were to use a transformer(s) then you would have more options that would yield better results.
 

crutschow

Joined Mar 14, 2008
34,420
Here's my take on a zero crossing circuit that can meet the timing requirements while minimizing power without using a transformer.
It uses a capacitive voltage divider (C1 and C2) to losslessly reduce the voltage and rectifies that to get ≈6v to 14V DC to operate a LM393 zero crossing detector that drives the opto coupler.
C2 is a film or ceramic capacitor rated for at least 500V.
C1 and C3 should be rated for at least 20V.
Capacitor C1 becomes slight reversed biased on the negative half-cycle as determined by the clamp diode D2 but that voltage isn't high enough to damage the capacitor if it's electrolytic (which can generally tolerate up to 1.5V reverse bias).
The LTspice simulation shows the opto output zero crossing rise-time occurs within <30μs of the input zero crossing (top plot).
The main power consuming component is R3 which should have a 1W or greater rating.
The 1GΩ to ground (R5) at the output is just for simulation purposes. In the real circuit there would be no deliberate connection between the main's ground and the output ground.

upload_2016-5-8_14-20-52.png
 
Last edited:
Top