Reply by F. Bertolazzi December 3, 20102010-12-03
jacko:

> for a pic a spi version would be better,
Well, for a Peripheral Interface Controller anything would be better than faking an MCU.
Reply by Glenn Gundlach November 22, 20102010-11-22
On Nov 22, 8:43=A0am, Cesar Rabak <csra...@bol.com.br> wrote:
 > Em 20/11/2010 23:43, Glenn Gundlach escreveu:
 >
 > > On Nov 17, 9:21 am, Jim Stewart<jstew...@jkmicro.com> =A0wrote:
 > > =A0 > =A0Rob Gaddi wrote:
 > > =A0 > =A0> =A0Way too expensive. Just plug into the mains and learn to
count to
 > > 60 or
 > > =A0 > =A0> =A050 as the case may be. Doing so without electrocution is
left as
 > > an
 > > =A0 > =A0> =A0exercise for the reader.
 >
 > > =A0 > =A0Have you ever successfully done this? =A0I ask
 > > =A0 > =A0because I've never seen an implementation that
 > > =A0 > =A0was more accurate than a $2 crystal and clock
 > > =A0 > =A0chip.
 >
 > > A synchronous motor clock does exactly this and is dead accurate.
 >
 > But it's also a damn good low pass filter. =A0. =A0.
 >
 > > The
 > > power grid wouldn't work if the generators all weren't in phase.
 > > Counting zero crosses is easy. In my clock I added 1 diode before
the
 > > main filter cap so I have 120Hz ripple. Run that into a
comparator to
 > > create an interrupt for the processor and just count to 120 and
bump
 > > the seconds, minutes, hours, days, months and years.
 >
 > Put your zero crossing detector in the same circuit than an
