Searching \ for 'Time keeping' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/timers.htm?key=time
Search entire site for: 'Time keeping'.

Truncated match.
PICList Thread
'Time keeping'
1998\07\24@070444 by Roland Andrag

flavicon
face
Hello everyone..

I was just wondering if anyone has experience in keeping time
(over months) on a PIC with reasonable accuracy. ie. Which crystal do
I use, etc. etc.

Thanks
 Roland

1998\07\24@072942 by Coetzee, Morne

flavicon
face
Why not use a serial-programmable real-time-clock chip. Some can handle
hours, min, sec., days, years and leap-years.

MornŽ Coetzee

{Quote hidden}

1998\07\24@084233 by Peter L. Peres

picon face
On Fri, 24 Jul 1998, Roland Andrag wrote:

> Hello everyone..
>
> I was just wondering if anyone has experience in keeping time
> (over months) on a PIC with reasonable accuracy. ie. Which crystal do
> I use, etc. etc.

Normal crystals are bad for this, unless you put them in a simple oven (if
you can afford the power drain). Target the oven at 75 deg. C internal
temp.

W/o oven, you can try the active compensation method, using a varicap in
the Xtal circuit and a thermal sensor on an A/D channel. This requires
considerable tinkering.

Peter

1998\07\24@093424 by Ricardo Seixas

picon face
>Hello everyone..
>
>I was just wondering if anyone has experience in keeping time
>(over months) on a PIC with reasonable accuracy. ie. Which crystal do
>I use, etc. etc.
>
>Thanks
>  Roland
>
>

       AN582 describes a methos of real time keeping with a 32Khz Xtal.

Ricardo Seixas

1998\07\24@095434 by Matt Bonner

flavicon
face
Coetzee, Morne wrote:
>
> Why not use a serial-programmable real-time-clock chip. Some can handle
> hours, min, sec., days, years and leap-years.
>
But use a low-drift xtl/osc on the RTC.  Statek makes some 10 ppm
32.768kHz oscillators - but they don't come cheap.

--Matt
>
> > I was just wondering if anyone has experience in keeping time
> > (over months) on a PIC with reasonable accuracy. ie. Which crystal do
> > I use, etc. etc.

1998\07\24@101526 by Steve Lawther

flavicon
face
    Matt,

    Is this 10ppm accuracy at 25 deg C (pretty normal watch crystal)
    or is it 10ppm across the temperature range (which is
    unbelievably good!)??

    As an addition to one of the other emails in the thread, active
    compensation, using a thermistor & A to D, or a digital
    temperature sensor, can be done in software (a tiny correction
factor
    every minute or hour) and doesn't require hardware feedback.

               Steve Lawther


______________________________ Reply Separator
_________________________________
Subject: Re: Time keeping
Author:  Matt Bonner [SMTP:mbonnerspamKILLspamSUNADA.COM]  at UKExchange
Date:    24/07/98 14:54


Coetzee, Morne wrote:
>
> Why not use a serial-programmable real-time-clock chip. Some can
handle
> hours, min, sec., days, years and leap-years.
>
But use a low-drift xtl/osc on the RTC.  Statek makes some 10 ppm
32.768kHz oscillators - but they don't come cheap.

--Matt
>
> > I was just wondering if anyone has experience in keeping time
> > (over months) on a PIC with reasonable accuracy. ie. Which crystal
do
> > I use, etc. etc.

1998\07\24@105119 by Harold M Hallikainen

picon face
       I've done one project like this and used the AC line to generate
an interrupt, and count those.  I think that will be far more accurate
than basing it on a crystal.  If you really want to base it on a crystal
and run the PIC on DC, I'd probably go with an external precision clock
oscillator that is temperature compensated.  Other than that, you could
use another crystal and either hold it at a constant temperature (a PTC
thermistor with some DC on it could heat the crystal), or measure the
temperature and add/subtract counts to compensate for the crystal TC.
       Finally, you can use TimeKeeper chips from CSF Thompson (I've
used LOTS of MK48T02B's) or similar chips from Dallas.

Good luck!

Harold


On Fri, 24 Jul 1998 13:05:09 GMT+2 Roland Andrag
<.....RANDRAGKILLspamspam.....BUDGET.MECH.WITS.AC.ZA> writes:
>Hello everyone..
>
>I was just wondering if anyone has experience in keeping time
>(over months) on a PIC with reasonable accuracy. ie. Which crystal do
>I use, etc. etc.
>
>Thanks
>  Roland
>

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\24@115853 by Peter L. Peres

picon face
On Fri, 24 Jul 1998, Steve Lawther wrote:

>      Matt,
>
>      Is this 10ppm accuracy at 25 deg C (pretty normal watch crystal)
>      or is it 10ppm across the temperature range (which is
>      unbelievably good!)??

Probably across temp. range. I understand that there are a few mechanical
tricks that involve a bimetallic mount and applying temperature-dependent
mechanical tension to the crystal that achieve this sort of thing. One
unwanted side effect is varying crystal Q over temperature, which can be a
***** under certain circumstances, but also may give one a way to find out
if one's crystal is compensated like this or otherwise, if the
manufactuer won't tell...

>      As an addition to one of the other emails in the thread, active
>      compensation, using a thermistor & A to D, or a digital
>      temperature sensor, can be done in software (a tiny correction
> factor
>      every minute or hour) and doesn't require hardware feedback.

The thermistor method requires an inordinate amount of tinkering with an
air-conditioned box, be warned ! Also, you have to redo it whenever the
crystal batch/source changes, and some crystals seem to have amounting
fault that makes this type of thing impossible (touch the case inside ?).
Apparently, they have to be stirred, not shaken ;) And it looks as if
using a flash part that can be re-programmed with a compensation table
later is the only way...

