Question on zero-crossing circuit

On 05/01/2014 09:16 PM, Douglas Beeson wrote:
On Thu, 01 May 2014 10:01:53 -0400
Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:39 AM, George Herold wrote:
On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.

George H.

It's only complicated-looking because it's drawn badly, with the power
supplies mixed up with the signal wiring.

The top and bottom rails (after R2 and R3) are the power supplies, Cap
C1 turns the AC mains into essentially a regulated AC current source.
R1 limits the inrush to an amp or so so you don't pop the rectifiers,
and the two zeners clip off the tops to keep the voltage regulated.
R2/C3 and R3/C4 are the supply filters. (The positive supply lead on
the LM339 isn't shown, which adds to the confusion.)

So apart from whatever incidental voltage there is on the neutral, you
can think of the junction of D1 and D2 as sitting still at ground
potential. The other ends of D1 and D2 sit at +- a diode drop from there.

AC current is applied to the junction of D4 and D5 via R4 (plus a bit of
despiking from C5, to get rid of switching hash and so on). On the
positive half cycle, D4 conducts and the D3/D4 junction goes to +2 diode
drops, so U1 pulls low.

On the negative half cycle, D3 conducts in the same way, and U2 pulls low.

Within a diode drop of the zero crossings, neither D3 nor D4 conducts,
and both U1 and U2 are high. So the result is a brief pulse on each
zero crossing.

It's not a circuit you'd want to do anything much with, except drive an
optocoupler, because there are safety issues.

Cheers

Phil Hobbs



Dr. Hobbs,
Thank you for your very informative reply. In Jim's defense, I found the rest of the circuit to be pretty easy to understand. :)
doug

Jim's very protective about his circuits (good and bad). I wasn't
attacking him, I was doing the sci.electronics.basics thing, i.e.
walking through the circuit discussing what it does, for the benefit of
beginners. To encourage said beginners not to give up, I pointed out
out that the circuit looked even more complicated than it was, because
the power and signal paths weren't distinguished very clearly. Then he
got mad and started calling names, but I can't help that.

Jim's a chip designer, and so works in a different world than most of
the rest of us--a lot of his stuff gets made in large numbers and has to
work in far less well-controlled conditions that your average
instrument, over process corners and not-always-optimal customer designs.

In board-level designs, that frequently leads to using way too many
parts, but then board-level isn't his gig.

Cheers

Phil Hobbs


--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
 
On Fri, 02 May 2014 08:16:29 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 01 May 2014 21:57:20 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Thu, 1 May 2014 18:45:50 -0400, "Maynard A. Philbrook Jr."
jamie_ka1lpa@charter.net> wrote:

In article <h6r4m9h23tvdtggm7g6rvbkhp08mtei4rk@4ax.com>,
jjlarkin@highNOTlandTHIStechnologyPART.com says...

On Thu, 1 May 2014 06:39:00 -0700 (PDT), George Herold <gherold@teachspin.com
wrote:

On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.


C1 is mostly a current limiter.

Three interesting things:

C1 and C2 need to be "XY" type caps, safe to put across the AC line

C4 appears to be not connected

It has 20 parts and its output is still not isolated from the AC line.


A transformer, or a wall-wart equivalent, doesn't need a cap.

Yeah, I also noticed there isn't any (+) rail powering up the LM339
cheap, so don't worry about isolation, it's only connected to the
noodle! :)

Jamie

Good point, no power to the 339s. Probably Spice powers them up, for free.
Simulation is wonderful!

More sand in the air. Expands on my comment that you know nothing
about how an LM339 works.

...Jim Thompson

It works without a Vcc supply?

Cool.


--

John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com

Precision electronic instrumentation
 
On Fri, 02 May 2014 11:48:49 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:16 PM, Douglas Beeson wrote:
On Thu, 01 May 2014 10:01:53 -0400
Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:39 AM, George Herold wrote:
On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.

George H.

