Maker Pro
Maker Pro

Looking for two-input comparator with hysteresis

K

Keith

Jan 1, 1970
0
On Wed, 24 May 2006 23:12:50 -0400,


I just can't see the point of using an optical insulator fore *safety*
reasons in a circuit which has both sides of the insulator connected
galvanically anyway. If the transformer insulation fails, the whole
circuit is live. On both sides of the isolator.

The isolator also makes a pretty good (open collector, usually)
driver for the logic circuit too. No funny stuff with ESD diodes
pretending to be clamps. It wasn't clear (to me) from the original
article that he was tapping the line frequency after the isolation
transformer.
 
R

Rich Grise

Jan 1, 1970
0
Power maybe ? I can't see anyone designing a battery clock that has to be
connected to the mains to get its reference frequency !


That's the way they all were, up to about 20-30 years ago. ;-)

Cheers!
Rich
 
J

John Larkin

Jan 1, 1970
0
It's fairly common, actually. The mains frequency is far better
than you're likely to find at a reasonable cost otherwise.

There are clocks that run off of and count the AC line, but cut over
to battery power and a crystal oscillator during AC power failures.
The AC line is far more longterm accurate than any affordable crystal
oscillator.

John
 
R

Rich Grise

Jan 1, 1970
0
50 Hz where the OP lives actually. ;-)

How many seconds do they have in a minute?
[/QUOTE]

100. They're metric over there, you know. ;-)

Cheers!
Rich
 
R

Rich Grise

Jan 1, 1970
0
]
I'm building a digital clock circuit ...

Any suggestions would be much appreciated.

Any old fool can tap into that transformer to pulse a Schmitt trigger or
comparator or what have you, but tapping into the timing in such a way
that the resulting reference clock is not cumulatively "pulled" by the
DC loading of the circuit or mains variation is an entirely different
story. What is the periodicity of the mechanicals, and what is the logic
loading and its long term cycling profile? What kind of timing accuracy
are you looking for over a 24 hour period? The answer to your problem
may be much deeper than you expect.

If the schmitt is squaring up 60 Hz cycles, how can DC offsets or
"mains variations" affect clock accuracy? If you count each line cycle
exactly once (not zero times, and not twice) where's the error?

The 60 Hz line is sort of the definition of clock time.

You are trapped into thinking about steady state. It is the transition
between steady states that causes the error to accumulate over the long
term. The '339 circuit pulls nonlinearly with line amplitude. Therefore
it will accumulate error.

OK, if 5,184,000 sine cycles go into the comparator every day, and
5,184,000 square cycles come out every day, where does the error
accumulate?
[/QUOTE]

