Mains voltage zero crossing detector with optical isolated output

Feb 15, 2012 482 Replies

I am looking for a zero crossing detector IC for use with 120/240,



50/60 Hz mains voltage and has an optical isolated output that is compatible with micro controllers. I have seen zero crossing triac drivers with an optical isolated input, such as the MOC3081. But nothing with an optical isolated output. The nearest I have come so far is a circuit made with discrete components Hence I will appreciate it if somebody can post a part number or link to this type of IC.

Howard


Maybe build it with this?

formatting link

Regards, Joerg http://www.analogconsultants.com/

I like this:

formatting link

It's a dual optoisolator, with the LEDs antiparallel and the phototransistors totem-poled. It needs very little line-side current since the phototransistor load will be a cmos port pin. Software deglitch maybe, if it's necessary.

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

That circuit lacks precision and has too much dead time, also aging and temperature issues with the LEDs..

formatting link
is slightly better. The zener defines the zero crossing more precisely.

A plagiarism

formatting link
, but more writeup.

Hmmm- your circuit

formatting link
from
formatting link

How much dead time do you think it has? How much can the OP tolerate?

also aging

Please elaborate.

9 parts instead of three. Probably glitch sensitive.

Not exactly the same... not totem pole outputs.

formatting link

Yikes, 19 parts!

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

IBIS modeling courtesy of Yours Truly... at least of the TAOS chip inside ;-) ...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 | I love to cook with wine. Sometimes I even put it in the food.

I put a zero-crossing detector in my laminator hack, using a standard AC-input opto-isolator, a cap, and a resistor. It produces a signal that's high for about 50% of the time, when the AC voltage magnitude is highest. The trick here is, the MCU needs to measure the "off time" of the signal it gets, and set a timer to trigger half that time from the next pulse, for each pulse. That puts the timeout right at the zero crossing. Many MCUs can do this kind of measurement in hardware.

formatting link
formatting link

(detector is in the upper right corner)

(before anyone picks on my circuit - yes, I know it's a hack, but it's MY hack and it works for me ;)

THen you have not looked hard enough.

Jamie

It's not going to degrade much in your lifetime at, say, 0.25 mA average LED current. And the totem pole output need an approximate CTR (...scribbles mathematical equations furiously...) of zero.

Maybe because they never thought of it?

John Larkin, President Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators

s

ac

so

pe

om

..

a...

Thank you for your reply Fred. The two EDN links you provided have some very good mains voltage, optical isolated output, zero crossing detector circuits. I will be using LTspice over the next few days to obtain a better understanding of how the circuits work. The Dego circuit is the circuit that initiated this hunt to see if it could be replaced by a single IC. Evidently there isn't sufficient demand to justify manufacture an IC for this application.

Howard

is

iac

e so

ype

t

com

...

ra...

Nah- that circuit is just a noise amplifier, you will have ultra-long storage times and a bunch of pulses when the off transistor finally comes out of saturation, with a lot current shootthrough in between. It looks good on paper but you will spend a lot of effort cleaning up that messy output. Also, it would not be unusual for something like that to take half an hour to finally settle down to steady state behavior.

Thank you for your reply Joerg As far as I can tell the HCPL-3700 is a better fit for an application that needs to know whether 207 Volts Ac or 240 volts AC is being applied to a circuit than for use as zero crossing detector.

Howard

Thank you for your reply John. Your suggestion looks like a nice low parts count approach. I will simulate the circuit to see how it compares with the other suggestions.

Howard

Thank you for your comments on accuracy Robert. However, the zero crossing detector will be used in application like D. J,. Delorie's laminator, phase fired power controller, where 1 to

2% accuracy is adequate.

Howard

How does an "off transistor come out of saturation" ? What does that mean?

Where do "ultra-long storage times" come from? Makes no sense.

with a lot current shootthrough in between.

All insane. There is no shoot-through; one transistor turns off, then the other turns on. Where is there a half hour of time constant? This will start working nicely in 1/2 of a line cycle.

I mentioned that the uP could deglitch it in software if necessary. Or if you don't want to do that, and are worried about glitches, add a tiny-logic Schmitt trigger thing. That works it up to 4 parts total.

The antiparallel coupler/totem pole is far better than an optocoupler with a pullup resistor, and much cooler besides.

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

They'll all be like that because, as you hinted in another post there is not enough market for a isolated zero-crosser chip. The question is, how precise do you need to detect the zero crossing? 1-2% as you have hinted elsewhere should be feasible with an optocoupler device.

If you are willing to install a tiny transformer it gets even easier: Run the other side into clipping diodes, via a resistor. Now place a window comparator (can be bought in a chip) around zero and watch its output.

Regards, Joerg http://www.analogconsultants.com/

While it's not impossible to make such a device, I don't think they exist. Consumer electronics (the main customer) is very cost sensitive, and this sort of thing would not likely be cost-effective.

I suggest that you should design something using a standard optoisolator that is safety-agency approved, along with a few inexpensive appropriately rated discrete parts, just like everyone else does.

type

com

formatting link

 
formatting link

What the hell are you talking about? How does high impedance loading - essentially no loading - slow down a phototransistor turning on? You don't understand this stuff.

The period of the AC line is 16 milliseconds!

That's crazy. When there's current in one of the LEDs, why would its phototransistor wait a half hour to turn on?

It's a totem pole because two NPN transistors are stacked, one above the other. They can't conduct simultaneously because only one LED can be driven at a time. The drive frequency is 60 Hz, for Pete's sake. I've used this totem pole opto circuit at 100 KHz, and it worked fine.

ftp://jjlarkin.lmi.net/Opto_Totem.JPG

I've also use it in linear mode, as the output stage of an amplifier that swings 400 volts p-p.

ftp://jjlarkin.lmi.net/HVamp.JPG

All this stuff works.

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

For accuracy, just use a capacitive dropper type power supply to power a comparator that drives an opto-isolator. Then you can get as accurate as you desire.

A straight opto-isolator, with no helper gain, is simply a "straddle-the-zero-crossing" indicator :-) ...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 | I love to cook with wine. Sometimes I even put it in the food.

0/240,

that is

ing triac

But

ve come so

ill

this type

current

are

ology.com

n

rate?

2V

kinda

ncy

CTR

tector...

.jpg

rrentdra...

I know how to read a datasheet and also understand transistor saturated operation better than you do apparently. You have a combination of two phenomena working to turn the detector transistor OFF when it comes out of saturation: recombination of excess base charge and collector current discharge. Since you have no collector current to speak of, your circuit must rely on recombination alone. My sampling of some popular Toshiba optos list storage times of 100us as typical with even as much as 4.7K loading to 24V! This means the transistor you will be trying to turn on will be loaded by the other transistor which is still a fully conducting saturated switch.

Give us some part numbers and your input drive resistor values.

This is a totem pole

formatting link
, not what you have, which is just a stack. Your circuits were loaded to work fine at 100kHz.

Do you see that little branch there you have labeled 'FB'? Think that would make any difference compared to your open loop drive for a zero crossing app?

>

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required