It's only complicated-looking because it's drawn badly, with the power
supplies mixed up with the signal wiring.

The top and bottom rails (after R2 and R3) are the power supplies, Cap
C1 turns the AC mains into essentially a regulated AC current source.
R1 limits the inrush to an amp or so so you don't pop the rectifiers,
and the two zeners clip off the tops to keep the voltage regulated.
R2/C3 and R3/C4 are the supply filters. (The positive supply lead on
the LM339 isn't shown, which adds to the confusion.)

So apart from whatever incidental voltage there is on the neutral, you
can think of the junction of D1 and D2 as sitting still at ground
potential. The other ends of D1 and D2 sit at +- a diode drop from there.

AC current is applied to the junction of D4 and D5 via R4 (plus a bit of
despiking from C5, to get rid of switching hash and so on). On the
positive half cycle, D4 conducts and the D3/D4 junction goes to +2 diode
drops, so U1 pulls low.

On the negative half cycle, D3 conducts in the same way, and U2 pulls low.

Within a diode drop of the zero crossings, neither D3 nor D4 conducts,
and both U1 and U2 are high. So the result is a brief pulse on each
zero crossing.

It's not a circuit you'd want to do anything much with, except drive an
optocoupler, because there are safety issues.

Cheers

Phil Hobbs



Dr. Hobbs,
Thank you for your very informative reply. In Jim's defense, I found the rest of the circuit to be pretty easy to understand. :)
doug

Jim's very protective about his circuits (good and bad). I wasn't
attacking him, I was doing the sci.electronics.basics thing, i.e.
walking through the circuit discussing what it does, for the benefit of
beginners. To encourage said beginners not to give up, I pointed out
out that the circuit looked even more complicated than it was, because
the power and signal paths weren't distinguished very clearly. Then he
got mad and started calling names, but I can't help that.

Jim's a chip designer, and so works in a different world than most of
the rest of us--a lot of his stuff gets made in large numbers and has to
work in far less well-controlled conditions that your average
instrument, over process corners and not-always-optimal customer designs.

In board-level designs, that frequently leads to using way too many
parts, but then board-level isn't his gig.

Cheers

Phil Hobbs

Yep. I tend to use too many parts, in discrete designs >:-} But the
result is circuits that work come hell or high water.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 02 May 2014 09:02:28 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Fri, 02 May 2014 08:16:29 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 01 May 2014 21:57:20 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Thu, 1 May 2014 18:45:50 -0400, "Maynard A. Philbrook Jr."
jamie_ka1lpa@charter.net> wrote:

In article <h6r4m9h23tvdtggm7g6rvbkhp08mtei4rk@4ax.com>,
jjlarkin@highNOTlandTHIStechnologyPART.com says...

On Thu, 1 May 2014 06:39:00 -0700 (PDT), George Herold <gherold@teachspin.com
wrote:

On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.


C1 is mostly a current limiter.

Three interesting things:

C1 and C2 need to be "XY" type caps, safe to put across the AC line

C4 appears to be not connected

It has 20 parts and its output is still not isolated from the AC line.


A transformer, or a wall-wart equivalent, doesn't need a cap.

Yeah, I also noticed there isn't any (+) rail powering up the LM339
cheap, so don't worry about isolation, it's only connected to the
noodle! :)

Jamie

Good point, no power to the 339s. Probably Spice powers them up, for free.
Simulation is wonderful!

More sand in the air. Expands on my comment that you know nothing
about how an LM339 works.

...Jim Thompson

It works without a Vcc supply?

Cool.

Yes! Ain't that marvy >:-}

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 2 May 2014 15:47:34 +0000 (UTC), Don Kuenz
<garbage@crcomp.net> wrote:

Jim Thompson <To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote:
On Thu, 1 May 2014 06:39:00 -0700 (PDT), George Herold
gherold@teachspin.com> wrote:

