Go Down

Topic: DCF77 Master Pulse Bracket Clock (Read 9702 times) previous topic - next topic

oliverb

Dec 04, 2013, 09:59 pm Last Edit: Jan 27, 2014, 09:53 pm by oliverb Reason: 1
This is my first Arduino Project so I am sure you will find plenty of ways to improve on my code.

I wanted to build a clock as a backup to my old logic controlled Master Clock http://home.btconnect.com/brettoliver1/masterclock.htm this clock had a DCF77 decoder using logic gates that was just used to keep the clock in sync every minute.

I wanted a true DCF77 decoder that would set the time and provide pulse outputs to drive all my different types of slave clocks.

I came across Arduino and in particular the Time, DCF77 and Timezone libraries. All the hard work was done for me. I found a cheap 20x4 LCD display on ebay http://www.ebay.co.uk/itm/161107072069?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 that only required 2 wires plus power and I was away.



I built the circuit out on breadboard to test it and then fitted into a "hacked"  Ikea lanten. To keep the size down I fitted the Arduino chip on to the vero board with the other components.

I added an old skeleton clock movement to show the time and used an LED panel to monitor the clock pulses. I cut out the old quartz driver from this clock then connected my "quartz motor" drive pulse from the Arduino to it.

The skeletal movement caused some problems as I found when the clock synchronised (about 6 times a day) the LCD display would jump a second to show the corrected time but of course the clock motor would not. I had to add a bit of code to make the quartz cock motor double pulse when the clock corrected. I have also done the same for a few of the clock pulses.

I have also added a battery to keep the clock running if I need to "carry time" around the house to check my slave clocks are in sync.

My master and voltmeter slave clock chime the hours in sync so I have added a quarter chime to this clock. On the hour the quarter chime goes off 3 seconds early so the chime stops just in time for the hour chimes on the other clocks to start.

The chime is a sample and is played back via an ISD1730 chip.

The LCD display shows time and date, time last synchronized, synchronization status, time of last missed pulse and number of missed pulses per day.



Here is a link to a  very short video animation I made showing the clock from 23:59:55 seconds to 00:00:32 and gives an idea of the clock  working including the chimes. The hour chimes are from my other clock and the clunk every 30 seconds are from my 30 second slaves.
You Tube Video Link
http://youtu.be/Pye6zYBQjiY

Here is my code. Bear in mind it is my first attempt at writing for Arduino!
I have based lots of the code on the example files provided with the libraries.
The timezone is set for London England.

oliverb

#1
Dec 04, 2013, 10:02 pm Last Edit: Jan 04, 2014, 12:05 am by oliverb Reason: 1

strykeroz

Thanks for sharing.  I really love the look you've arrived at here.
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

oliverb

#3
Dec 04, 2013, 10:19 pm Last Edit: Dec 05, 2013, 09:07 am by oliverb Reason: 1
Here is the schematic.



and vero layout


oliverb

Thanks strykeroz.
I think I spent more time modifying the case than building the clock.

strykeroz


I think I spent more time modifying the case than building the clock.
I think it was entirely worth it! 

After reading a little to work out what you've done here, it transpires we have no LF time transmitter in Australia however there are infrequent reports of the Japanese time signal being received weakly.  That's a shame.  It's not that I need another project for the queue...but this does look cool, and my dad is a retired clockmaker so thought I had a likely source for the naked movement in his shed  8)

Geoff
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

oliverb

Quote
it transpires we have no LF time transmitter in Australia


What about using a  GPS module instead?
I think it will be my next project.



fungus

Advanced Arduino

oliverb

#8
Dec 05, 2013, 11:40 am Last Edit: Feb 09, 2014, 05:52 pm by oliverb Reason: 1
I removed the old Red SMD LED off the I2C interface from the 4x20 LCD display and added a bright Blue LED on a short length of wire in it's place and used it to illuminate the inside of the case. I have also removed the rear piece of glass and added a mirror.

I managed to get this picture this morning showing the clock in a dark room.

fungus


I managed to get this picture this morning showing the clock in a dark room.


Pretty... but... you can't actually see the time! Doesn't that defeat the point?

Ideally you should have some LEDs on the clock hands but that would be difficult to wire (you'd need some sort of DC brushes).

Maybe some fluorescent paint and UV LEDs? A different color for each hand?


Advanced Arduino

oliverb

#10
Dec 05, 2013, 01:10 pm Last Edit: Dec 05, 2013, 04:41 pm by oliverb Reason: 1
I know what you mean but of all clocks skeletal clocks will always be more difficult to read.
In real life the hands are much clearer as our eyes can see a far wider range of light and dark than my digital camera.

I have had to manipulate the dark picture in photoshop just to get it a bit closer to real life. The blue LCD display for example just came out all white. I had to take 3 pictures all at different exposures then stitch them together to get an even exposure.

oliverb

Here are a couple more pics from different angles showing the 2 boards and wiring etc.




strykeroz

"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

fungus


Quote
it transpires we have no LF time transmitter in Australia


What about using a  GPS module instead?
I think it will be my next project.


How about both, so you can compare the results... :-)
Advanced Arduino

oliverb


Congrats on the Hack-a-Day mention !

Geoff


Thanks Geoff I did'nt realize it had been posted so quickly!

There have been some good comments so far but I know from before some of the members don't hold back if they don't like something.  :)

Go Up