Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Accurate mains zero cross detector circuit without optocoupler

Status
Not open for further replies.
T

treez

Guest
Hi,
We need an accurate mains zero crossing detector, but cannot use "wear-out" components such as opto-couplers. Do you agree that the attached circuit will be very good?, since it uses matched transistors, and also has Base_collector diodes to sweep out the minority carriers quickly.
The micro will be able to calculate the point of zero cross from the signal from the NPN collectors.
 

Attachments

  • ZCD.JPG
    ZCD.JPG
    162.2 KB · Views: 142

Decades ago we used an integrator (for phase shift,
we wanted a 90 degree timing pulse for SCR motor
control firing) followed by a comparator. For a zero
crossing you could just use a single supply comparator
and stop-diodes (Schottkies) to protect the input?
We took the sine wave off one of the transformer
secondaries.
 

but cannot use "wear-out" components such as opto-couplers.
Why do you call that a "wear-out" component?
Provided they are used well within their ratings, opto-couplers are just as reliable and long-lasting as most other solid-state devices.
 

It seems you micro isn't isolated so why even talk about an opto? Run your line/neutral dividers into a comparator with diode clamps as dick suggested.

Or maybe do it all digitally? Perhaps condition the AC input with an inst amp or opamp in differential configuration and send it to the micro ADC?
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Hi,

Why do you call that a "wear-out" component?
Provided they are used well within their ratings, opto-couplers are just as reliable and long-lasting as most other solid-state devices.

From my experience I can say that I now try to avoid optocouplers. A lot of years ago I used optocouplers (high quality brand types) for an industrial circuit. Operating for about 5 years 7/24 with about 50% duty cycle. They degraded to 20% of the inital CTR until the function failed. We had a couple of optocouplers from the same batch in stock, so we could compare them.

Klaus

I forgot to mention: They were operated at the lower end of recommended current.
 
Thanks, I think we will do it with comparators....we will need hysteresis to stop chattering , which will mean an offset in the pulse from which we must derive the zero cross..but we can calibrate that out.
 

Hi,

I did a lot of precise phase control units in the past.
The most phase error was caused by the ZCU.
The problem is that the waveform around zero cross will change with load (in a mains system).
Also the zero cross is jittery / noisy.

Thus we always decided to use filters to reduce some ringing around zero cross.
The best "simple" solutions used resistive divider plus comparator.

My more advanced solutions used a PLL that followed the mains frequency and reduced the high frequency jitter.

One problem we faced with phase control units was that "switching ON the SCR / Triac" often caused additional edges in zero cross detection.

Klaus
 
Thankyou for the advice.
We have now done it with comparators with some hysteresis as attached.(LTspice sim and pdf schem)

Though i fear we will need a negative supply for the comparators.....since the input pins are not allowed to go less than GND-0.3V....and even a Schottky cant gaurantee that...even if it did, Schottkys have leakage current which would mess things up.
 

Attachments

  • ZCD_ with comparators.pdf
    40.3 KB · Views: 107
  • ZCD_comparators.txt
    5.1 KB · Views: 50
Last edited by a moderator:

You can do it with one comparator: feed a portion of L and N to the comparator inputs, the output will go high or low as the line polarity changes. You then use a capacitor coupling from the comparator output to recover a ZC pulse. It only needs one comparator and it doesn't have to be 'open collector'.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thankyou very much for your advice, i have just re-done it for one comparator...and no negative supply needed, as attached LTspice sim and pdf schem
 

Attachments

  • ZCD_comparatorx1.pdf
    39.6 KB · Views: 105
  • ZCD_comparatorx1.txt
    3.8 KB · Views: 55

Yeah that circuit is actually pretty simple (one HV divider) if you're ok with the compromise that it doesn't switch at zero. It does give an individual pulse at each crossing (rather than an edge) if that's what you need.

Also easy is to divide down both line and neutral, bias the result to mid-supply and feed it into a comparator. Use AC coupled hysteresis that decays in 10ms and you'll have 'perfect' edges at exactly zero. Or use asymetric hysteresis (diode in the hysteresis path) and you'll have one 'perfect' edge and one phase shifted edge.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
I was actually thinking of connecting 'L' to one comparator input and 'N' to the other so it forces the polarity to reverse and if both inputs are weakly biased at half supply, it will give a square wave out at exactly zero crossing. The problem I can see is if you capacitively couple the output to give a spike as the edges change, the pulses will also be rising or falling. If you can live with alternate (positive going) crossing detections that would be fine, it you need to detect crossing in both directions your MCU would have to be directly coupled (no capacitor) and look for rising and falling edges. If you are using a PIC, there is already a facility to interrupt on rising or falling edges, you just have to swap the selected edge after each detection.

If you use a PIC with a built in comparator you don't need an external one at all.

Brian.
 

I was actually thinking of connecting 'L' to one comparator input and 'N' to the other so it forces the polarity to reverse and if both inputs are weakly biased at half supply, it will give a square wave out at exactly zero crossing.
Thanks Betwixt, may I ask do you mean like in the attached? (Ltspice sim and pdf schem attached)….also the zcd signal….
The rising edge of the signal is within 5us of the zero cross….it looks good . Though the way I have done it here…each comparator’s inputs linger for 10ms at a very close voltage to each other…and noise might come into it.

- - - Updated - - -

(BTW i muiltiplied the comparator output voltage by 100 to make it stand out in the sim "scope shot")
 

Attachments

  • zcd signal.jpg
    zcd signal.jpg
    69.4 KB · Views: 105
  • ZCD_comparatorx2.pdf
    10.9 KB · Views: 103
  • ZCD_comparatorx2.txt
    4.2 KB · Views: 51

No, I meant a single comparator not two. The idea being that the AC is applied across the + and - inputs so you get a sudden reversal at zero crossing and the comparator gets a double whammy of the reference falling as the monitored input increasing or vice versa. The output should be a square wave with rising and falling edges aligned with zero crossing. If your MCU looks for alternate rising then falling edges it will know when zero crossing occurs. Most PIC devices (I think that is your preferred manufacturer) have edge detection built in and you can swap from rising to falling as soon as an edge is detected so it is ready for the next one.

Some PICs also have built in analog comparators so you can do the job in very few components.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Yeah once you have two high voltage resistor chains (probably a substantial portion of circuit size/cost) you might as well do something like this (there are a few different clamping structures you could use. You could even rely on the diodes in the comparator if they're specified for current).

F1UYuD2
Capture.PNG
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top