On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and
came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1.
What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis.
You still would want to capacitively couple it I think.... let the
average voltage be your "zero". And that looks to be what C1 is
doing.

George H.

Thanks!

Douglas Beeson <c.difficile@gmail.com

The impedance of C1 is ~12K @60Hz, limiting the recirculating current.
Transformers are expensive, and bulky.

Amen! And there's not always a handy power outlet nearby to plug a wall
wart into.

The object of that path is to provide the power supply current for the
339 comparators.

Contrary to Phil, it is not drawn badly... it's quite easy to follow
:)

It's easy enough for me to follow. It looks like most of the other
production schematics out there. Your schematic "keeps it real" for
novices. The real world often lacks the time to "hand hold" or provide
"one on one" answers. So one learns to be grateful for any schematic
whatsoever.

It looks like you used LTSpice to draw it. LTSpice is the lingua franca
of usenet.

Original crispy flavor MicroSim PSpice Schematics. I've been using
PSpice, starting in DOS, when the only netlist-able schematic capture
was the original OrCAD. So I pencil drew schematics, numbered nodes,
then typed in a netlist. My son, Aaron, wrote me a version handler
that maintained a stack of the revisions, in case I needed to back up
;-)

And... there is a whole world that doesn't need opto-couplers... think
the appliance control industry where everything is operated directly
off-line.

Hot power "keeps it simple" for journeymen. The WARNING - RISK OF
ELECTRIC SHOCK sticker advertises that journeymen skills are required.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 02 May 2014 08:11:44 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 01 May 2014 21:53:39 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Thu, 01 May 2014 17:41:13 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 1 May 2014 08:10:51 -0400, Douglas Beeson
c.difficile@gmail.com> wrote:

Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Thanks!

This one might be better for those who are afraid of "hot" circuits...

http://www.analog-innovations.com/SED/ZeroCross_LM339_SED.pdf

(Next to last listing on the S.E.D/Schematics page of my website.)

...Jim Thompson

21 parts! A personal best!

I aims to please >:-}


Most LM339s will do horrible goofy things, in all four sections, if you pull one
input a little below ground. D3 won't prevent that. See the National data sheet,
notes 3, 6, and 8. They warn about this *three* times. Also see their ZCD
example on page 14.

D3 does prevent substrate diodes from conducting.

It does not!

A silicon drop will *not* prevent a 339 from going wonky if you pull an input
below ground. That -0.3 volt max spec is, if anything, right on the edge. Look
at the zcd example on the National data sheet. After the diode clamp, they shift
positive. The other examples, where they do use a diode clamp, and conveniently
vague about V-.


Besides, those of
us intimately familiar with the LM339 know why those "horrible goofy
things" can't happen in my circuit.

And you don't. So you just throw your usual sand in the air.

OK, why can't it happen? You're going to get about a mA peak through D3, which
will pull the 339 input maybe 0.65 below ground. That's over twice the -0.3 max,
which the data sheet cautions against in at least four different places.

I've seen it happen with the National parts, and a silicon diode didn't fix it.
Maybe other vendors' clones aren't as bad.

The LM339 is at least 35 years old. Strange that National never bothered to fix
this. All they have done in those decades is make the warnings more obvious.

National's LM324 has that same problem, and others.



--

John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com

Precision electronic instrumentation
 
On 05/02/2014 12:12 PM, Jim Thompson wrote:
On Fri, 02 May 2014 11:48:49 -0400, Phil Hobbs
pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:16 PM, Douglas Beeson wrote:
On Thu, 01 May 2014 10:01:53 -0400
Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:39 AM, George Herold wrote:
On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.

George H.

It's only complicated-looking because it's drawn badly, with the power
supplies mixed up with the signal wiring.

