Mains voltage zero crossing detector with optical isolated output

I've been saying it wrong... with the AC feedback, there is an _even_ number of inverters. I'll dig thru my models and see if I have an 'HC04 to demo with. I have 'HCU04 that I use for XTAL oscillators and such. ...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
Loading thread data ...

But it *doesn't* move at all until the input is already through the transition region, surely? By which time the damage is done.

I can see a single-stage gate version working OK. But the three invertors actually work against you as far as I can see. The final one doesn't move until the first one is already through the transition.

[...]
--

John Devereux
Reply to
John Devereux

What "transition" region is that?

Two-stage is indeed best, but you can only do that with 'HCU04, which now strikes me as the best way to go. Lose the "buffered" stuff you don't need for such circuits as ours.

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

The transition of the input (first) stage. With a ramp on the gate input, the "off" transistor starts to turn on while the "on" transistor starts to turn off. So there is a transition region where both are on, AIUI. If your ac feedback was from this first stage then it might work as intended. Or not, there could be current flow but no output voltage change. At any rate the *second* and subsequent stages do not start to move until the first one is already drawing your substantial and lengthy current.

--

John Devereux
Reply to
John Devereux

'HC04 is three inverters scaled roughly 1X 3X 9X in size, the bulk of the overlap current occurs in the output, when it moves... when it moves, the snap occurs.

I don't have a model for anything but the 'HCU04 version (the digital in my simulations are behavioral, so they don't tell you the overlap current, but do show the snap... observe the _2 version). Why don't you try it in the lab.

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

That

Bible

have at

treated

Maybe. What JL describes happens here in Sacramento as well and other places i have been. Not so much in the big urbaplexes.

?-)

Reply to
josephkk

Pondering, while I was working on another topic, I believe my "snap" really isn't worth the effort in the discrete world where the devices are huge, and the delays enormous. I think Hobbs has the right number, it'll just halve the net overlap current. Tomorrow I'll try it with two 'HCU04, which I have a device-level model for and see what that looks like.

In my ASIC world I can take two 100ps inverters and stretch it out to

20ns without so much as a 100uA penalty. ...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

Hmmph. Along the way i got years of invitations from them. I looked = into it, you pays to get your name in, nothing else is involved. They really want money, not you.

?-)

Reply to
josephkk

No. The positive feedback in your ZCD circuit comes from the outputs of the second level of gates. That is a total of *six* inverter stages around the loop.

The snap won't happen until the first inverter's output crosses mid-supply, and the downstream stages recognize that, and the transition makes its way through the entire 6-stage loop. The first stage has already ramped up to full shoot-through current before that happens.

The other issue is that six stages of prop delay can store information, several bits worth. So a fast noise burst can load the information pipeline *before* anything can emerge from the output and do the schmitt thing. Then it's too late... those nasty transitions are propagating through the chain of inverters and *will* emerge.

That's why applying external hysteresis, to logic or to comparators, doesn't itself guarantee clean output transitions.

Behavioral sims again! But they don't behave.

--

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
Reply to
John Larkin

Really? I am so disillusioned.

--

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
Reply to
John Larkin

Yep. That's why my ASIC trick with only 2 stages works there, but not in the discrete world.

Is there an 'HC _buffer_ with only two stages?

Doesn't happen with a 2-stage approach, C feedback, input fed thru a resistance.

That's why I like the comparators plus R-S approach for slow stuff as in...

formatting link

Timing wise, they do, currents no. ...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

Well presumably the HC14 designers would have done something like that too. It is a well known effect in schmitts (it would seem... I didn't know about it before I found out the hard way), The "excess current" parameter is mentioned on datasheets. So the designers know about it and will try to minimise it if possible. So it could be that a HC14, optimised for the job, is *better* here than a HC04 which isn't.

Or not.

Yes, I think it needs to be tried to settle the question. I will if I get time.

[...]
--

John Devereux
Reply to
John Devereux

Can you supply some credible evidence of that?

Bald assertions won't do.

Reply to
Pomegranate Bastard

--
I think he'd enjoy it more if you turned him out. ;)
Reply to
John Fields

So do shiny objects.

Reply to
JW

You couldn't have. You're still alive.

Reply to
JW

What I'd really enjoy is either of you saying something sensible about electronics. I'm not optimistic about that.

--

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
Reply to
John Larkin

I don't think i have trusted a data sheet for the last two decades. And what i have seen here about PICs and other small uC and PSOC (and ADC/DAC and SPI peripherals) convinces me that never to do so again.

?-)

Reply to
josephkk

Phil Hobbs put his finger on it, that hysteresis like that only reduces net overlap current by 1/2. It took his statement a while to register, as I played the waveforms in my head... I think the third glass of wine helped :-)

Likewise the 'HC14. There they twiddle with switching-in extra devices that give a shift in "threshold", thus hysteresis. Looks like newer 'HC14 have spread the hysteresis further (probably because of far better process control than in the past), so thresholds are ~1/3 and 2/3 of VDD... net ~1/3 of overlap 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     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Well, so did I. This ain't rocket science.

I will note that your RC feedback network loads and slows down the input signal *before* the thing snaps. That extends the duration of the shoot-through current... roughly cuts the slew rate at the first gate input in half, neatly canceling the cited 1/2 advantage of the hysteresis.

Plus, the feedback spike slams into the ESD or equivalent diodes, wasting a little more power.

It took his statement a while to

But an HC14 is designed to work in the linear region, and shoot-through current is controlled by design and often specified, with typicals around 0.5 mA at 5 volts supply. And an HC14 won't go linear and oscillate, which an HC04 likely will. If it does oscillate, all 18 stages in the package will pull a *lot* of supply current, with interesting dynamics [1]. That's a completely unnecessary hazard, not to mention hard to think about.

So why not use an HC14?

John

[1] it becomes a positive-feedback ring oscillator! Like a metastable LS74.
--

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