Maker Pro
Maker Pro

Opto-isolated zero crossing detector

M

markp

markp said:
John Devereux said:
markp said:
message
I have an sinusoidal AC signal between 30V and 160V AC and between
200
and
600Hz in frequency, and I need an opto-isolated zero crossing
detector.
The
AC is actually from a transformer output but I don't want to add
any
more
windings to it. I do however have a centre tap on the AC output.
Does
anyone
have any suggestions?
[...]


This should work.

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

You don't need galvanic isolation, you just need a little common-mode
rejection.

John


Thanks for this. I think this circuit might work, but I worry about
the
opamp/comparitor (which I think might have to be an instrumentation
type)
being very high impedance and the possibility of noise picked up in
that
area from elsewhere. I'd rather have true isolation to be honest.

The impedance only 2kohms.

Yes, but the variation in input impedance of the opamp inputs (and hence
input biasing and offset currents) will negate the balancing of the
500:1
resistor dividers. To get accuracy from this circuit the impedance of
the
opamp has to be orders of magnitude greater than 1M.

Hi Mark,

Don't think so - it just needs to be orders of magnitude greater than
2k, which is a lot easier :) As a worst case imagine there is a 1M
resistor across one of the 2k. It only makes a ~0.2% difference to the
ratio.

OK. Are you sure that input offset currents are not going to cause any
problem? If the common mode causes the inputs of the opamp to both be
above 2.5V then to get positive input bias and offset currents this has to
come from the 1M resistors. Is that not going to perturb the accuracy?

Mark.

Actually forget that. Since I'm strapping one of the outputs or the centre
tap to ground, the point of accuracy will be when both inputs are at ground.
As long as I don't strap these to any other potential and my logic ground is
close to the strap potential it looks like it would be OK.

Mark.
 
J

John Devereux

markp said:
markp said:
John Devereux said:
message
news:[email protected]... [...]
This should work.

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

You don't need galvanic isolation, you just need a little common-mode
rejection.

John


Thanks for this. I think this circuit might work, but I worry about
the
opamp/comparitor (which I think might have to be an instrumentation
type)
being very high impedance and the possibility of noise picked up in
that
area from elsewhere. I'd rather have true isolation to be honest.

The impedance only 2kohms.

Yes, but the variation in input impedance of the opamp inputs (and hence
input biasing and offset currents) will negate the balancing of the
500:1
resistor dividers. To get accuracy from this circuit the impedance of
the
opamp has to be orders of magnitude greater than 1M.

Hi Mark,

Don't think so - it just needs to be orders of magnitude greater than
2k, which is a lot easier :) As a worst case imagine there is a 1M
resistor across one of the 2k. It only makes a ~0.2% difference to the
ratio.

OK. Are you sure that input offset currents are not going to cause any
problem? If the common mode causes the inputs of the opamp to both be
above 2.5V then to get positive input bias and offset currents this has to
come from the 1M resistors. Is that not going to perturb the
accuracy?

It is true that the 1M resistors need to be matched to 1% or 0.1%, as JL
has shown. So if you think you could get <<100Mohm across one of them,
due to surface contamination perhaps, then it is no good for you. But I
was addressing the impedance of the *amplifier* and its nodes, which is
what you were worrying about above.
 
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between 200 and
600Hz in frequency, and I need an opto-isolated zero crossing detector. The
AC is actually from a transformer output but I don't want to add any more
windings to it. I do however have a centre tap on the AC output. Does anyone
have any suggestions?

Thanks!

Mark.

Let's see, current limiting resistor, into bridge with 5V zener and
opto. Maybe a resistor across the zener.
 
S

Spehro Pefhany

Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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

Of course "The Bloviator" will claim too many parts, at the same time
not providing component values on his own "designs".

You can build my representation as shown... and it WILL work.

Simplistically, from a years ago (1978) disco design...

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

Also mentioned recently here in...

Message-ID: <[email protected]>

Adequate for non-critical Triac synchronization

...Jim Thompson


I have this (perhaps) amusing NON-isolated contribution, but anyone
using it does so _entirely_ at their own risk. ;-)