Peter

1998\07\24@121145 by Simon Blouin
flavicon
face
Hi,

  Dallas DS1387 is a REAL TIME RAMified. I put it in every application that
requires timing over a few hours.  It can hold seconds, mins, hours, day of
the week(I think), day of the month, month and year...

Regards,

Simon


At 13:05 24/07/98 GMT+2, you wrote:
{Quote hidden}

1998\07\24@121346 by Matt Bonner

flavicon
face
Steve Lawther wrote:
>
>      Is this 10ppm accuracy at 25 deg C (pretty normal watch crystal)
>      or is it 10ppm across the temperature range (which is
>      unbelievably good!)??

A quick look at some Statek sheets shows that this is 10ppm calibration
tolerence at 25 deg C.  The temperature coefficient is -0.035ppm per
degC^2.  That power of 2 gives pretty bad results at high temperature
(we work to 150 deg C).  We're using a custom part (at US $83.25 for 100
piece) for much better performance.

I was not aware that typical watch crystals have 10ppm accuracy at room
temp.  Are you sure about this?  I don't have any data on these since
they wouldn't survive my design environment.

--Matt

1998\07\24@131410 by Montaigne, Mike

flavicon
face
My guess is a watch crystal would NOT need to be particularly temp. stable,
in that in normal operation they are always strapped to a wrist, and would
never
for example reach 150 degrees.

{Quote hidden}

1998\07\24@131820 by Scott Newell

flavicon
face
>> I was just wondering if anyone has experience in keeping time
>> (over months) on a PIC with reasonable accuracy. ie. Which crystal do
>> I use, etc. etc.
>
>Normal crystals are bad for this, unless you put them in a simple oven (if
>you can afford the power drain). Target the oven at 75 deg. C internal
>temp.

The problem with sticking ordinary crystals in an oven is that you'll be
running them so far from the turning point that they'll be _much_ more
sensitive to temperature.


Here's something I posted to the piclist a long time ago, when asked about
the same subject:

I've been reading up on timekeeping recently, and ran across a bunch of
interesting information.  Here's a couple of links worth checking out.

Best of all is the Hewlett Packard application
note on the science of timekeeping.  It includes a
description of an experiment performed on some really
cheap digital stopwatches over a period of 3-4 months.
They decribe how you can model the errors in the
frequency and aging to correct the indicated time.

It's available on-line at:
http://www.tmo.hp.com/tmo/Notes/English/5965-7984E.html


The HP app note references a patent on a 'smart' watch
that updates an equation containing drift and aging
correction terms.  It looks like it would make a fun
little project for a PIC, lcd, and oven oscillator.

It's also available on-line (as most recent patents
are) at:
http://www.patents.ibm.com/details?patent_number=5%2C274%2C545


There are several other HP app notes on subjects such
as electronic counters, GPS time standards, crystal
oscillator design, etc.  Many of these would be relevant
to any discussion of high-accuracy oscillators and
timepieces.


newell

1998\07\24@160230 by paulb

flavicon
face
Harold M Hallikainen wrote:

> I've done one project like this and used the AC line to generate
> an interrupt, and count those.  I think that will be far more accurate
> than basing it on a crystal.

 Except for glitches.  I haven't done it yet (who has?), but would
expect to use a DPLL with a quite tight lock-in range (since the
anticipated variation is extremely narrow).  Is that what you did?
--
 Cheers,
       Paul B.

1998\07\24@161651 by Harold Hallikainen

picon face
On Fri, 24 Jul 1998 12:15:46 -0500 Scott Newell <@spam@newellKILLspamspamCEI.NET> writes:

