1Hz timer
Archiver
Posts: 46,084
I need an accurate timer that sends a pulse to the BS2
once a second. The various packaged real-time clocks are
not suitable since I have only one I/O pin available.
I considered a crystal and down counter (74HC4060 or equiv)
but having problems finding a standard crystal frequency
that can be divided down to 1Hz.
Any help would be appreciated.
A Stumpf
once a second. The various packaged real-time clocks are
not suitable since I have only one I/O pin available.
I considered a crystal and down counter (74HC4060 or equiv)
but having problems finding a standard crystal frequency
that can be divided down to 1Hz.
Any help would be appreciated.
A Stumpf
Comments
deliver a 1Hz pulse with an accuracy of microseconds. Some GPS boards can be
picked up for under $120.
All the best,
Mike
Original Message
From: "Adolph Stumpf" <astumpf@u...>
To: <basicstamps@egroups.com>
Sent: Monday, August 14, 2000 12:59 AM
Subject: [noparse][[/noparse]basicstamps] 1Hz timer
>
> I need an accurate timer that sends a pulse to the BS2
> once a second. The various packaged real-time clocks are
> not suitable since I have only one I/O pin available.
>
> I considered a crystal and down counter (74HC4060 or equiv)
> but having problems finding a standard crystal frequency
> that can be divided down to 1Hz.
>
> Any help would be appreciated.
>
> A Stumpf
>
>
>
>
>
>
can divide down a 1MHz or 100kHz crystal with decade counters. If you want
to use a binary divider, 32.768kHz crystals are very common for just this
reason.
Regards,
Al Williams
AWC
*Floating point math for the Stamp, PIC, SX, or any microcontroller:
http://www.al-williams.com/awce/pak1.htm
>
Original Message
> From: Adolph Stumpf [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=wO5ekqQK-k_W_K9fXmdmFVfCz1bx_0quORiGsrWJOl4qklq4wqmXbLdnffFnqHYpzTSnsjGqOQsLZcIHLw]astumpf@u...[/url
> Sent: Sunday, August 13, 2000 6:00 PM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] 1Hz timer
>
>
>
> I need an accurate timer that sends a pulse to the BS2
> once a second. The various packaged real-time clocks are
> not suitable since I have only one I/O pin available.
>
> I considered a crystal and down counter (74HC4060 or equiv)
> but having problems finding a standard crystal frequency
> that can be divided down to 1Hz.
>
> Any help would be appreciated.
>
> A Stumpf
>
>
>
>
much accuracy do you need? Also, what duty cycle, or pulse width do you
need. The PIC's are approaching the price of TTL logic chips now. I
can help you off the list if you need a PIC programmed.
Allan
Adolph Stumpf wrote:
> I need an accurate timer that sends a pulse to the BS2
> once a second. The various packaged real-time clocks are
> not suitable since I have only one I/O pin available.
>
> I considered a crystal and down counter (74HC4060 or equiv)
> but having problems finding a standard crystal frequency
> that can be divided down to 1Hz.
>
> Any help would be appreciated.
>
> A Stumpf
>
--
_____________________________________________________________________
"This year will go down in history.
For the first time, a civilized nation has full gun registration.
Our streets will be safer, our police more efficient,
and the world will follow our lead into the future!"
-- Adolph Hitler, 1933
______________________________________________________________________
The CHEAPEST way is to connect the power line to the BS2 pin through a 47K
resistor. Then you get an ACCURATE 60 Hz. This is good as long as you
don't need UL approval, in which case you should use an optoisolator.
Rob Richmond
Original Message
From: Adolph Stumpf [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=sOBFwU2rUWHfiOrzcZqNLWK1tGuGWhtPo9qKBoFnG5omKZHO4X82mX-oNlwLqt5GMCQi_UKDQrw]astumpf@u...[/url
Sent: Sunday, August 13, 2000 3:00 PM
To: basicstamps@egroups.com
Subject: [noparse][[/noparse]basicstamps] 1Hz timer
I need an accurate timer that sends a pulse to the BS2
once a second. The various packaged real-time clocks are
not suitable since I have only one I/O pin available.
I considered a crystal and down counter (74HC4060 or equiv)
but having problems finding a standard crystal frequency
that can be divided down to 1Hz.
Any help would be appreciated.
A Stumpf
>
>I need an accurate timer that sends a pulse to the BS2
>once a second. The various packaged real-time clocks are
>not suitable since I have only one I/O pin available.
>
>I considered a crystal and down counter (74HC4060 or equiv)
>but having problems finding a standard crystal frequency
>that can be divided down to 1Hz.
>
>Any help would be appreciated.
>
>A Stumpf
>
>
Adolph,
For using counter-ICs with home-made crystal oscillators You have
a good result with calculating 2^15 = 32768. Mostly used crystals
for watches comes with 32768 Hz. The divider IC with 14 binary stages
provides 0.5 Hz for common watch stepper-motors. Also to make with
discrete components for oscillator/divider in own design..
Two contributions I have to use any wanted pin of BS2-IC for
clocked input. I assume for your polling the BS2-IC in loop with included
deciding from the input state (IF ... THEN) for aligned actions.
Take care for shortnes (<<< 1 sec) for running your loop, the "precise"
input clocks make delay with using the needed polling loop for actions.
(Sorry, PIC16C57 has no interrupts, but perhaps You should thinking
about clocking to the BS2-IC reset pin for more"real time actions").
1. Why not use a external BASIC Stamp (toggle a pin with pause <time>
in loop). You can use a cheaper BS1-IC.
2. .... The cheapest solution: From a old watch (mostly in mechanical
defect, I used an old alarm clock ) dismantle the PCB. Replace the two
stepper-coils with resists. So You have a precise 0.5 Hz - stepper
pulse for your own using . Because it is driven by a low voltage
power-supply (1.2 to 3 V) you have to add a single transistor
to convert the voltage level for BASIC Stamp input.If needed a clock
of 1 Hz You should insert one divider stage or a no retriggered
Mono-Flop . Some more hints and a scheme you find in our book:
Kuehnel/Zahnert: "BASIC Stamp 2. Edition" ,NEWNES 2000, page 208
Regards Klaus
If you live in EUROPE, you can try a DCF-77 atomic time clock, it send one
pulse par second during 59 sec then 1 no pulse who is the synchro to get
time atomic.
It 's not very xpensive module 99 FF in/ www.selectronic.fr/ .
If you are intersting pair the source, see the next mail "dcf-77 & bs2sx".
john john
Original Message
From: Adolph Stumpf <astumpf@u...>
To: <basicstamps@egroups.com>
Sent: Monday, August 14, 2000 12:59 AM
Subject: [noparse][[/noparse]basicstamps] 1Hz timer
>
> I need an accurate timer that sends a pulse to the BS2
> once a second. The various packaged real-time clocks are
> not suitable since I have only one I/O pin available.
>
> I considered a crystal and down counter (74HC4060 or equiv)
> but having problems finding a standard crystal frequency
> that can be divided down to 1Hz.
>
> Any help would be appreciated.
>
> A Stumpf
>
>
>
>
>
I ended up with a 555 chip. After some time-consuming tweaks
it's running at better than 1% accuracy which is acceptable
for my application.
Adolph Stumpf
Nothing extraordinary, just a final thought: if you will be using
this in varying temperatures, the accuracy will suffer (depending on the
delta T and quality of components you use).
Have a nice evening,
Paul
On Tue, 15 Aug 2000, Adolph Stumpf wrote:
>
> Thanks for all the suggestion with my 1Hz timer problem.
>
> I ended up with a 555 chip. After some time-consuming tweaks
> it's running at better than 1% accuracy which is acceptable
> for my application.
>
> Adolph Stumpf
>
>
>
>
>
>
The oscillator for the BS2 is very stable with temperature, therefore it is
possible to use the program itself to determine elapsed times, provided you
first calibrate the system to know what programming will give the specific
time you need.
If you must use an external signal of EXACTLY 1 HZ, a one component solution
that is extremely accurate is available (+/- 5 parts per million). It is
the SPG-8651B from Epson Electronics America, Inc. This IC includes a super
stable and super accurate crystal oscillator, and the dividers needed to get
many different frequencies, including 1HZ.
It is possible to try basic crystal oscillators, and add a series of
dividers to them as well. Although the basic crystal oscillator method may
appear cheaper, it is not usually as accurate, and may be more costly after
you consider the time and effort to collect all the required parts, and
connect/debug all the counters.
I have used the SPG-8651B and find it is hard to beat!
John
Original Message
From: Adolph Stumpf <astumpf@u...>
To: basicstamps@egroups.com <basicstamps@egroups.com>
Date: Sunday, August 13, 2000 7:00 PM
Subject: [noparse][[/noparse]basicstamps] 1Hz timer
>
>I need an accurate timer that sends a pulse to the BS2 once a second. The
various packaged real-time clocks are not suitable since I have only one I/O
pin available. I considered a crystal and down counter (74HC4060 or equiv)
but having problems finding a standard crystal frequency
>that can be divided down to 1Hz.
>
>Any help would be appreciated.
>
>A Stumpf
>
>
>
>
>
>
Thanks for the tip. The SPG-8651B seems to be the ideal solution
for my timing problem.
It's a bit pricey ($20 from Digikey) but I'd consider using
it if my 555 setup isn't stable enough.
Regards, Adolph
--- In basicstamps@egroups.com, "Technology Electronics, Ltd."
<teltd@i...> wrote:
> Hello Adolph,
>
> The oscillator for the BS2 is very stable with temperature,
therefore it is
> possible to use the program itself to determine elapsed times,
provided you
> first calibrate the system to know what programming will give the
specific
> time you need.
>
> If you must use an external signal of EXACTLY 1 HZ, a one component
solution
> that is extremely accurate is available (+/- 5 parts per million).
It is
> the SPG-8651B from Epson Electronics America, Inc. This IC
includes
a super
> stable and super accurate crystal oscillator, and the dividers
needed to get
> many different frequencies, including 1HZ.
>
> It is possible to try basic crystal oscillators, and add a series of
> dividers to them as well. Although the basic crystal oscillator
method may
> appear cheaper, it is not usually as accurate, and may be more
costly after
> you consider the time and effort to collect all the required parts,
and
> connect/debug all the counters.
>
> I have used the SPG-8651B and find it is hard to beat!
>
> John