Searching \ for '[PIC] Pic-based alarm clock kit (or assembled)' 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/microchip/time.htm?key=clock
Search entire site for: 'Pic-based alarm clock kit (or assembled)'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Pic-based alarm clock kit (or assembled)'
2009\02\14@031516 by Forrest W. Christian

flavicon
face
I need a new alarm clock.  I won't go into the details but let's just
say it isn't as reliable at waking me up as an alarm clock should be,
for quite a few reasons.

I would really like to end up with an alarm clock which is controlled by
a PIC, so I can tweak on the code, but I really don't want to do the
mechanicals, and would prefer not to do the circuit either.   I have
looked around and there doesn't seem to be a good, bedside-friendly kit
(meaning it will survive my pounding to get the thing to snooze in the
morning when I need a few more minutes.  Or put differently, I want
something which *looks* like an alarm clock.

If I can't find something, I'll scavenge my selection of old alarm
clocks which have failed me in some way (usually by me learning how to
shut them off in my sleep), and hack them to run off a PIC instead of
whatever chip they are using.

So, did I miss a kit somewhere?

-forrest

2009\02\14@102518 by Byron Jeff

flavicon
face
On Sat, Feb 14, 2009 at 03:14:27AM -0500, Forrest W. Christian wrote:
> I need a new alarm clock.

So do I.

>  I won't go into the details but let's just
> say it isn't as reliable at waking me up as an alarm clock should be,
> for quite a few reasons.

My current alarm clock is an RCA CD model that will play music from the CD
for the alarm. It's a good starting point by I'd like to see some more
features:

1. Instead of a CD use a USB memory drive or an SD card to store the music.
I'm close to completely ditching CD as a format as I've gotten rid of the
CDs in the car, replacing with SD.

2. Waking up to the same song everyday is lame. With all the music
available random song selection (or playlist selection) would be better.

3. The current clock has dual alarms which works well. But with the current
clock both alarms play the same song. Just another aspect of point #2
above.

> I would really like to end up with an alarm clock which is controlled by
> a PIC, so I can tweak on the code, but I really don't want to do the
> mechanicals, and would prefer not to do the circuit either.   I have
> looked around and there doesn't seem to be a good, bedside-friendly kit
> (meaning it will survive my pounding to get the thing to snooze in the
> morning when I need a few more minutes.  Or put differently, I want
> something which *looks* like an alarm clock.

That sounds like user error! The correct solution is to put the clock out
of reach from the bed so that you have to get up to turn it off. Or as an
alternative wire in a big red emergency button next to the bed. It can take
the pounding.

> If I can't find something, I'll scavenge my selection of old alarm
> clocks which have failed me in some way (usually by me learning how to
> shut them off in my sleep), and hack them to run off a PIC instead of
> whatever chip they are using.
>
> So, did I miss a kit somewhere?

Probably not. The electronics for a clock isn't too difficult. The
toughest problem with a clock is getting it to keep the right time. You
have to either integrate an RTC chip that uses temp controlled crystal
oscillators to keep right time. Or you have to count cycles from the wall.
My sunrise/sunset outdoor light controller, which is fundamentally an alarm
clock, keeps absolutely awful time using a 32 kHz watch crystal. I end up
having to reset the time at least once every two months or so because it
drifts so badly. Not a real problem because the control application is just
dusk to dawn and so doesn't need to be very precise. But would be
problematic for an alarm clock.

If you like you can take a look at the code for my sunrise/sunset
controller here:

http://www.finitesite.com/d3jsys/clock.asm

Written in absolutely assembly for the 16F877A. Has all of the LED and
clock routines to drive a clock and uses an ADC pot/switch based interface
for setting the time. It would need an addition for setting the alarm time
and some type of snooze function.

The mechanicals are nothing more than an LED driver, the pot/switch
interface and a mechanism for getting in time pulses to count.

Like I said in my opening, adding a SD card/MP3 player would be my target.
The VMusic2 would be the fastest way to pull this off, though not the
cheapest (about $40 USD in singles).

BAJ

2009\02\14@114018 by John Ferrell

face picon face
www.mikroe.com/en/tools/rtc-proto/

$21 is more than I would want to spend but they provide a lot of information
with this Real Time Clock on the web site including the schematic and
programming examples.

John Ferrell  W8CCW

"All that is necessary for the triumph of evil is for good men to do
nothing." -- Edmund Burke
http://DixieNC.US


{Original Message removed}

2009\02\14@115407 by Maarten Hofman

face picon face
> I would really like to end up with an alarm clock which is controlled by
> a PIC, so I can tweak on the code, but I really don't want to do the
> mechanicals, and would prefer not to do the circuit either.   I have
> looked around and there doesn't seem to be a good, bedside-friendly kit
> (meaning it will survive my pounding to get the thing to snooze in the
> morning when I need a few more minutes.  Or put differently, I want
> something which *looks* like an alarm clock.
>
> If I can't find something, I'll scavenge my selection of old alarm
> clocks which have failed me in some way (usually by me learning how to
> shut them off in my sleep), and hack them to run off a PIC instead of
> whatever chip they are using.
>
> So, did I miss a kit somewhere?
>

Not a kit, but I did do an alarm clock (first post about it is
http://emergingdrake.blogspot.com/2009/01/clock.html). The clock circuit
itself is at
http://emergingdrake.blogspot.com/2008/12/keeping-time-and-date.html which
uses an external DS1302, the software for using that circuit is inside the
calculator source code, at
http://docs.google.com/Doc?id=dggffzm9_4dfjgf5fbthe label names start
with TIME. The code suffers from some bad behaviors
(always maintaining page 0, not relocatable) but the individual routines
could probably easily be integrated into other projects by adding some
BANKSEL statements.

Hopefully useful.

Greetings,
Maarten Hofman.

2009\02\14@154330 by Tony Smith

flavicon
face
> Probably not. The electronics for a clock isn't too difficult. The
> toughest problem with a clock is getting it to keep the right time. You
> have to either integrate an RTC chip that uses temp controlled crystal
> oscillators to keep right time. Or you have to count cycles from the wall.
> My sunrise/sunset outdoor light controller, which is fundamentally an
alarm
> clock, keeps absolutely awful time using a 32 kHz watch crystal. I end up
> having to reset the time at least once every two months or so because it
> drifts so badly. Not a real problem because the control application is
just
> dusk to dawn and so doesn't need to be very precise. But would be
> problematic for an alarm clock.


Go down to your local 'cheap crap' shop, and for a $1 or so buy a cheap
analogue clock.  Y'know, hands 'n' stuff.  In there you'll find a 1 Hz
(maybe 2 Hz) oscillator, keep that and ditch the rest.

They're surprising accurate, and you can't beat the price.  They have
seconds hands so run one for a week to check.

Tony

2009\02\14@155320 by Mark Rages

face picon face
On Sat, Feb 14, 2009 at 2:14 AM, Forrest W. Christian
<spam_OUTforrestcTakeThisOuTspamimach.com> wrote:
{Quote hidden}

http://www.delorie.com/electronics/alarmclock/

http://www.chumby.com/
--
Mark Rages, Engineer
Midwest Telecine LLC
.....markragesKILLspamspam@spam@midwesttelecine.com

2009\02\14@161521 by solarwind

picon face
On Sat, Feb 14, 2009 at 3:42 PM, Tony Smith <ajsmithspamKILLspambeagle.com.au> wrote:
> Go down to your local 'cheap crap' shop, and for a $1 or so buy a cheap
> analogue clock.  Y'know, hands 'n' stuff.  In there you'll find a 1 Hz
> (maybe 2 Hz) oscillator, keep that and ditch the rest.
>
> They're surprising accurate, and you can't beat the price.  They have
> seconds hands so run one for a week to check.
>
> Tony

I did that once and got a clock for a dollar. They don't use a quartz
crystal and the battery ran out in a day (maybe because they don't use
a quartz crystal)?

--
solarwind

2009\02\14@173128 by Bob Blick

face
flavicon
face
Forrest W. Christian wrote:
> I need a new alarm clock.  I won't go into the details but let's just
> say it isn't as reliable at waking me up as an alarm clock should be,
> for quite a few reasons.
>
> I would really like to end up with an alarm clock which is controlled by
> a PIC, so I can tweak on the code, but I really don't want to do the
> mechanicals, and would prefer not to do the circuit either.   I have
> looked around and there doesn't seem to be a good, bedside-friendly kit
> (meaning it will survive my pounding to get the thing to snooze in the
> morning when I need a few more minutes.  Or put differently, I want
> something which *looks* like an alarm clock.
>
> If I can't find something, I'll scavenge my selection of old alarm
> clocks which have failed me in some way (usually by me learning how to
> shut them off in my sleep), and hack them to run off a PIC instead of
> whatever chip they are using.
>
> So, did I miss a kit somewhere?

I vote for recycling a clock.

Cheap alarm clocks with LED displays quite often use something like the
LM8560 chip from Sanyo or Unisonic(UTC). The display is 1/2 multiplexed
via diodes from the power transformer and an input pin to keep track of
which one is active. So if you reuse a clock case and its display you
should reference the data sheet from that chip so you don't go crazy
trying to reverse engineer it, perhaps while thinking each digit has its
own common, which would be wrong.

So you'll need about 14-15 segment pins and either 2 common drivers or
do the diode thing from the transformer.

Back when I was teaching we got donated a crate of clock chips and
displays so that's why I know this :)

Cheerful regards,

Bob

2009\02\14@180708 by Forrest W Christian

flavicon
face
Mark Rages wrote:
> http://www.delorie.com/electronics/alarmclock/
>  
That one I had seen... But although I could do the woodworking and/or
plastic equivalent.   Now if he wanted to start making kits....
> http://www.chumby.com/
>  
Now that I'm going to have to look at some more....

-forrest

2009\02\14@192709 by Jinx

face picon face
> I did that once and got a clock for a dollar. They don't use a quartz
> crystal and the battery ran out in a day (maybe because they don't
> use a quartz crystal)?

All the battery clocks I've pulled apart use either a 32kHz or 37kHz
crystal, and 1 AA battery lasts at least a couple of years. Accuracy is
under 5ppm, or about 1-2 minutes per year. That's like trying to tune
a 32kHz crystal to under 0.2Hz and keeping it there. They make these
things by the zillions and do it very well

http://home.clear.net.nz/pages/joecolquitt/lowpower.html

For 1Hz use the other output as well. The coil and gearing can be re-
used, eg for custom clocks (like 24 hour or programmable intervals
with analogue display). Coil drive needs to be ~ 1.4V to 1.8V



2009\02\14@194953 by Tony Smith

flavicon
face
> > Go down to your local 'cheap crap' shop, and for a $1 or so buy a cheap
> > analogue clock.  Y'know, hands 'n' stuff.  In there you'll find a 1 Hz
> > (maybe 2 Hz) oscillator, keep that and ditch the rest.
> >
> > They're surprising accurate, and you can't beat the price.  They have
> > seconds hands so run one for a week to check.
> >
> > Tony
>
> I did that once and got a clock for a dollar. They don't use a quartz
> crystal and the battery ran out in a day (maybe because they don't use
> a quartz crystal)?


A dud battery I can believe, but those clocks draw very little power.

This page: http://www.josepino.com/circuits/?one_second_timebase.jpc shows
the board with a crystal.  All of the movements I've seen have this, he
mentions some have a ceramic instead, but I haven't seen any.  Yours may
have been that type (but still doesn't explain the battery).

The crystal is the usual 32k one, and the chip is a divider.  Actually, the
chip is more than that, the one I'm looking at here has an alarm as well, so
there's a bit in there to handle that.  That's possibly the unused holes you
can see on the board in that page.

There's also a h-bridge in there somewhere to run the motor, as it needs AC
to run.  The board provides a + pulse one second, and a - one the next.
This creates a magnetic field in the metal running thru the coil.  If you
put a compass above the coil you can see it twitch in alternate directions,
once per second.

The rotor has a magnet with a plastic gear.  The magnet is more than it
seems, having multiple North/South areas.  Hold it so the compass needle is
attracted to it, and slowly rotate it.  You see the compass change direction
as the rotor turns.

The coil create a magnetic field that is opposite to the rotor, so it spins
a bit to line up.  Then the coil reverses it's field, causing the rotor to
spin yet again.

Quite a feat for something so cheap.

Tony

2009\02\14@195650 by Tamas Rudnai

face picon face
On Sat, Feb 14, 2009 at 3:24 PM, Byron Jeff <.....byronjeffKILLspamspam.....clayton.edu> wrote:

> Probably not. The electronics for a clock isn't too difficult. The
> toughest problem with a clock is getting it to keep the right time.
>

I am not sure about the rest of the world, but here in Europe there is the
DCF77 so you can synchronise the watch to an atomic clock operated in
Frankfurt, Germany. The radio signal circuit used to be quite difficult to
build, however, nowadays you can buy these as a module and to interface it
with PIC if fairly simple. Google is full of with example projects.

Tamas

--
Rudonix DoubleSaver
http://www.rudonix.com

2009\02\15@033005 by Vitaliy

flavicon
face
Tamas Rudnai wrote:
>> Probably not. The electronics for a clock isn't too difficult. The
>> toughest problem with a clock is getting it to keep the right time.
>>
>
> I am not sure about the rest of the world, but here in Europe there is the
> DCF77 so you can synchronise the watch to an atomic clock operated in
> Frankfurt, Germany. The radio signal circuit used to be quite difficult to
> build, however, nowadays you can buy these as a module and to interface it
> with PIC if fairly simple. Google is full of with example projects.

US-based time signal radio station:

http://en.wikipedia.org/wiki/WWVB

For other countries, see:

http://en.wikipedia.org/wiki/Atomic_clock#Radio_clocks

Vitaliy

2009\02\15@035041 by Forrest W. Christian

flavicon
face
Vitaliy wrote:
> US-based time signal radio station:
> http://en.wikipedia.org/wiki/WWVB
>
> For other countries, see:
>
> en.wikipedia.org/wiki/Atomic_clock#Radio_clocks
>  
Actually, it's kinda tempting to put a GPS receiver in the clock.   Most
people wouldn't even think about it, but since I integrate close to a
thousand GPS modules a year into products I sell, coming up with a spare
one wouldn't be a problem.   The newer MTK-based GPS modules shouldn't
have a problem locking on often enough to be able to keep the clock
accurate enough assuming a 20ppm crystal as the clock source.... even if
it only had good time once every few days it would be great.

In reality my intention would be to use the 60Hz line as the clock
source.  Good, cheap, reliable, as long as you make sure you have a good
schmitt-trigger on the input.  

-forrest

2009\02\15@065019 by Gerhard Fiedler

picon face
Forrest W. Christian wrote:

> In reality my intention would be to use the 60Hz line as the clock
> source.  Good, cheap, reliable, as long as you make sure you have a
> good schmitt-trigger on the input.  

>From what I understand, the 60Hz line clock serves well as long-time
average correction (e.g. to adjust your quartz-driven clock every week
or so), but less time base for the actual time. In the short run, it
seems to be allowed to vary quite a bit.

Gerhard

2009\02\15@084720 by olin piclist

face picon face
Tamas Rudnai wrote:
> I am not sure about the rest of the world, but here in Europe there
> is the DCF77 so you can synchronise the watch to an atomic clock
> operated in Frankfurt, Germany. The radio signal circuit used to be
> quite difficult to build, however, nowadays you can buy these as a
> module and to interface it with PIC if fairly simple. Google is full
> of with example projects.

In North America we've got WWVB near Fort Collins Colorado.  Both its
carrier frequency and its time signal are derived from the NIST atomic clock
in Boulder.  The carrier is 60Khz (with a lot of zeros right of the decimal
point), so you can use ordinary opamps and "audio" range parts in the
receiver circuit.  Here in New England we are at the fringes of the signal's
range, so WWVB clocks tend to sync up only during the night.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\02\15@164032 by Vitaliy

flavicon
face
Forrest W. Christian wrote:
>> US-based time signal radio station:
>> http://en.wikipedia.org/wiki/WWVB
>>
>> For other countries, see:
>>
>> en.wikipedia.org/wiki/Atomic_clock#Radio_clocks
>>
> Actually, it's kinda tempting to put a GPS receiver in the clock.   Most
> people wouldn't even think about it, but since I integrate close to a
> thousand GPS modules a year into products I sell, coming up with a spare
> one wouldn't be a problem.   The newer MTK-based GPS modules shouldn't
> have a problem locking on often enough to be able to keep the clock
> accurate enough assuming a 20ppm crystal as the clock source.... even if
> it only had good time once every few days it would be great.

Forrest, I don't think I've ever seen your website. What kinds of products
do you build/sell?


> In reality my intention would be to use the 60Hz line as the clock
> source.  Good, cheap, reliable, as long as you make sure you have a good
> schmitt-trigger on the input.

A long time ago, someone told me that because of this assumption, clocks
that worked well in FRG went haywire in the GDR. You are really limiting
your market with this decision. ;-)

Vitaliy

2009\02\15@164141 by Vitaliy

flavicon
face
Gerhard Fiedler wrote:
>> In reality my intention would be to use the 60Hz line as the clock
>> source.  Good, cheap, reliable, as long as you make sure you have a
>> good schmitt-trigger on the input.
>
>From what I understand, the 60Hz line clock serves well as long-time
> average correction (e.g. to adjust your quartz-driven clock every week
> or so), but less time base for the actual time. In the short run, it
> seems to be allowed to vary quite a bit.

Yes, it varies by as much as 2Hz (IIRC). I was kind of surprised when I
plugged a frequency counter into the mains, and saw it fluctuating like that
(this was approx. 7 years ago, haven't tried it since).

Vitaliy

2009\02\15@200411 by Bob Ammerman

picon face
> Cheap alarm clocks with LED displays quite often use something like the
> LM8560 chip from Sanyo or Unisonic(UTC). The display is 1/2 multiplexed
> via diodes from the power transformer and an input pin to keep track of
> which one is active. So if you reuse a clock case and its display you
> should reference the data sheet from that chip so you don't go crazy
> trying to reverse engineer it, perhaps while thinking each digit has its
> own common, which would be wrong.
>
> So you'll need about 14-15 segment pins and either 2 common drivers or
> do the diode thing from the transformer.
>
> Back when I was teaching we got donated a crate of clock chips and
> displays so that's why I know this :)
>
> Cheerful regards,
>
> Bob

Ah, so that was what was going on.

Quite a few years ago I built a central-clock-and-class-bell system for our
church. I bought a bunch of cheap alarm clocks, and replaced the PC board
with my own PIC-based circuit. I really had to do some headscratching to
figure out how the display was multiplexed, and really puzzled over the two
diodes to the transformer. Now it makes a lot more sense. I had figured that
the input from transformer to the clock chip was only to get a 60 Hz time
reference, so I couldn't understand how the display multiplexing was
working.

-- Bob Ammerman
RAm Systems

2009\02\15@210838 by Bob Ammerman

picon face
>>> In reality my intention would be to use the 60Hz line as the clock
>>> source.  Good, cheap, reliable, as long as you make sure you have a
>>> good schmitt-trigger on the input.
>>
>>From what I understand, the 60Hz line clock serves well as long-time
>> average correction (e.g. to adjust your quartz-driven clock every week
>> or so), but less time base for the actual time. In the short run, it
>> seems to be allowed to vary quite a bit.
>
> Yes, it varies by as much as 2Hz (IIRC). I was kind of surprised when I
> plugged a frequency counter into the mains, and saw it fluctuating like
> that
> (this was approx. 7 years ago, haven't tried it since).
>
> Vitaliy

2 Hz would be a huge swing in North America. My work with power plants
indicates that the frequency transducers they use are typically scaled to
measure from 59.9 to 60.1 hertz. In addition, the frequency of the connected
grid is much more stable than that. Basically what happens is that if the
generators are generating more than the consumers want then the grid
frequency goes up a tiny bit, and vice-versa. It takes many megawatts of
mismatch to result in even a very small frequency shift. I do know that
every effort is made to have the frequency be accurate over the 'long haul',
which is probably no longer than 1 day.

-- Bob Ammerman
RAm Systems

2009\02\15@210918 by Bob Ammerman

picon face
> Cheap alarm clocks with LED displays quite often use something like the
> LM8560 chip from Sanyo or Unisonic(UTC). The display is 1/2 multiplexed
> via diodes from the power transformer and an input pin to keep track of
> which one is active. So if you reuse a clock case and its display you
> should reference the data sheet from that chip so you don't go crazy
> trying to reverse engineer it, perhaps while thinking each digit has its
> own common, which would be wrong.
>
> So you'll need about 14-15 segment pins and either 2 common drivers or
> do the diode thing from the transformer.
>
> Back when I was teaching we got donated a crate of clock chips and
> displays so that's why I know this :)
>
> Cheerful regards,
>
> Bob

Ah, so that was what was going on.

Quite a few years ago I built a central-clock-and-class-bell system for our
church. I bought a bunch of cheap alarm clocks, and replaced the PC board
with my own PIC-based circuit. I really had to do some headscratching to
figure out how the display was multiplexed, and really puzzled over the two
diodes to the transformer. Now it makes a lot more sense. I had figured that
the input from transformer to the clock chip was only to get a 60 Hz time
reference, so I couldn't understand how the display multiplexing was
working.

-- Bob Ammerman
RAm Systems

2009\02\15@213904 by Brent Brown

picon face
{Quote hidden}

Once upon a time here in New Zealand we temporarily disconnected the
transmission lines bewteen our South Island and North Island as an experiment to
see how the grid would respond. Power generation in the south usually helps
support the north. At the teaching institution I was working at at the time we hooked
up a chart recorder to monitor the event in the North Island - as I recall the
frequency took quite a dive from nominal 50Hz to about 47Hz or so then more
slowly recovered to normal, don't remember if there was any overshoot.

More recently I designed a PIC project with real time clock based on mains 50Hz,
with schmitt trigger on the input. So far it seems to have good long term accuracy -
maybe a minute or two in 6 to 12 months, quite acceptable in my case, about the
same kind of accuracy as you might expect from the clock on your microwave oven
etc.

--
Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  EraseMEbrent.brownspam_OUTspamTakeThisOuTclear.net.nz


2009\02\15@214645 by Byron Jeff

flavicon
face
On Sun, Feb 15, 2009 at 09:37:56PM -0500, Brent Brown wrote:
Snippage...

>
> More recently I designed a PIC project with real time clock based on mains 50Hz,
> with schmitt trigger on the input. So far it seems to have good long term accuracy -
> maybe a minute or two in 6 to 12 months, quite acceptable in my case, about the
> same kind of accuracy as you might expect from the clock on your microwave oven
> etc.

Brent,

Can you give a pointer to the type of circuit you used to condition the
signal. Would a signal through a transformer clipped with a zener and run
through a Schmitt trigger input be sufficient?

BAJ

2009\02\15@221330 by Brent Brown

picon face

--Message-Boundary-11133
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

On 15 Feb 2009 at 21:46, Byron Jeff wrote:
{Quote hidden}

Should be ok. Attached circuit I used. AC input was from one of the 12V
connections on the 12-0-12V transformer used in the power supply for the circuit,
0V on the trasnsformer corresponds to GND shown here. The "ZeroCross" signal is
then fed directly into a PIC input. I didn't use an interuupt, just polled this pin every
1ms. Note that I used schottky diodes for clamping - not strictly required as the
40106 schmitt trigger invert is more tolerant/has better input protection diodes than
a PIC does, but I was using these schottly diodes in other parts of the circuit
anyway so made sense to throw one more in.

--
Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  brent.brownspamspam_OUTclear.net.nz


--Message-Boundary-11133
Content-type: Image/GIF; name="RTC.gif"
Content-disposition: attachment; filename="RTC.gif"
Content-transfer-encoding: BASE64

R0lGODdhugG3APcAAAQEBAQEhAQEmgQErwQE+gRDugRDxARtzwR4rwR4ugR4z0QEBEQEhEQE
mkQEr0RDhERDxERtz0R4r0R4ukR4z0SN2kSY5G8EBG8EhG8Emm8Er29DhG9Dj29Dmm9Dum9D
xG9tz294hG94m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Fgce23jP7z+TS
u1P/jju84uXThScMCAA7

--Message-Boundary-11133
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2009\02\15@235956 by Forrest W. Christian

flavicon
face
Vitaliy wrote:
> Forrest, I don't think I've ever seen your website. What kinds of products
> do you build/sell?
>  
Niche-market products for the Wireless ISP industry.  Well, mostly for
the Wireless ISP industry.  http://www.packetflux.com/

The devices which use the GPS receivers are actually after the highly
accurate (within 100ns of UTC) 1 Pulse per second timing signal to
synchronize radios for the internet providers to help reduce
self-interference.    They are a lot less expensive than the official
manufacturer-designed products, and I move a lot of them every year.  

>> In reality my intention would be to use the 60Hz line as the clock
>> source.  Good, cheap, reliable, as long as you make sure you have a good
>> schmitt-trigger on the input.
>>    
>
> A long time ago, someone told me that because of this assumption, clocks
> that worked well in FRG went haywire in the GDR. You are really limiting
> your market with this decision. ;-)
>  
Hmmm...  if my target market ever moves outside the US 60Hz power grid,
maybe I'll release a patch.  

You know you're a real electronics (or PIC) geek when you say "my alarm
clock isn't working for me anymore, and everyone I've purchased has had
things that irritate me, so I'll just build one which does work the way
I want it to".   We could go into the numerous stupid things about the
typical mass-market alarm clock, but I won't.   And no, I'm not
interested in selling alarm clocks to Wal-Mart.

-forrest

2009\02\16@041516 by Jinx

face picon face
> So far it seems to have good long term accuracy - maybe a minute
> or two in 6 to 12 months

Is that + or - ? I can imagine how extra pulses would get to the
counter - for example the fridge turning on in one house would
make a terrible pop in the stereo, and this PC will pick up lights
(filament) being turned off in this house, much to my annoyance
if recording audio

A minute-ish out in 6 months is quite a few pulses, perhaps 4,000 in
800,000,000. A small fraction though, ~ 0.0005% or 5ppm. An
average of 1 mains cycle per hour-and-a-bit

> same kind of accuracy as you might expect from the clock on your
> microwave oven etc

I have 2 VCRs with clocks. A much-loved Mitsubishi was a very good
time-keeper. The Panasonic is awful, perhaps 2 minutes fast a month.
The Digitor is a little slow. You'd think mains equipment would take
their timing from the mains, but I'm sure some must use a crystal. Not
having to configure them for 50Hz/60Hz markets (or countries with
sloppy frequency regulation) might be the reason, although they would
need NTSC/PAL/other models so it's not like they go in the box all the
same anyway

2009\02\16@044248 by Vitaliy

flavicon
face
Bob Ammerman wrote:
> 2 Hz would be a huge swing in North America. My work with power plants
> indicates that the frequency transducers they use are typically scaled to
> measure from 59.9 to 60.1 hertz.

You're probably right, it was a long time ago. I thought it was varying
between 59 Hz and 61 Hz, maybe it was like you say only 0.2Hz. I remember
bringing this up to my electronics professor, when he said that the mains
frequency is very stable and can be used to drive clocks. His reply was that
it's stable over time, but not instantaneously.

Vitaliy


2009\02\16@045914 by Brent Brown

picon face
On 16 Feb 2009 at 22:15, Jinx wrote:

> > So far it seems to have good long term accuracy - maybe a minute
> > or two in 6 to 12 months
>
> Is that + or - ? I can imagine how extra pulses would get to the
> counter - for example the fridge turning on in one house would
> make a terrible pop in the stereo, and this PC will pick up lights
> (filament) being turned off in this house, much to my annoyance
> if recording audio

Slow at the moment. It only displays hours and minutes - so when I looked at it just
now it was showing 2 minutes slow, but then it changed to only 1 minute slow :-)  
My first prototypes fall back to battery power and internal RC oscillator for clock
source when the mains fails ~ really poor time keeping by comparison but still ok for
short blackouts.

{Quote hidden}

I thought about adding auto 50/60Hz detection in software. Would rely on
crystal/resonator timebase and check mains pulses for a while (first minute after
power up?) to decide if divide by 50 or divide by 60 was appropriate, then store this
setting in EEPROM as the default.

Went through the timekeeping museum at Grenwich years ago and it surprised me
to learn how much effort had gone into developing accurate mechanical clocks back
in the day, and how important accurate time was to navigation. Crystals are cheap,
but there's still an art to accuracy of seconds in a year.

--
Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  @spam@brent.brownKILLspamspamclear.net.nz


2009\02\16@053905 by Jinx

face picon face
> I thought about adding auto 50/60Hz detection in software

WDT will be accurate enough to do that. If 50/60 = 0.83, the temperature
of the PIC would have to go above 50C and below -12C to vary 17% from
the datasheet nominal, ignoring any OSCTUNE adjustments

> Went through the timekeeping museum at Grenwich years ago and
> it surprised me to learn how much effort had gone into developing
> accurate mechanical clocks back in the day, and how important
> accurate time was to navigation

There were enormous sums offered for accurate ship-capable timepieces,
and some very elegant solutions. And once that was accomplished, the
whole structure of society changed. For example, locations separated
longditudinally (such as train stations, ports, tides) now had a common
reference and needn't base their timing on dusk/dawn

2009\02\16@071532 by Alan B. Pearce

face picon face
> Went through the timekeeping museum at Grenwich years ago and
> it surprised me to learn how much effort had gone into developing
> accurate mechanical clocks back in the day, and how important
> accurate time was to navigation

There was a TV program a few years ago about the guy who did make a clock
that met the requirements for timekeeping at sea, and the loops he had to go
through to get paid the prize for doing so. IIRC he was practically a pauper
before they finally paid out.

2009\02\16@103344 by Gerhard Fiedler

picon face
Jinx wrote:

>> I thought about adding auto 50/60Hz detection in software
>
> WDT will be accurate enough to do that. If 50/60 = 0.83, the temperature
> of the PIC would have to go above 50C and below -12C to vary 17% from
> the datasheet nominal, ignoring any OSCTUNE adjustments

FWIW, the deviation may only be half of this if you want to be able to
know with reasonable certainty which mains frequency you have.

Say it's really 60Hz and you measure it with a precision of +-17%. Then
you know that it's 60Hz +- 10Hz... and you're none the wiser :)

The WDT is spec'ed a bit better than this, but not by much. Probably a
borderline case; works mostly. OTOH, the internal oscillator many PICs
have is plenty good enough.

Gerhard

2009\02\16@103441 by Ariel Rocholl

flavicon
face
I know you are asking for a PIC based one, but as some already said, you
have other options. When faced to the same problem than you, and after
thinking a bit on a PIC based clock, I ended up moving into a WindowsCE
refactored PDA where I used the internals and discarded the ¨box¨. In the
end, you only need some end user software to give all you need - mp3, alarm,
wifi clock resync, etc - Look for a good elegant box you can reuse from
either a old alarm clock or as I did get an elegant wooden box from
somewhere.
Only comment is WinCE -at least that installed on a consumer PDA- is not
100% reliable as you would like in an alarm clock, thus I automatically
reboot it a couple of times a day and resync the clock right after that via
wifi. Furthermore, as all PDAs has attached battery, you have your clock
working with a good lion backup battery for free. I bet that being a cheaper
solution than creating a clock with all the functionality from scratch. A
2nd hand PDA such as Axim X5 or X3 cost about 50 USD.

HTH

2009/2/14 Forrest W. Christian <KILLspamforrestcKILLspamspamimach.com>

{Quote hidden}

>

2009\02\16@152805 by Jinx

face picon face
> The WDT is spec'ed a bit better than this, but not by much. Probably
> a borderline case; works mostly. OTOH, the internal oscillator many
> PICs have is plenty good enough

Yes, it is. My immediate thought was the original WDT's 18ms period,
which is between the two mains cycle times, 16.67ms (60Hz) and 20ms
(50Hz). Personally I've found WDT to be quite reliable in that regard
but, as you say, there are other options

2009\02\16@154151 by Tamas Rudnai

face picon face
On Mon, Feb 16, 2009 at 9:28 PM, Jinx <RemoveMEjoecolquittTakeThisOuTspamclear.net.nz> wrote:

> Yes, it is. My immediate thought was the original WDT's 18ms period,
> which is between the two mains cycle times, 16.67ms (60Hz) and 20ms
> (50Hz). Personally I've found WDT to be quite reliable in that regard
> but, as you say, there are other options
>

WDT is quite sensitive to temperature and the power supply, so I would not
rely on it too much.

Tamas

--
Rudonix DoubleSaver
http://www.rudonix.com

2009\02\16@160305 by Jinx

face picon face
> WDT is quite sensitive to temperature and the power supply, so I
> would not rely on it too much

Tamas, I agree if T or V vary. It's a resistor-based oscillator after all.
That aside, it is pretty stable although I probably wouldn't use it as
anything but a coarse time-base

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