Mains voltage zero crossing detector with optical isolated output

Feb 15, 2012 482 Replies

Kissing up to your sycophants? Got to keep 'em blowing ?:-)

As for doing digital you know very well that I did all of ON Semi's 'HC stuff.

What a blowhard. Did you take your mind-altering drugs yet tonight? Hurry, you're almost over the edge. ...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.

Well it is not quite what i would call a zero crossing detector, which say, would output a pulse when the mains crossed zero. JL's device is more a halversignum converter, or polarity detector. Amphiboly intended.

?-)

Then why don't you know how ESD diodes work?

Well, I did have a beer in your honor.

ftp://jjlarkin.lmi.net/food/Jim_Beer.JPG

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

[snip]

I do and you don't.

[snip] ...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.

AHA! Just as I thought, you bought yourself a glitchy signal to the PE inputs because of the unavoidable metastability inherent in the first dflop. Now, one might argue that the glitchy input is unimportant since the PE inputs are asynchronous and the glitchy signal will eventually settle down, but still... The right way to do it is like this: +----+ +----+ COMP>-+--|D Q|----|D Q| | | | | _| CLK-+-|--|> | +-|> Q|-+---A | | +----+ | +----+ | NOR Y-->PE_UP | +----------|--------|-+-B | |\ | | | +---O| >-----+ | | |/ | +-A | AND Y-->PE_DN +---B Notice that the edges from the comparator supply clean PE pulses from the gate outputs. >Now, go back to sci.electronics.basics for a few years.

Thanks for the link. :-) I'm kinda trolling Larkin to see whether he'll trip himself up. ;)

r

If a tree fell in the forest and nobody was there would it make a sound?

If you put it to Larkin and he did not realize it, would it matter?

[snip]

Discrete equivalents of methods much easier to do on a custom ASIC:

formatting link

I've also done a three-rank D-flop chain, AND'ing the last two Q's. ...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.

You're not actually interested in electronics. You're here to play stupid ego games.

You're not very good at either.

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

How can he "put it" to anyone when he's usually, obviously wrong?

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

Of course not... you are the champion egomaniac, self-admitted manic depressive, and overall mental defective ;-) ...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.

As I said, a single front-end synchronizer fixes the race problem but doesn't address the metastability issue. There is no absolute fix for the metastability issue, and the overall hairball isn't worth a lot of effort to fix.

An beginner is, objectively, still an beginner.

And how is that synchronized to the clock? More async hairball logic.

Oh, it has rising edge problems. It might not make PE-DN pulses at all. And I'm sure Jim will rag you for bashing the ESD diodes.

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

Then say something substantive; quit telling us how great you are without occasionally including some actual facts. Like, for instance, what is actually wrong about either of my suggestions.

Snip? Don't like my taste in beer?

Keep on cluckin' !

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

You're not very good at either, either.

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

Once it goes into a CPU pin, all sorts of processing can be done. It might be useful to know the line phase; a pulse every zero crossing is amphibolous in that respect.

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

Since the criterion for "rightness" is having clean pulses out of the gates which last long enough to enable the presets, then that's the right way to do it.

Where's the metastability problem here?: .         +----+    +----+ .COMP>-+--|D  Q|----|D  Q| .      |  |    |    |   _| .CLK-+-|--|>   |  +-|>  Q|-+---A .    | |  +----+  | +----+ | NOR  Y-->PE_UP .    | +----------|--------|-+-B .    |    |\      |        | | .   +---O| >-----+        | | .        |/               | +-A .                         | AND  Y-->PE_DN .                         +---B

You keep posting stuff that won't work, and insulting people who point it out. That's really dumb.

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

[snip]

Good observation. Maybe that explains Larkin's problem. He _does_ behave all the time like a bitch on the rag. ...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.

You seem to be another of those guys, like JF and AlwaysWrong, who don't like women. That's really weird. Repulsive, too.

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

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required