1M --> <-- pulse width
___
+ -|___|------------------+ +--+
| ___ | | |
+ -|___|- | ------+ +-----
| | | __
| 1M | __ +-\ \ Zero cross
| +-------\ \ | |o----- output
| | | |o-----/__/
| +-------/__/
AC HOT |
.-.
AC NEUTRAL | |
| | |
| '-' 510K
GND |

VCC

Width of the pulses is (1/(pi*f)) * sin^-1(Vdd/(sqrt(8)*Vline(rms)),
so for a 10V supply and 120VAC/60Hz line input it would be ~150usec.
It will be offset a bit because of the input capacitance, but only a
few microseconds.
 
M

markp

Jim Thompson said:
Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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

Funnily enough I did something very similar for another project, that is use
a bridge rectifier with a capacitor to create a low voltage 'off-line' DC
supply for a micro, then used the neutral wire as a reference into the micro
with a current limiting resistor. What actually happens is the low voltage
DC supply goes up and down wrt neutral, the micro sees + and - edges when it
crosses the neutral potential. That works fine, LTSpice simulated and built.
But it's non-isolating.

Mark.
 
J

Jon Kirwan

Cute. But applying name substitution, JT would say...


As long as we're doing cluckworthy circuits...

___
+ -|___|- xor
| | xor __
| 1M | __ +---------\ \ Zero cross
| +-------\ \ | | |------ output
| | |--+---R--+--/__/
| +---/__/ |
AC HOT | C
gnd |
AC NEUTRAL gnd
|
|
GND


If R is big, 1M maybe, you can eliminate C. Or replace R+C with two
more xor gates if they're unused, delay-line thing.

Let the pecking begin!

Spehro chose to use a resistive divider at his circuit's AC
side, which makes sense to me. In your above case, the input
is tied via 1M to the AC, with no divider at all. I'm not
nearly as comfortable with that approach regardless of the
rest of it.

Jon
 
M

markp

markp said:
Funnily enough I did something very similar for another project, that is
use a bridge rectifier with a capacitor to create a low voltage 'off-line'
DC supply for a micro, then used the neutral wire as a reference into the
micro with a current limiting resistor. What actually happens is the low
voltage DC supply goes up and down wrt neutral, the micro sees + and -
edges when it crosses the neutral potential. That works fine, LTSpice
simulated and built. But it's non-isolating.

Mark.

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.
 
J

Jon Kirwan

Spehro chose to use a resistive divider at his circuit's AC
side, which makes sense to me. In your above case, the input
is tied via 1M to the AC, with no divider at all. I'm not
nearly as comfortable with that approach regardless of the
rest of it.

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
 
S

Spehro Pefhany

Cute. But applying name substitution, JT would say...

Would he?
As long as we're doing cluckworthy circuits...

___

If R is big, 1M maybe, you can eliminate C. Or replace R+C with two
more xor gates if they're unused, delay-line thing.

Let the pecking begin!


John

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)
 
S

Spehro Pefhany

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

A cluck anyhow.
Mine is high for ±Vbe about the zero-crossing.

...Jim Thompson


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.
 
J

Jon Kirwan

Just gently banging the ESD diodes.

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

Jon
 
G

Grant

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

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

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.
 
J

Joerg

Jim said:
Jim said:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between 200
and
600Hz in frequency, and I need an opto-isolated zero crossing detector.
The
AC is actually from a transformer output but I don't want to add any more
windings to it. I do however have a centre tap on the AC output. Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can be done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well before
the real zero-crossing happens.
Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

www.analog-innovations.com/SED/Zero_Crossing.pdf
But Mark needs an isolated one.

[...]

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

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.
 
J

Joerg

John said:
Jim said:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between 200
and
600Hz in frequency, and I need an opto-isolated zero crossing detector.
The
AC is actually from a transformer output but I don't want to add any more
windings to it. I do however have a centre tap on the AC output. Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can be done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well before
the real zero-crossing happens.
Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

www.analog-innovations.com/SED/Zero_Crossing.pdf
But Mark needs an isolated one.

[...]

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.

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

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.

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.
 
J

Joerg

Jim said:
Jim said:
Jim Thompson wrote:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between 200
and
600Hz in frequency, and I need an opto-isolated zero crossing detector.
The
AC is actually from a transformer output but I don't want to add any more
windings to it. I do however have a centre tap on the AC output. Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can be done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well before
the real zero-crossing happens.
Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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