The top and bottom rails (after R2 and R3) are the power supplies, Cap
C1 turns the AC mains into essentially a regulated AC current source.
R1 limits the inrush to an amp or so so you don't pop the rectifiers,
and the two zeners clip off the tops to keep the voltage regulated.
R2/C3 and R3/C4 are the supply filters. (The positive supply lead on
the LM339 isn't shown, which adds to the confusion.)

So apart from whatever incidental voltage there is on the neutral, you
can think of the junction of D1 and D2 as sitting still at ground
potential. The other ends of D1 and D2 sit at +- a diode drop from there.

AC current is applied to the junction of D4 and D5 via R4 (plus a bit of
despiking from C5, to get rid of switching hash and so on). On the
positive half cycle, D4 conducts and the D3/D4 junction goes to +2 diode
drops, so U1 pulls low.

On the negative half cycle, D3 conducts in the same way, and U2 pulls low.

Within a diode drop of the zero crossings, neither D3 nor D4 conducts,
and both U1 and U2 are high. So the result is a brief pulse on each
zero crossing.

It's not a circuit you'd want to do anything much with, except drive an
optocoupler, because there are safety issues.

Cheers

Phil Hobbs



Dr. Hobbs,
Thank you for your very informative reply. In Jim's defense, I found the rest of the circuit to be pretty easy to understand. :)
doug

Jim's very protective about his circuits (good and bad). I wasn't
attacking him, I was doing the sci.electronics.basics thing, i.e.
walking through the circuit discussing what it does, for the benefit of
beginners. To encourage said beginners not to give up, I pointed out
out that the circuit looked even more complicated than it was, because
the power and signal paths weren't distinguished very clearly. Then he
got mad and started calling names, but I can't help that.

Jim's a chip designer, and so works in a different world than most of
the rest of us--a lot of his stuff gets made in large numbers and has to
work in far less well-controlled conditions that your average
instrument, over process corners and not-always-optimal customer designs.

In board-level designs, that frequently leads to using way too many
parts, but then board-level isn't his gig.

Cheers

Phil Hobbs

Yep. I tend to use too many parts, in discrete designs >:-} But the
result is circuits that work come hell or high water.

...Jim Thompson

Provided that Digikey doesn't run out of behavioural 339s. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
 
On 05/02/2014 12:21 PM, John Larkin wrote:
On Fri, 02 May 2014 08:11:44 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 01 May 2014 21:53:39 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Thu, 01 May 2014 17:41:13 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 1 May 2014 08:10:51 -0400, Douglas Beeson
c.difficile@gmail.com> wrote:

Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Thanks!

This one might be better for those who are afraid of "hot" circuits...

http://www.analog-innovations.com/SED/ZeroCross_LM339_SED.pdf

(Next to last listing on the S.E.D/Schematics page of my website.)

...Jim Thompson

21 parts! A personal best!

I aims to please >:-}


Most LM339s will do horrible goofy things, in all four sections, if you pull one
input a little below ground. D3 won't prevent that. See the National data sheet,
notes 3, 6, and 8. They warn about this *three* times. Also see their ZCD
example on page 14.

D3 does prevent substrate diodes from conducting.

It does not!

A silicon drop will *not* prevent a 339 from going wonky if you pull an input
below ground. That -0.3 volt max spec is, if anything, right on the edge. Look
at the zcd example on the National data sheet. After the diode clamp, they shift
positive. The other examples, where they do use a diode clamp, and conveniently
vague about V-.


Besides, those of
us intimately familiar with the LM339 know why those "horrible goofy
things" can't happen in my circuit.

And you don't. So you just throw your usual sand in the air.

OK, why can't it happen? You're going to get about a mA peak through D3, which
will pull the 339 input maybe 0.65 below ground. That's over twice the -0.3 max,
which the data sheet cautions against in at least four different places.

I've seen it happen with the National parts, and a silicon diode didn't fix it.
Maybe other vendors' clones aren't as bad.

The LM339 is at least 35 years old. Strange that National never bothered to fix
this. All they have done in those decades is make the warnings more obvious.

National's LM324 has that same problem, and others.