>
>The HP app note references a patent on a 'smart' watch
>that updates an equation containing drift and aging
>correction terms.  It looks like it would make a fun
>little project for a PIC, lcd, and oven oscillator.


       Years ago I did a project using a 6802 processor and a TimeKeeper
RAM from CSF Thompson.  The TimeKeeper has a register where you can speed
up and slow down the clock (they drop or add clock pulses on occasion to
make up for oscillator frequency error).  In my system, each time you set
the time, it slowed the clock down if you were setting to an earlier time
and sped it up if you were setting to a later time.  It just incremented
or decremented the speed register one count either way depending on whihc
way the correction was.  Eventually, the speed would be pretty close.
       As someone pointed out earlier, watches generally operate in a
pretty constant temperature environment, since they are strapped to a
wrist.
       Again, if the AC line is available, I'd count it to determine the
time, and possibly use a PIC timer module for times when the AC line is
not available and the thing is running on battery.

Harold




Harold Hallikainen
KILLspamharoldKILLspamspamhallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\24@163951 by Harold Hallikainen

picon face
On Sat, 25 Jul 1998 06:00:45 +1000 "Paul B. Webster VK2BZC"
<RemoveMEpaulbTakeThisOuTspammidcoast.com.au> writes:
>Harold M Hallikainen wrote:
>
>> I've done one project like this and used the AC line to generate
>> an interrupt, and count those.  I think that will be far more
>accurate
>> than basing it on a crystal.
>
>  Except for glitches.  I haven't done it yet (who has?), but would
>expect to use a DPLL with a quite tight lock-in range (since the
>anticipated variation is extremely narrow).  Is that what you did?


       Actually, funny that you mention that.  This was a project in New
York city.  It worked GREAT here, but kept gaining time in NYC.  It went
back and forth a couple times and always worked great here, which made it
difficlut to troubleshoot.  I had a resistor from one side of the
transformer secondary to the INT input of a 16c74a.  I just added a
capacitor to ground giving a cutoff frequency of about 60 Hz.  I also
added a filtered power input module.  The system's been running there for
about six months with no problem.
       It was amazing to me that it worked perfectly here in California,
but would not work at all in New York.  I wonder what their power looks
like!

Harold





Harold Hallikainen
spamBeGoneharoldspamBeGonespamhallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\24@175156 by Peter L. Peres

picon face
On Fri, 24 Jul 1998, Harold Hallikainen wrote:

- snip -
>         It was amazing to me that it worked perfectly here in California,
> but would not work at all in New York.  I wonder what their power looks
> like!

 You don't want to know. I would not know about NYC but here it's a
semi-residential area and I think I mentioned the neighbor jeweler's high
speed drill on all of our scopes and on local UHF ?

 An I might just as well add, that I have a wooden benchplate (real
wood), on a grounded steel frame, and by placing the scope probe on the
wood (about 2 cm through the (wet - 70% humidity - wood to the frame) I
see 8 Vpp, very noisy, 50 Hz, through 10 Mohm / 20 pF. Also, by touching
the probe to the glass of a fluorescent light, in the middle of it, I read
the expected 55-60 Vpp ac 50 Hz, but severely clipped and with a 5 kHz
(yes, 5) damped oscillation near each crossover, lasting about 2 msec on
every slope.  Mercury has a life of its own. The same signal can be picked
up in a wire loop in current mode on the table, about 1 meter below the
light, at several tens of mV.

 Guess what happens to 'open' CMOS inputs ;(. No, I can't see the
jeweller's drill, he went home a long time ago. The A/C causes a terrific
brownout when it starts up, though.

 At home, not far from here, I listen to shortwave DX, and I have noticed
that my computer PSU makes a lot of noise. So I put a Corcom filter on the
power cord, only to find out that at least two of my neighbors have
computers and use them ;(. Some frequencies are 'out of reach'
permanently. I wonder what it would sound like to have one of these
noise-modulated PSUs around (I don't know if they are legal here).

hope this 'helps'

       Peter

1998\07\25@203306 by eric

flavicon
face
Hi,Roland,

How about the NJU6355 series Dip-8 pkg clock chip ( from New Japan Radio
Co. Ltd) for doing your timing application.  It is a serial real time clock
which only takes 4 of the I/O lines for data transfer from the PIC or a
4-bit CPU.

The chip contains an oscillator, counter, voltage regulator and interface
controller.  All you need is an external crystal to make it work.  The
operating voltage is 2 to 5.5V and this results in accurate timing even
when it is in the battery back up period.  Long backup time is possible as
the chip only takes 3uA.

If you have problem getting the chip, please let me know.  The price of
this chip should be less than $2.  Sourcing is not a problem.

Regards,

Eric,      TakeThisOuTericchanEraseMEspamspam_OUTmyna.com



Coetzee, Morne wrote:

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...