But Mark needs an isolated one.

[...]
Use that pulse (buffered) to drive the opto-coupler.
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.

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

I saw that. Might want to add 1M or something like that between line and
neutral, for discharge.

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

Assumptions have sunk many a ship :)

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

But you'd still have one left over. What a waste of resources there :)
 
G

Grant

Jim said:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between 200
and
600Hz in frequency, and I need an opto-isolated zero crossing detector.
The
AC is actually from a transformer output but I don't want to add any more
windings to it. I do however have a centre tap on the AC output. Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can be done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well before
the real zero-crossing happens.

Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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

But Mark needs an isolated one.

[...]

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.

Decades ago there were iffy 741 opamps coming in, so we had to test
them prior loading into boards.

I made a little 2 opamp triangle wave oscillator with LED, if a new
opamp work in the integrator section it was okay, but if a bad opamp
worked as a comparator, we binned separately them for that use ;)

Ones that could do both were binned to make up for the others.

Can't remember which brand they were, probably the cheapest available.
Didn't use a separate comparator chip, & response time didn't matter.

Grant.
 
M

markp

Jim Thompson said:
Jim said:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between
200
and
600Hz in frequency, and I need an opto-isolated zero crossing
detector.
The
AC is actually from a transformer output but I don't want to add any
more
windings to it. I do however have a centre tap on the AC output.
Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can be
done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well
before
the real zero-crossing happens.

Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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

But Mark needs an isolated one.

[...]

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

...Jim Thompson

This doesn't provide accurate zero crossing because of the phase delay
introduced by the capacitor and resistor (C1 and R1). That phase delay will
change with frequency and will vary with voltage. Unfortunately I need
between 30V and 160V AC and between 200Hz and 600Hz oherwise this could have
worked - the problem is using a capacitor to limit current and the phase
delay that creates.
 
M

markp

markp said:
Jim Thompson said:
Jim Thompson wrote:
markp wrote:
markp wrote:
Hi All,

I have an sinusoidal AC signal between 30V and 160V AC and between
200
and
600Hz in frequency, and I need an opto-isolated zero crossing
detector.
The
AC is actually from a transformer output but I don't want to add
any more
windings to it. I do however have a centre tap on the AC output.
Does
anyone
have any suggestions?

Why opto? Can't you use a modem transformer that gets a divided-down
signal at the input and has the proper isolation specs? Then use a
regular zero-crosser of your liking on the others side where things
don't have to run isolated.

From a size point of few such a signal transformer and an
optocoupler
aren't grossly different. A little, maybe.

--
Regards, Joerg
It's an option, but may be a little more expensive. I'm sure it can
be done
with just an optocoupler.

Sure it can be. But the accuracy suffers greatly. You can only send so
many milliamps into an optocoupler and then it signals "out" well
before
the real zero-crossing happens.

Discrete representation (high transistor count of chip would scare you
:) of what I do in off-line-powered appliance controller chips...

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


But Mark needs an isolated one.

[...]

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

...Jim Thompson

This doesn't provide accurate zero crossing because of the phase delay
introduced by the capacitor and resistor (C1 and R1). That phase delay
will change with frequency and will vary with voltage. Unfortunately I
need between 30V and 160V AC and between 200Hz and 600Hz oherwise this
could have worked - the problem is using a capacitor to limit current and
the phase delay that creates.

Forget that! This would be tru if you used the neutral as the input, but it
actually uses the hot line I forgot to look at the timing diagrams on the
second page :(
 
J

Joerg

Jim said:
Jim said:
[snip]
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.
Did you look at the schematic? It's (the zero-crossing detection)
powered from the line via the 220nF capacitor.
I saw that. Might want to add 1M or something like that between line and
neutral, for discharge.

Why bother? The OP asked for a zero-crossing detector. Allusions to
opto-coupling indicates he has a transformer-isolated PS, so that
primary will dump any "Darwin" current ;-)

ROFL! Darwin current, classic! That was a good one.
Did you read the thread, or do you just like to ramble ?:)

I did read the whole thread and other than a transformer with too high a
voltage I don't remember anything. You'd you be looking at yet another
power supply.

Transformers are unreliable for accurate zero-crossing timing.

Not if they are wideband enough. Check out the Triad Magnetics stuff.
 
Top