Opto-isolated zero crossing detector

Jul 15, 2010 69 Replies

Actually what you get is not exact zero crossing with this. There's a phase delay introduced by the capacitor and resistor of the off-line DC source. If you know the frequency (50 or 60Hz) you can, to some extent, compensate for this with a delay (as I did in software). My application was to turn on a relay as close to zero crossing as possible, but in fact anywhere close enough that didn't have too much voltage across the contacts at the point of switching was acceptable.

Mark.

more

done

Never mind. I see that Spehro did the same thing on his second stage. So I suppose it is 6 of one, half-dozen of the other.

Jon

Elaborating...

Use output pulse to drive an NPN to drive your opto-coupler input.

Or... as I'd likely do, use the two spare comparators in the LM339 package. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

done

Would he?

Not quite the same thing.. the pulses have asymmetrical timing.. early on the negative-going zero-xing, and late on the positive-going zero-xing, but at least as dodgy in other ways. ;-)

(Mine has the output high (nominally) for |Vin| < Vdd/2)

more

done

So a "Cluck-Cluck" to Larkin's circuit IS in order ?:-)

Mine is high for ±Vbe about the zero-crossing. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

On a sunny day (Mon, 19 Jul 2010 11:26:33 -0700) it happened Jim Thompson wrote in :

I like Spheros's circuit.

For just +-Vbe you can do much simpler:

+5V | 10M _ |----------------------- ___| |______ in c |

--- 1M ------ b NPN | | e c | | ---b NPN | /// | e | /// | |______________________|

A cluck anyhow.

For triac pulse triggering you need the load current to rise above the worst-case holding current by the end of the pulse for it to remain on for the rest of the half cycle. A lot of triacs have pretty high holding currents ( >100mA worst case). I guess ideally you'd use something like +/-Vbe on line voltage (or my circuit operating on a lower voltage such as 3.3V with 1.7V thresholds) and stretch the pulse by 100usec or so.

Yep. Somewhere in my chip repertoire is a design that goes high AT the zero crossing (either slope) and stays high for awhile. I did it for GenRad about 30 years ago, so it's _on_paper_ (before PSpice :-) Hopefully I still have it. IIRC it did not require a time delay... scratching head and doing a vague memory dump... I seem to remember it detected that the TRIAC did reach holding current. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

detector.

more

done

Just gently banging the ESD diodes.

John

more

done

Both will have glitch problems when connected to a real AC line.

John

200

detector.

more

done

I would feel a little more comfortable with a simple resistive path there too, I suppose. But yes.

Jon

more

done

Actually, no. His rationality level is a function of whether he likes people or not. It gets downright negative around me. Curious.

John

detector.

more

done

Used to use a cap into npn base plus reverse diode to emitter, feeding in the signal from after the control supply rectifier with another diode isolating the filter cap. Wrinkle was that is had to find 'zero' crossing for three phase, as well as single phase.

On three phase, zero cross being where the next half cycle rises over the falling prior half cycle. Worked okay for mains commutated SCR converters with half controlled bridge, which worked okay for big traction battery charging via a large gapped iron core choke.

Grant.

detector.

more

done

Cluck! Cluck! Cluck! Larkin is the real ol' git. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

But Mark needs an isolated one.

[...]
Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

Use that pulse (buffered) to drive the opto-coupler. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

Not really. He said he'd ground one end of the transformer, or the other, or the CT. My little differential comparator thing works fine in all those cases. 4 resistors, one comparator or opamp.

The right opamp can make a nice comparator when you don't want a lot of speed, like when you want to ignore line spikes. Somebody semi-famous said to never use an opamp as a comparator and never use a comparator as an opamp. He was half right.

John

done

Ok, yeah, then it's easy of course. But you'll have to either tap off primary power somewhere or send isolated power across. Not that it's a big deal to do though.

I'd use a li'l transformer with a resistive divider up front to tap off the signal and do all the rest on the non-iso side. Triad makes some nice small ones. Pretty, too, the ones I have are fire-engine red.

Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

done

Ok, yes, if non-iso then it's fine.

I have used opamps as comparators a lot, never had any issues. The other way around is a pain in the neck because most are open collector. The fun really begins when using CD4000 logic for stuff like this.

Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

more

done

Did you look at the schematic? It's (the zero-crossing detection) powered from the line via the 220nF capacitor.

One does assume that he has a regular isolated power supply on the other side (that needs the zero-crossing info :-)

As I noted earlier in the thread... use the remaining spares in the LM339 package to drive the LED in the opto-coupler. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 |

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required