Zerocross test issue

Discussion in 'The Projects Forum' started by Benengineer, May 6, 2016.

  1. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    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: May 6, 2016
  2. Picbuster

    Member

    Dec 2, 2013
    374
    50
    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.
     
  3. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    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.
     
  4. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    The line voltage is from 120VAC to 277VAC. Please let me know what to do after remove those parts you mentioned.
    Thanks
     
  5. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    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
     
  6. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    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,
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    You just want a rectified wave, not a filtered rectified wave (DC), so lose the capacitors as was suggested.
     
  8. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    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.
     
  9. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    How do you get 428 peak voltage at 277V? I got 277 x √2 =391V. please let me know.

    Thanks
     
  10. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    277Vac average. So, 277/.636 = 435 volts

    @crutschow
     
  11. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    I'm confused. :confused:
    Line voltage is given as the RMS value, not average.
     
  12. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Nope, I am confused. I should have used the RMS conversion, not average.

    Thanks C
     
  13. MrAl

    Well-Known Member

    Jun 17, 2014
    2,431
    490
    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: May 6, 2016
  14. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    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?
     
  15. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    my result 391.7V is right?
     
  16. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Yes, you are right. The changes I suggested still hold.
     
  17. Benengineer

    Thread Starter Member

    Feb 6, 2016
    101
    2
    So far I am concerned with positive zero crossing times. I expect less than 50us.
     
  18. Picbuster

    Member

    Dec 2, 2013
    374
    50
    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.
     
  19. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    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.
     
  20. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    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: May 9, 2016
Loading...