They want to sell you more expensive parts. 339s are good and useful
for sufficiently slow things, as well as being dirt cheap, like under
$200 per reel even from distributors.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
 
On Fri, 02 May 2014 12:22:59 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/02/2014 12:12 PM, Jim Thompson wrote:
On Fri, 02 May 2014 11:48:49 -0400, Phil Hobbs
pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:16 PM, Douglas Beeson wrote:
On Thu, 01 May 2014 10:01:53 -0400
Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/01/2014 09:39 AM, George Herold wrote:
On Thursday, May 1, 2014 8:10:51 AM UTC-4, Douglas Beeson wrote:
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Hmm, We'll have to wait for Jim, 'cause it's not obvious to me how it works.

Why not just a transformer and then a comparator with some hysteresis. You still would want to capacitively couple it I think.... let the average voltage be your "zero". And that looks to be what C1 is doing.

George H.

It's only complicated-looking because it's drawn badly, with the power
supplies mixed up with the signal wiring.

The top and bottom rails (after R2 and R3) are the power supplies, Cap
C1 turns the AC mains into essentially a regulated AC current source.
R1 limits the inrush to an amp or so so you don't pop the rectifiers,
and the two zeners clip off the tops to keep the voltage regulated.
R2/C3 and R3/C4 are the supply filters. (The positive supply lead on
the LM339 isn't shown, which adds to the confusion.)

So apart from whatever incidental voltage there is on the neutral, you
can think of the junction of D1 and D2 as sitting still at ground
potential. The other ends of D1 and D2 sit at +- a diode drop from there.

AC current is applied to the junction of D4 and D5 via R4 (plus a bit of
despiking from C5, to get rid of switching hash and so on). On the
positive half cycle, D4 conducts and the D3/D4 junction goes to +2 diode
drops, so U1 pulls low.

On the negative half cycle, D3 conducts in the same way, and U2 pulls low.

Within a diode drop of the zero crossings, neither D3 nor D4 conducts,
and both U1 and U2 are high. So the result is a brief pulse on each
zero crossing.

It's not a circuit you'd want to do anything much with, except drive an
optocoupler, because there are safety issues.

Cheers

Phil Hobbs



Dr. Hobbs,
Thank you for your very informative reply. In Jim's defense, I found the rest of the circuit to be pretty easy to understand. :)
doug

Jim's very protective about his circuits (good and bad). I wasn't
attacking him, I was doing the sci.electronics.basics thing, i.e.
walking through the circuit discussing what it does, for the benefit of
beginners. To encourage said beginners not to give up, I pointed out
out that the circuit looked even more complicated than it was, because
the power and signal paths weren't distinguished very clearly. Then he
got mad and started calling names, but I can't help that.

Jim's a chip designer, and so works in a different world than most of
the rest of us--a lot of his stuff gets made in large numbers and has to
work in far less well-controlled conditions that your average
instrument, over process corners and not-always-optimal customer designs.

In board-level designs, that frequently leads to using way too many
parts, but then board-level isn't his gig.

Cheers

Phil Hobbs

Yep. I tend to use too many parts, in discrete designs >:-} But the
result is circuits that work come hell or high water.

...Jim Thompson

Provided that Digikey doesn't run out of behavioural 339s. ;)

Cheers

Phil Hobbs

Yep :-D

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 02 May 2014 12:36:24 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

On 05/02/2014 12:21 PM, John Larkin wrote:
On Fri, 02 May 2014 08:11:44 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 01 May 2014 21:53:39 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Thu, 01 May 2014 17:41:13 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Thu, 1 May 2014 08:10:51 -0400, Douglas Beeson
c.difficile@gmail.com> wrote:

Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Thanks!

This one might be better for those who are afraid of "hot" circuits...

http://www.analog-innovations.com/SED/ZeroCross_LM339_SED.pdf

(Next to last listing on the S.E.D/Schematics page of my website.)

...Jim Thompson

