Mains voltage zero crossing detector with optical isolated output

Last week, on the 16th, John S kindly simulated my circuit and posted the LT Spice netlist. It worked as expected. He subsequently added the phase shifter, with values, and posted that netlist too. Then I suggested a different pair of R and C values that also nailed the phase shift, but used less line current. It was all friendly and productive, and it's all in this thread. You are daring me to post stuff that was posted days ago.

It's a cute, simple circuit. Feel free to use it.

But why can't you fix your own circuit? What's the pullup value for the LM339? What comparator did you use in the sim you posted?

Oh, how much power does your circuit dissipate?

Reply to
John Larkin
Loading thread data ...

Funny, PSpice says you're still off by 60us. Have you been victimized by LTspice's short cuts? Are you going to tweak it for every production copy? How about over temperature?

I posted my LM339 version some three hours ago. It holds to around

300ns, the delay of the LM339, and needs no tweaks... it just works with any-old part values. ...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.
Reply to
Jim Thompson

Thank you for that one. It's hilarious. It's now up to 22 parts!

An LM339 has about 300 ns delay per section, driven hard; your first section will be slower. Your circuit has two in the path to sense one edge, and three in the path for the other edge. Not to mention the opto delay. Do the math.

And you're still violating the -0.3 warning.

John S and I got well under 100 ns accuracy with THREE parts, and a heap less power dissipation.

Reply to
John Larkin

Is it possible you can repost that simple zero crossing circuit you did? I seem to have miss that one. It would be interesting how you accomplished that in so few of components?

I take interest in this only due to the fact that for a zero crossing to work properly, you need to gate out the control signal and only allow it to turn on the actual switch at the base line or get it latched in at the base line and no other time..

Jamie

Reply to
Jamie

Don't know what you are simulating. The cap value can push the output edge either side of zero delay. So the question becomes, how repeatable is it? Seems like it should be pretty good to me. And the other issue, of course, is how much phase shift the application can tolerate. 60 us is only 1.3 degrees, and this circuit will do that easily.

But if my circuit isn't good enough for somebody's application, they shouldn't use it.

Have you been victimized

What do you mean "it holds to around 300 ns" ? It uses two LM339 sections for one edge and three for the other. Its absolute accuracy (AC line zero crossing to logic 50% crossing) will be in the 2 us range, and is about 300 ns different for rising and falling edges. Still, 2 usec is 0.05 degrees, and no realistic power controller would care about that, or twenty times that. Our little 3-part circuit would be fine for most applications.

Given the noise on the AC power line, nanoseconds don't make sense.

But 22 parts is sort of crazy.

Incidentally, your 750 ohm resistor is iffy. An LM339 is only spec'd to sink 6 mA.

How much power does that circuit dissipate?

Reply to
John Larkin

No make that under 50 us, which is about 1 degree.

Reply to
John Larkin

OK. I got 60us in PSpice. ...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.
Reply to
Jim Thompson

And I misread my own expanded grid :-( I get 1.6us falling sine and

2.2us rising sine... but no tweaking required.

BTW the original LM339 spec was 300ns with 0.1V overdrive... TI seems to have decided for "TTL Levels" as the input. I guess that'll save them 0.01¢ in testing costs ;-) ...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.
Reply to
Jim Thompson

Do you have LT Spice? A couple of netlists were posted by John S on the 16th.

Here's my original scribble. It's a dual optocoupler with the LEDs antiparallel and the phototransistors stacked totum-pole. The logic output swings from close to Vcc to ground, with almost zero power used from Vcc.

formatting link

I used two line resistors, but it really only needs one. That would be two parts, but the logic output lags the AC zero crossing a bit.

If the line side circuit is a resistor and a cap, 100K and 180 nF in series maybe, the zero cross time is much better.

I think it's cute. But like I said, if you don't like it, don't use it.

Reply to
John Larkin

ok, but, that link just shows a paddle lock and tells me I don't belong there. Oh well. " Error (403) It seems you don't belong here! You should probably try logging in?

You can also check out our FAQ or forums and maybe you'll find what you were looking for. Or maybe you should try heading home. "

Whet kind of report is that?

yes, I have LTspice..

Can't you just post an image some where?

Jamie

Reply to
Jamie

That's supposed to be a public link.

VCC | AC-------100K-----180nF------+----+ c | | b | | e A K ===> | K A +------- cmos logic out | | | | | c AC---------------------------+----+ b e | gnd

I don't think that b-e speedup resistors would help, but they might.

John

Reply to
John Larkin

footnote

Not a lurker, but i don't think he is impressing Ian Field any more.

?-)

