Create project Need help?
Show more (3)
bera
  • Labs project

GPS wall clock

Status: Proposal
4340
8
votes
May 25, 2015
figure-2_2.jpg
I hate to adjust or reset our wall clocks when they run slow or fast. In Vindhyanagar apartment we have 3 such wall clocks. One digital and two analog wall clocks. None of them are precise. Once in six months they need to adjust the time and when the battery becomes weak they run noticeably slow. Sometimes as slow as 5 minutes to 10 minutes that our guest points to that and shameful us promises to set them right.
 
Ever since my daughter was here she used to adjust those obnoxious clocks before they become noticeably slow but since she is now far away in Pune for her engineering study, so there is none to look after them. My wife will not do that nasty job so it lefts on me to find spare time, climb on the stool and do the dirty work.
 
The digital wall clock has two small push buttons at the back for time adjustment. Over the years these buttons have become very ineffective. You have to keep them pressed to slow or fast the time and many times they overshot. It's all very frustrating !
 
But the frustration is the mother of many good things and here's my one. With the cheap GPS module that arrived from aliexpress.com, I leaped into action and on the couple of weekend afternoons I built upon this GPS clock.
 
Parts required:
01. Ublox GPS Module with antenna – 1 pc : $10.5  
02. 0.56 Inches 7 segment 4 digital display in a block (common cathode or anode) – 2 pcs : $0.9 / piece
03. Power supply unit: 5 volt to 12 volt , 1000 ma DC  - $4 
 
(Above pieces are aliexpress.com price, they deliver free to India, look for your country options )
 
04. Shift registers – 74HC595N – 2 pcs : In India this is for Rs:10 / piece (not even $0.2)
05. ATMEGA-328 , 16 MHZ quartz, IC 7805, IC LD33V, 2* 10 pf, vero board – Rs:350 ($6)
Item 3 and 4 are available plenty in India and are reasonably chip. Look for them in your country local electronic market.
 
 
If you can source a 5 volt power supply then you can get rid of IC7805 as it only converts incoming DC to 5 volt. However, the IC LD33V is required as it converts 5 volt to 3.3 volt which is required for the GPS module.
 
Time required to built : 4 hours.
 
All parts at a glance:
figure-1
 
My Prototype:
figure-2
 
My prototype:
figure-3
 
Schematic drawing:
figure-4
 
To change the display mode I've put a small pot of 10K on A0 which when changed the display will also change from only time to day-date-lattitude-longitude-altitude by rolling.
 
Since this clock is getting signal straight from GPS satellite it wont require for time adjustment ever. Some GPS module has a PPS (Pulse Per Second) signal inbuilt. If your model has one then it will blink once per second – thus showing the GPS module isin action.
 
Here's a typical GPS module:
figure-5  [courtesy: Aliexpress.com ]
 
 
 
Construction:
On a small piece of vero board I assembled this beauty. For driving the 7 segment displays I used multiplexing by shift registers which are very fast and cheap. Here I used common cathode displays however, the program can take any type of displays. For common anode type display just reverse the bytes in the variable digits & seq1. 
 
 
Software:
The software is built on Arduino UNO. The remaining analog or digital pins can be used for creating alarm or relay switching for which suitable code to be added in the existing code. A small module soundg() is used for an alarm tone generation on digital pin-11 using tone() function of Arduino which is not very efficient but works.
 
Country specific:
The clock gets raw data from satellite which is equivalent to GMT. To set your own country specific time adjust the time according to your country time with respect to GMT.  India is GMT+5:30 therefore, I added 5 to hour and 30 to minute. In the similar way you too have to adjust your country time. The adjustment is to be done only once rest will be taken care by the code.
 
 
30-07-15: Hey, Now I'm planning to extend this clock to analog-digital clock such that there would be one dial clock with hour and minute hand besides the digital display. First I thought to make it with 360 degree servos but they are not suitable so I'm playing with stepper motors and awating few more break throughs. Once done the ana-digital clock is just a program away.
 
                         If there is a power failue the servos starts from zero. Here I've made a break through where when the power fails, on restoration of power the stepper goes back to zero position first. Remaining part I'm still experimenting and searching for help.
 
31-07-15: Yes, finally the breakthrough of precise stepper movement to 1 degree with acceleration and discelleration is achieved. Soon, in couple of days I will publish the ana-digital GPS clock.
 
02-08-15:
The minute hand is ready and placed on an analog dial clock. It's accurate, precise yet cheap. Waiting for my other stepper motor to arrive from aliexpress.com. The hour hand program is also ready but held up for want of arrival of stepper motor.
 
13-08-15:
My testing is complete. First I tried with Accelstepper to run the stepper but finally came back to plain normal stepper.h and it works. When the power fails the stepper first goes back to 0 position and then it reads the hour and minute data and then moves forword to that position. For storing the 0th position I'm using the in built EEPROM of Arduino.
 
The 2nd stepper is yet to arrive therefore, I still keep you waiting for the final show. However, the sketch for the minute hand is being uploaded today.
 
Bye, bye
 
S. Bera
Vindhyanagar
Read the full post
Show less
Products
Images
analog digital GPS clock
prototype
Prototype
Bill of materials
GPS module
Stepper - bipolar (02 nos) connections
analog-Digital clock dial
another view
Connection details
Full dial clock
Schematics
Software

Loading comments...