ordinary
 > blender (if you're _really_ bold, get one SCR phase controlled ;-)
and
 > see the accuracy of your clock go to the drain. . .

Would a variable speed power drill plugged into the same outlet fill
the bill ?

I had the problems you're describing when I first fired it up in 2001.
My solution was to use one of the built in timers to disable the 120
Hz interrupt for 92% of the time. I just looked at the 120Hz on the
scope while running the drill. The phase and pulse width shifts up to
200 uSec. but there were no extra pules.

 > > The trick is to not count 'noise' but it's as easy as Rob
implies.
 >
 > It's not that easy, except if the application has low expectancies
about
 > the accuracy of your clock display.
 >
Noise is under control and not messing things up.

 > > During a power failure it substitutes its own 120 Hz to keep
counting during power
 > > failures.
 >
 > Which for reasonable periods of time has to be as good as the
primary
 > source. . .
> > > For about $11 you can get a WWVB receiver from Digikey to > > set it and take care of DST. > > At this stage, isn't it more appropriate to use the WWW receiver to get > the hour information altogether?
Agreed but the signal is only reliable at night. For the rest of the day the power line is easiest.
> -- > Cesar Rabak > GNU/Linux User 52247. > Get counted:http://counter.li.org/
G=B2
Reply by Cesar Rabak November 22, 20102010-11-22
Em 20/11/2010 23:43, Glenn Gundlach escreveu:
> On Nov 17, 9:21 am, Jim Stewart<jstew...@jkmicro.com> wrote: > > Rob Gaddi wrote: > > > Way too expensive. Just plug into the mains and learn to count to > 60 or > > > 50 as the case may be. Doing so without electrocution is left as > an > > > exercise for the reader. > > > > Have you ever successfully done this? I ask > > because I've never seen an implementation that > > was more accurate than a $2 crystal and clock > > chip. > > A synchronous motor clock does exactly this and is dead accurate.
But it's also a damn good low pass filter. . .
> The > power grid wouldn't work if the generators all weren't in phase. > Counting zero crosses is easy. In my clock I added 1 diode before the > main filter cap so I have 120Hz ripple. Run that into a comparator to > create an interrupt for the processor and just count to 120 and bump > the seconds, minutes, hours, days, months and years.
Put your zero crossing detector in the same circuit than an ordinary blender (if you're _really_ bold, get one SCR phase controlled ;-) and see the accuracy of your clock go to the drain. . .
> The trick is to not count 'noise' but it's as easy as Rob implies.
It's not that easy, except if the application has low expectancies about the accuracy of your clock display.
> During a power failure it substitutes its own 120 Hz to keep counting during power > failures.
Which for reasonable periods of time has to be as good as the primary source. . .
> For about $11 you can get a WWVB receiver from Digikey to > set it and take care of DST.
At this stage, isn't it more appropriate to use the WWW receiver to get the hour information altogether? -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/
Reply by Nobody November 21, 20102010-11-21
On Thu, 18 Nov 2010 14:49:15 +0000, Jan Panteltje wrote:

>>*60Hz chauvinism not to be taken too seriously > > IIRC in some Olympic games, I think it was fencing, they used timers > from Europe brought to the US. The timers were running fast.
Using mains-based timers for sports timing seems odd, even if fencing doesn't require millisecond precision like e.g. the 100m sprint. Mains frequency is only accurate over long periods. The instantaneous frequency can vary; they just make sure that the error doesn't accumulate. This is fine for an ordinary clock, where it doesn't matter if it runs fast or slow by a fraction of a percent, so long as it doesn't gain or lose over time, but it isn't what you want for accurate timing over a short period. AFAICT, large grids maintain frequency to within 200-330ppm. Better than an RC oscillator but worse than a typical microprocessor crystal, and signifcantly worse than a watch crystal.
Reply by Glenn Gundlach November 21, 20102010-11-21
On Nov 20, 7:22=A0pm, Jon Kirwan <j...@infinitefactors.org> wrote:
 > On Sat, 20 Nov 2010 17:43:12 -0800 (PST), Glenn Gundlach
 >
 > <stratu...@yahoo.com> wrote:
 > ><snip>
 > >For about $11 you can get a WWVB receiver from Digikey to
 > >set it and take care of DST.
 >
 > Are you referring to 561-1014-ND?
 >
 > Jon

Yep. I've got a few for the clock project(s). During the day in LA the
'data' is just noise but at night it looks just like page 25 of

http://tf.nist.gov/general/pdf/1383.pdf

The processor is a Freescale 68HC908JK8 running assembly. The code is
mostly written which isn't very hard with NIST providing 'sync'
references on the nine second marks. It looks good in the simulator
but I haven't actually run it for real.
'Real soon now'.

The 'noise reduction' of the power line reference simply uses one of
the timers to disable interrupts until a few microseconds before the
expected interrupt happens. Keeps fine time.

G=B2
Reply by Jon Kirwan November 20, 20102010-11-20
On Sat, 20 Nov 2010 17:43:12 -0800 (PST), Glenn Gundlach
<stratus46@yahoo.com> wrote:

><snip> >For about $11 you can get a WWVB receiver from Digikey to >set it and take care of DST.
Are you referring to 561-1014-ND? Jon
Reply by Glenn Gundlach November 20, 20102010-11-20
On Nov 17, 9:21=A0am, Jim Stewart <jstew...@jkmicro.com> wrote:
 > Rob Gaddi wrote:
 > > Way too expensive. Just plug into the mains and learn to count to
60 or
 > > 50 as the case may be. Doing so without electrocution is left as
an
 > > exercise for the reader.
 >
 > Have you ever successfully done this? =A0I ask
 > because I've never seen an implementation that
 > was more accurate than a $2 crystal and clock
 > chip.

A synchronous motor clock does exactly this and is dead accurate. The
power grid wouldn't work if the generators all weren't in phase.
Counting zero crosses is easy. In my clock I added 1 diode before the
main filter cap so I have 120Hz ripple. Run that into a comparator to
create an interrupt for the processor and just count to 120 and bump
the seconds, minutes, hours, days, months and years. The trick is to
not count 'noise' but it's as easy as Rob implies. During a power
failure it substitutes its own 120 Hz to keep counting during power
failures. For about $11 you can get a WWVB receiver from Digikey to
set it and take care of DST.

G=B2

G=B2
Reply by jacko November 19, 20102010-11-19
On Nov 19, 1:31=A0am, "F. Bertolazzi" <TOGLIe...@MAIUSCOLEtdd.it> wrote:
> Hans-Bernhard Br ker: > > > Unless you happen to be in the enormously lucky position of having e-in=
k
> > displays at your disposal > > Or cholesteric LCDs:http://www.kentdisplays.com/
Seem to have loads of pins... for a pic a spi version would be better, with a character ROM.
Reply by F. Bertolazzi November 18, 20102010-11-18
Hans-Bernhard Br&#4294967295;ker:

> Unless you happen to be in the enormously lucky position of having e-ink > displays at your disposal
Or cholesteric LCDs: http://www.kentdisplays.com/
Reply by Michael A. Terrell November 18, 20102010-11-18
Hans-Bernhard Br&#4294967295;ker wrote:
> > On 18.11.2010 00:13, Michael A. Terrell wrote: > > > Really? Watch batteries last me about a year. > > Then the Chinese (or whoever else makes the cheap wrist watches these > days) must have forgotten how to design them properly. Unless you abuse > your watch for a flashlight, there's no reason a simple LCD watch > shouldn't last several years on a single cell.
I live in Florida. The humidity is quite high and it kills them.
> > TV remote batteries last a few months, far short of the three to four > > year, 'Use By date' on the labels. > > I don't think I've ever replaced the batteries in any ordinary remote > more than twice --- by that time, either the device being controlled, or > the remote itself, were usually done for.
I've never had a set last more than six months, and I don't watch much TV.
> The only exception is that programmable universal remote --- that one > eats batteries like there's no tomorrow.
-- For the last time: I am not a mad scientist! I m just a very ticked off scientist!!!