21 parts! A personal best!

I aims to please >:-}


Most LM339s will do horrible goofy things, in all four sections, if you pull one
input a little below ground. D3 won't prevent that. See the National data sheet,
notes 3, 6, and 8. They warn about this *three* times. Also see their ZCD
example on page 14.

D3 does prevent substrate diodes from conducting.

It does not!

A silicon drop will *not* prevent a 339 from going wonky if you pull an input
below ground. That -0.3 volt max spec is, if anything, right on the edge. Look
at the zcd example on the National data sheet. After the diode clamp, they shift
positive. The other examples, where they do use a diode clamp, and conveniently
vague about V-.


Besides, those of
us intimately familiar with the LM339 know why those "horrible goofy
things" can't happen in my circuit.

And you don't. So you just throw your usual sand in the air.

OK, why can't it happen? You're going to get about a mA peak through D3, which
will pull the 339 input maybe 0.65 below ground. That's over twice the -0.3 max,
which the data sheet cautions against in at least four different places.

I've seen it happen with the National parts, and a silicon diode didn't fix it.
Maybe other vendors' clones aren't as bad.

The LM339 is at least 35 years old. Strange that National never bothered to fix
this. All they have done in those decades is make the warnings more obvious.

National's LM324 has that same problem, and others.

They want to sell you more expensive parts. 339s are good and useful
for sufficiently slow things, as well as being dirt cheap, like under
$200 per reel even from distributors.

Cheers

Phil Hobbs

The behavioral ones are even cheaper ;-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 02 May 2014 02:07:29 -0500, John Fields
<jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Fri, 02 May 2014 08:04:26 +1000, "David Eather" <eather@tpg.com.au> wrote:

On Fri, 02 May 2014 01:37:17 +1000, John Larkin
jjlarkin@highnotlandthistechnologypart.com> wrote:

On Thu, 1 May 2014 08:10:51 -0400, Douglas Beeson
c.difficile@gmail.com> wrote:

Hi all,

I did a search the other day on zero crossing detector circuits and
came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What
does it do?

Thanks!

That's a lot of parts for a simple function. It's from an old s.e.d.
thread.

Here are a few that I suggested:

https://dl.dropboxusercontent.com/u/53724080/Circuits/ZCD.JPG

https://dl.dropboxusercontent.com/u/53724080/Circuits/ZCD_2.JPG

https://dl.dropboxusercontent.com/u/53724080/Circuits/ZCD_3.JPG

https://dl.dropboxusercontent.com/u/53724080/Circuits/ZCD_x.JPG

That last one powers the gate from the line input, via the esd diodes.


(Beeson. I knew a Dr Beeson, a physicist, in New Orleans.)



John,
those first three won't work. If the LED's pass enough current so it
detects 0 volts somewhere near 0 volts then they burn out at the top of
the mains cycle.

You can buy dual optos with guaranteed CTRs of 2 or so (or darlingtons much
higher).

---
OK, but the CTR isn't as important as the CTR match for the same
current into the LEDs.

have you got a part number for something that'll supply reasonable
(?) accuracy around the zero-cross as the current falls to zero?

And, BTW, what would you consider to be "reasonable accuracy"?
---

So pick the input resistors for, say, 5 mA peak current, hardly a danger to an
LED in an optocoupler. That would be 10 mA peak collector current. Depending how
close to "zero" you want, you could work with 1 mA, or 0.5 mA out. That's plenty
of signal.

The totem-pole opto, my first circuit, needs very little phototransistor current
to drive CMOS rail-to-rail. As noted in the old SED thread, if you don't like
the delay from the opto speed, add a cap in series with one of the input
resistors, to add some phase lead... and reduce power dissipation.

---
The problem with that is the reactance of the cap is going to lower
the current into the LED, spoiling the CTR match between the
sections.

Will it matter? Offhand, I dunno.

Do you have a clue?
---