Reply to
josephkk

footnote

An transfinite number of times, it is made of quality nacrissuim.

?-)

Reply to
josephkk

What circuit posted where? Or did you only discuss it?

?-)

Reply to
josephkk

n

e is

is

as

er

ing

f

in a

and

pto

a

ne,

ad

e

id?

ing

ow

at

4f3

=A0 =A0 =A0 VCC

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0b

=A0 =A0 =A0 e

=3D=3D=3D> =A0 |

=A0 =A0 =A0 +------- cmos logic out

=A0 =A0 =A0 |

=A0 =A0 =A0 c

=A0 =A0 =A0 =A0 e

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0gnd

Circuits like yours that attempt to change state literally at the zero crossing in time are fundamentally high risk because the zero point is exactly when line noise has the most influence on the transition thresholds. In the industrial environment, this noise is not necessarily uncorrelated from zero to zero because most of it is most likely due to harmonics of the fundamental. Also that business about minimizing components by using a single resistor for current limiting unbalances your input impedance to electric field induced interference, something else which abounds in typical applications requiring ZCD. Of course your idea is going to appear simple and elegant, it was intended for an idealized world, but usefulness is what's lacking there.

Reply to
Fred Bloggs

an

one is

) is

ng as

pler

pping

of

thin a

ot

r and

opto

es a

line,

y

de

lead

at

ed

the

did?

ssing

llow

n at

ed

c94f3

be

g

=A0 =A0 =A0 VCC

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0b

=A0 =A0 =A0 =A0 e

=A0=3D=3D=3D> =A0 |

=A0 =A0 =A0 =A0 +------- cmos logic out

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0 c

=A0 =A0 =A0 =A0 e

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0gnd

so use two resistors to make it balanced, and if the zero crossing has volts of noise in the real work, what is really the point of trying to make a millivolt, nanosecond accurate detector?

-Lasse

Reply to
langwadt

Says the guy who claimed my circuit would take a half hour to stabilize.

Reply to
John Larkin

do an

t one is

ol) is

sing as

oupler

ropping

ns of

within a

hot

ler and

he opto

omes a

C line,

by

side

e lead

that

es

sted

d the

t

or

ou did?

rossing

allow

in at

n
c

used

07c94f3

d be

in

e

ong

=A0 =A0 =A0 =A0 VCC

=A0 =A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0b

=A0 =A0 =A0 =A0 e

=A0=3D=3D=3D> =A0 |

=A0 =A0 =A0 =A0 +------- cmos logic out

=A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0 c

=A0 =A0 =A0 =A0 =A0 e

=A0 =A0 =A0 =A0 =A0 |

=A0 =A0 =A0 =A0 =A0gnd

I linked to an EDN (?) circuit at the start of this thread is which is a variation of a much older method of ZCD, back from the days when people actually knew a bit more about network theory. The idea is to put the threshold at a much higher and heavily filtered voltage of which the interfering noise is a much smaller fraction, and at which the line slew rate is not much less than at zero crossing. Then gate the line and its interference out of the circuit and extrapolate the trigger time into the vicinity of actual zero crossing with an RC. This can actually be done so that the resulting circuit does not require any tweaking or unobtainable parts.

Reply to
Fred Bloggs

I haven't been following closely but noise and the switching point has come up a bit. If you fee the 120/60Hz pulses into a PPL you would completely remove the difficulty, no?

--
We have failed to address the fundamental truth that endless growth is  
impossible in a finite world.
Reply to
David Eather

How about this?

formatting link

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.