Accurate 1 Minute Pulse

Immaculan

New Member
Hi All,

I have a large "Old School" Slave Clock that requires a pulse be sent to a solenoid every minute to move the hands.
I want it to be reasonably accurate +/- 1 sec per week will be OK.
Question: Is the built in clock of the Picaxe 08M accurate enough to send a .5 sec pulse then count 59.5 sec and do it again (over and over)?
I have thought about using a DS1307 to keep time but really think it to be a bit of overkill if the Picaxe can keep reasonable time.
Any help would be greatly appreciated.

Cheers
Jamie
 

premelec

Senior Member
The PICAXE insternal clock is not that accurate - you can get an accurate 1 minute signal with a crystal and CMOS 4060 or use the 1 second pulses out of a 'quartz clock' module to get the 1 minute etc...
 

manuka

Senior Member
An 08M is quite able to organise such a pulse, but it's internal clock will wander far beyond your criteria! This arises mostly from temperature variations,with supply voltage also an issue. I usually say "no better than ±1%" as is ( ~ 1minute an hour). A lot of work has been done with cheap digital watch "engines", but even thay will be pushed to hold a second a week. How about tapping into a radio time source, or (better) GPS?
 

Immaculan

New Member
Thanks for your help.
I think I will go with the DS1307, polling it constantly, and on the change of the minute variable from the previous poll fire a high out for half a second.
Ive worked with the DS1307 before and it seems to be quite accurate, (maybe not a second a week but good enough)

Cheers

Jamie
 

BCJKiwi

Senior Member
If a DS1307 is used, the SQwaveout can be set for 1 Hz.
Picaxe can then count that to 60 and use an output to drive the clock each minute.

The DS1307 would not need to be set to any particular time.

Other Axe inputs could be used with PBs to send multiple pulses for setting the time.

The DS1337C might be a good alternative as it incorporates a crystal within the chip. While fiddly to do it can be soldered directly to an 8 pin turned pin socket to convert it to a DIP.
 

MPep

Senior Member
Some GPSs have a 1 pulse-per-second output. Search around. Only thing will be to ensure that the GPS can 'see' the sky. Or use an antenna cable if not too unsightly.
 

eclectic

Moderator
There's also Hippy's ideas in this thread.
http://www.picaxeforum.co.uk/showthread.php?t=7142&highlight=lposc.zip
Download address in post #13.

Another, slightly wacky, idea?

BOGOF?

Using this thread as a source.
http://www.picaxeforum.co.uk/showthread.php?t=11334&highlight=decoding+time+signal
See especially post #24 (Minute beep)

Hack the Argos clock, and take out the signal.
(But leave the mechanics working)
Each minute, a 433 transmitter sends the “beep”.

Receiver in school clock. Signal amplified to solenoid.

The caveat is the MSF downtime days. :-(

e

Just noticed that you live in Oz.
Therefore ignore last suggestion!
 
Last edited:

hippy

Ex-Staff (retired)
Last edited:

Immaculan

New Member
Thanks all for your ideas.
Love the 08M with crystal solution, thanks Hippy.
I just happen to have all the hardware I need for this, so now to find the time. (no pun intended)
 

kevrus

New Member
If this is not battery operated, could you use the 50hz mains frequency for timing? Or am I talking my usual rubbish :)
 
Last edited:

manuka

Senior Member
The 50 Hz mains makes a first rate reference (& has of course been used traditionally for clocks), BUT it too can vary short term. It may help if the original poster clarified just where he is, his budget & if "old school" meant in a school or just in the style. Stan
 

boriz

Senior Member
Mains 50Hz is a very accurate reference. They alter the frequency very slightly so that any inaccuracies are completely cancelled within any 24 hour period (a total of 4320000 pulses). It’s also very easy to use. Definitely my choice for any mains powered accurate timing.
 

Andrew Cowan

Senior Member
I agree with that. I have used mains timing, and although the frequency varies, the average frequency over 24 hours is always exactly 50Hz (to 4 or 5 decimal places).

However, the UK has one of the most accurate timebases - if you are in a country that has less high quality power (eg India), I would expect the freqency to vary hugely depending on the load on the power station.

A
 

Tom2000

Senior Member
I'll agree with all the folks who've said that, for long term accuracy, using the mains frequency as your timebase is the simplest and cheapest way to obtain accurate long-term timing.

I've attached a little .gif, stolen from another project, showing you how to derive a timing pulse from the mains supply and how to connect it to the Picaxe.

All you need to do, then, is to count pulses in an interrupt routine, summing them to a register. All your main routine will do, then, is to watch the value stored in that register, sending your clock pulse and clearing that register when it reaches the target value.

(Note that if your power line is noisy, you might want to include the equivalent of a switch debounce routine within your interrupt routine to swallow short noise spikes.)

Good luck!

Tom
 

Attachments

Immaculan

New Member
The 50 Hz mains makes a first rate reference (& has of course been used traditionally for clocks), BUT it too can vary short term. It may help if the original poster clarified just where he is, his budget & if "old school" meant in a school or just in the style. Stan
Thanks Stan,
I was originally going to go with a battery powered solution as the clock is to go on the wall and I didnt want an unsightly cord hanging from it.
After doing some calculations I dont think I can get enough life out of the batteries due to the high draw of the solenoid, its only on for a short time but it really adds up when it fires every minute day in day out.
I will be doing some testing on the cell life over the next few weeks to see how they fare.
Then if I must have a cord I will go with the mains reference method, (Easy, Reliable Accurate).
On your second point, I have heaps of parts from previous projects & collected throughout the years, etc, and am prepared to spend up to $50 AUD for any misc parts I dont have.
The Clock itself is a "Monarch" Slave clock from the 1920's, made of an Oak case with metal dial and hands.
It would have probably been from a university or hospital etc, du to the fact it requires a Master clock to drive the solenoid hand mechanism.
Cheers
Jamie
 

premelec

Senior Member
I could swear I have some distant memory of staring at one of these waiting for some bell to ring.... :)
 

MPep

Senior Member
As it required a Master clock, could it have been from a commercial ship??
Years ago, they too had a single master clock to drive other slave displays.
 

Immaculan

New Member
As it required a Master clock, could it have been from a commercial ship??
Years ago, they too had a single master clock to drive other slave displays.
Quite possible, i bought it from a business that is closing down and had a fire sale. Unfortunatly it would be hard to trace the original user as this business has been operating since the 40's and got all of their stock at auctions. Some of the stuff they had was squirreled away for 50 years.
 
Top