It's perfectly feasible. The reason to keep the current down isn't to protect
the LEDs, it's to keep the power dissipation down in the input resistors.

One dual opto, two resistors. Or even one resistor. Output is a clean, isolated,
r-r square wave.

---
Not from #3, since it's essentially a De Morgan equivalent "OR" with
an output which will be a narrow positive-going pulse which will
straddle the zero-crossings.
---

Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.


--

John Larkin Highland Technology, Inc

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com
 
In article <20140502095126.2f4f36c387a8334cc22cb468@gmail.com>,
c.difficile@gmail.com says...
On Thu, 1 May 2014 17:01:49 -0400
WangoTango <Asgard24@mindspring.com> wrote:

In article <20140501081051.f2341ef5d60270d968a0bc7b@gmail.com>,
c.difficile@gmail.com says...
Hi all,

I did a search the other day on zero crossing detector circuits and came across this nice one by Jim Thompson:

http://www.analog-innovations.com/SED/Zero_Crossing.pdf

I think I have figured out how it works, except for capacitor C1. What does it do?

Thanks!


Are you just looking at it to understand it, or are you looking for a
Zero Crossing Detector to actually use?

I have one that I have used for many moons that is a heck of a lot less
convoluted that this one and has proven to be quite reliable.


Thanks for your reply. I do have an actual need, but only at lower voltages (13.8 V max). It has to cutoff closer to zero than the 1 diode drop of Jim's circuit, though. I'm interested in seeing your design if you're willing to post it.

-doug
I've never looked at running it at that low a voltage. I think you
would run into the same issues with diode drops making it straddle zero
funky.
I'll drop the input resistors to match that voltage level and see what
it does. I'll let you know.
 
On Fri, 02 May 2014 12:16:01 -0700, John Larkin
<jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Fri, 02 May 2014 08:04:26 +1000, "David Eather" <eather@tpg.com.au> wrote:

[snip]
---

It's perfectly feasible. The reason to keep the current down isn't to protect
the LEDs, it's to keep the power dissipation down in the input resistors.

One dual opto, two resistors. Or even one resistor. Output is a clean, isolated,
r-r square wave.

---
Not from #3, since it's essentially a De Morgan equivalent "OR" with
an output which will be a narrow positive-going pulse which will
straddle the zero-crossings.
---

Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

You didn't answer John Fields question... you dodged... as usual.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 
On Fri, 02 May 2014 12:51:02 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Fri, 02 May 2014 12:16:01 -0700, John Larkin
jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Fri, 02 May 2014 08:04:26 +1000, "David Eather" <eather@tpg.com.au> wrote:

[snip]
---

It's perfectly feasible. The reason to keep the current down isn't to protect
the LEDs, it's to keep the power dissipation down in the input resistors.

One dual opto, two resistors. Or even one resistor. Output is a clean, isolated,
r-r square wave.

---
Not from #3, since it's essentially a De Morgan equivalent "OR" with
an output which will be a narrow positive-going pulse which will
straddle the zero-crossings.
---

Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

You didn't answer John Fields question... you dodged... as usual.

...Jim Thompson

He seems to be pointing out that some of my circuits output a square
wave and some make a pulse at each zero crossing. I can't deny that.

I can't see what De Morgan's Theorem has to do with anything here,
other than some words to throw around.


--

John Larkin Highland Technology, Inc

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com
 
In article <cvg7m9lbf1ik416tuu0in4o6ld83lapik9@4ax.com>, To-Email-Use-
The-Envelope-Icon@On-My-Web-Site.com says...
More sand in the air. Expands on my comment that you know nothing
about how an LM339 works.

...Jim Thompson

It works without a Vcc supply?

Cool.

Yes! Ain't that marvy >:-}

...Jim Thompson

So, I guess the Vcc that is in the PDF is there to supply the
current for the internal LED flash light, in case the electrons
want to look back to see where they have just came from!

Interesting, that some fancy silicon..

Jamie
 