I think the idea was that line glitches could give false triggers,
and if the comparator doesn't have hysteresis, it could oscillate during
the relatively slow transition at 50 Hz. I did this with an LM324 once,
and didn't bother with hysteresis or anything, but it was only used to
start an 8.333 ms timing loop, so any glitches (if there actually
_were_ any - I can't verify or refute that) were locked out in software.

I wonder how long the OP is going to keep this thread going before he
actually tries any of these suggestions?

Thanks,
Rich
 
R

Rich Grise

Jan 1, 1970
0
I still don't feel quite right doing it though. And for just *one resistor*
extra.

Sure, feelings are what really matter.
[/QUOTE]

They aren't the _only_ thing that matters, but they're not to be dismissed
out of hand. ("I've got a bad feeling about this..." "Oh, go ahead.
Feelings don't matter!" "OK, here goes - AAIIEEeeee-<splat>")

Thanks,
Rich
 
R

Rich Grise

Jan 1, 1970
0
That accords with the last info posted on the subject here too.

Ta, Graham

How about "Shot-key"? I knew a Dutch guy once, who somehow stuck a K in
the middle of it.

Thanks!
Rich
 
J

Joerg

Jan 1, 1970
0
Hello Keith,
Nah, if you look closer they're all digital (see: Plank). ;-)

Yeah, ol' Max took the wind out of the sails of us analog guys.
 
P

Pooh Bear

Jan 1, 1970
0
Robert said:
On Fri, 26 May 2006 00:26:55 +0100,


Not necessary, as I already pointed out. Let the voltage be clamped by
the IP diodes.

I had a fairly long chat about this with John Larkin. Whilst I acknowledge this
is acceptable I simply prefer not to do it. There's some 'history' behind my
reasoning.
The resistor is just a current limiter, with some
filtering action thrown in by the cap.

Yup.

Graham
 
P

Pooh Bear

Jan 1, 1970
0
Fred said:
When the mains amplitude climbs to a new magnitude, the '339 triggers
increasingly early during the cycles comprising the transition- and
"early" is relative to the trigger period prior to the amplitude change.
These trigger period transitions will be different from those due to a
mains amplitude decrease, because of the waveform input to the '339.
Mean trigger cycle perturbations do not zero- they accumulate- the
circuit is weighting the perturbations due to mains amplitude decrease
by more than the increase. And even if the weighting is equalized, there
is no reason for the mains fluctuation to zero, it will be a function of
the energy profile of the grid.

And this is relevant to an electro-mechanical clock exactly how ?

Graham
 
P

Pooh Bear

Jan 1, 1970
0
Keith said:
It's fairly common, actually.

For a *battery* powered clock ????
The mains frequency is far better
than you're likely to find at a reasonable cost otherwise.

Oh yes. Definitely.

Graham
 
J

John Larkin

Jan 1, 1970
0
I had a fairly long chat about this with John Larkin. Whilst I acknowledge this
is acceptable I simply prefer not to do it. There's some 'history' behind my
reasoning.

One should always be skeptical of learning from experience.

John
 
P

Pooh Bear

Jan 1, 1970
0
John said:
There are clocks that run off of and count the AC line, but cut over
to battery power and a crystal oscillator during AC power failures.
The AC line is far more longterm accurate than any affordable crystal
oscillator.

I have one that's similar except it runs of a 'crystal' all the time. Wish it
didn't. It's cheap and drifts with temp. Only stays accurate @ around 20C. It's
just enough drift to be annoying. Also the battery backup seems to have enough
leakage to drain the battery before you ever need it ! Doh !

Graham
 
K

krw

Jan 1, 1970
0
Since just about every opto is safety approved, farnkly why bother ?

Mainly because if someone has to ask these questions I assume he's
out to kill himself. *I* suggested the opto. Others think it's
superfluous. Maybe, but not knowing the OP...
You're *joking*. On a cheap consumer product every single component that's not
actually needed isn't there.

Show me where the OP is building a cheap consumer product?! You
ass-u-me quite a lot!
 
K

krw

Jan 1, 1970
0
On Wed, 24 May 2006 22:12:24 +0000,


Don't think potential here. You might even omit the capacitor. Your
circuit is relying on the input protection diodes of the schmitt (check
your data sheet) to limit the input voltage.

....and this is a bad idea, unless the manufacturer specs their use
in this way (as Xilinx does).
The cap is just there to filter out multiple triggering by runt pulses on the AC line.

Not necessary if the clock is a uC.
 
P

Pooh Bear

Jan 1, 1970
0
krw said:
Battery backed up, sure. The OP was connecting to the mains
though.

I meant literally a battery operated appliance. Not the OP's clock.

Graham
 
P

Pooh Bear

Jan 1, 1970
0
krw said:
Show me where the OP is building a cheap consumer product?! You
ass-u-me quite a lot!

I'm applying the thinking that would go into such a device in large scale
production. It's not unsafe in any way,

Graham
 
K

krw

Jan 1, 1970
0
I'm applying the thinking that would go into such a device in large scale
production. It's not unsafe in any way,

It *IS* for anyone who has to ask these questions. Maybe you
should read the thread rather than shoot from the hip, again.
 
P

Pooh Bear

Jan 1, 1970
0
krw said:
It *IS* for anyone who has to ask these questions. Maybe you
should read the thread rather than shoot from the hip, again.

I read the thread comprehensively. The OP was in fact doing exactly what I recommended.
Maybe you should instead read what I said ? You'll find I inserted all the appropriate
caveats.

Graham
 
Top