On Fri, 02 May 2014 14:58:51 -0700, John Larkin
<jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 12:51:02 -0700, Jim Thompson
To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

On Fri, 02 May 2014 12:16:01 -0700, John Larkin
jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Fri, 02 May 2014 08:04:26 +1000, "David Eather" <eather@tpg.com.au> wrote:

[snip]
---

It's perfectly feasible. The reason to keep the current down isn't to protect
the LEDs, it's to keep the power dissipation down in the input resistors.

One dual opto, two resistors. Or even one resistor. Output is a clean, isolated,
r-r square wave.

---
Not from #3, since it's essentially a De Morgan equivalent "OR" with
an output which will be a narrow positive-going pulse which will
straddle the zero-crossings.
---

Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

You didn't answer John Fields question... you dodged... as usual.

...Jim Thompson

He seems to be pointing out that some of my circuits output a square
wave and some make a pulse at each zero crossing. I can't deny that.

---
The text and links to graphics you snipped clearly indicated that
your #3 put out a square wave when, in fact, as you're now
backhandedly admitting, it puts out a narrow pulse which straddles
the zero crossings.

More importantly, though, you snipped the request for information as
to the part number of a dual opto with tight enough CTR matching to
achieve what _you_ consider to be an accurate enough zero-crossing
capture for the discussion at hand, and the request for information
as to the effect of the reactance of a phase-lead cap on the CTR
matching of the opto pair.

Typical Larkinese move: Don't answer any compromising questions;
just pretend they never existed and pretty soon everybody will
forget about it, saving you some face.
---

I can't see what De Morgan's Theorem has to do with anything here,
other than some words to throw around.

---
Then you don't understand De Morgan's theorem as it relates to your
circuit.

Or, maybe, not at all...
 
On Fri, 02 May 2014 12:16:01 -0700, John Larkin
<jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:


Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

---
I didn't just fall off the turnip truck, and I've never seen it used
in other than a derogatory way.

Do you have a link to verify your claim?
 
On 5/2/2014 8:33 PM, John Fields wrote:
On Fri, 02 May 2014 12:16:01 -0700, John Larkin
jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:



Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

---
I didn't just fall off the turnip truck, and I've never seen it used
in other than a derogatory way.

Do you have a link to verify your claim?

http://tinyurl.com/jvlo89z

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
 
On Fri, 02 May 2014 20:37:47 -0400, Phil Hobbs
<hobbs@electrooptical.net> wrote:

On 5/2/2014 8:33 PM, John Fields wrote:
On Fri, 02 May 2014 12:16:01 -0700, John Larkin
jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:



Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

---
I didn't just fall off the turnip truck, and I've never seen it used
in other than a derogatory way.

Do you have a link to verify your claim?

http://tinyurl.com/jvlo89z

Cheers

Phil Hobbs

So spricht der Sykophant
 
On Fri, 02 May 2014 20:37:47 -0400, Phil Hobbs
<hobbs@electrooptical.net> wrote:

On 5/2/2014 8:33 PM, John Fields wrote:
On Fri, 02 May 2014 12:16:01 -0700, John Larkin
jlarkin@highlandtechnology.com> wrote:

On Fri, 02 May 2014 02:07:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 01 May 2014 21:39:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:



Compare that to some of the other dozens-of-parts hairballs
posted here that don't even isolate.

---
Isolation is easy to get, accuracy isn't so easy, and "Hairballs" is
a derogatory term and has no place in an emotion-free discussion,
especially from an engineer who demeans emotionality in technical
discussions.

"Hairball" is an accepted technical term for an overly complex design,
often asynchronous logic, that has hazards.

---
I didn't just fall off the turnip truck, and I've never seen it used
in other than a derogatory way.

Do you have a link to verify your claim?

http://tinyurl.com/jvlo89z

Cheers

Phil Hobbs

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 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.
 

Welcome to EDABoard.com

Sponsor

Back
Top