MAKE_AT_HOME_WAVE_SMALL.jpg

Satellite CLOCK

logo_YT.png

Normally, RTC (Real Time Clock) ICs are used for time display which are easily available and reasonably accurate. But, the accuracy of RTC, highly depends on the seasonal / atmospheric temperature, which effects the performance of the crystal used in the RTC circuit. So, to have more accurate time, which is independent of temperature change, the Satellite Clock reads the data delivered from GPS ( Geographic Positioning System) satellites and displays in required format, which is highly accurate.

SatClock_TN_WIX.jpg

NEO-6M module:   NEO-6M, a GPS receiver module, used to receive NMEA (National Marine Electronics Association) data continuously from GPS satellite(s).  The data is transimtted through its TX pin (Serial data at 9600 baud rate, by default).   A sample data from GPS receiver is shown below.  The Arduino processes the data and picks the time stamp (marked using red colour line) in the received data string.

NEO6M_MODULE_WIX.jpg
GPS_DATA_WIX.jpg

TM1637 module:  The TM1637 module has 4 digits of seven segment display, with a colon between 2nd and 3rd digits, which is suitable for clock display system.  The IC behind the module receives the data using TWI (Two Wire Interface / IIC) and continuously refreshes the 4 digits.  By using this module, only two pins of micro-controller (or Arduino) is sufficient for interfacing.  The TM1637 module has brightness control of the display and may be changed as required.

TM_1637_MODULE_WIX.jpg

The basic working of the circuit is,  the data received by the GPS receiver module, NEO-6M, is transmitted to Arduino Uno's RX pin (of Serial port).  The Arduino Uno processes the data and picks the TIME stamp, by identifying the keyword GPGGA (or you may use GPRMC) in the received data string. Then, the time string is processed to show on TM1637 module, in UTC (Universal Time Coordinated) format (default format received by the GPS satellite) or Local time format (12 hour / 24 hour) as per jumper settings.

Refer full circuit diagram:

SatClock_CIRCUIT_NEW_WIX.jpg

INITIAL SETUP / TESTING:

The circuit is assembled on a general purpose PCB and connected the pins of Arduino Uno using berg strip (refer Video). Compile and upload SatClock.ino to Arduino Uno, using Arduino IDE. To avoid conflict with GPS data at RX pin of Arduino, while uploading sketch, the GPS module should be connected after uploading the sketch.

Once uploaded the sketch to Arduino Uno, all the segements of display module and two LEDs glow for a while as self-test.  Then, it shows 1637 number and enters the loop to receive the code from GPS module. For first time use ( or connected after long time ), it takes much time to connect to satellite, to display the time.  

To know the status / error, two types of indications are programmed in the sketch.

1) single moving horizontal line indicates, that the GPS module is absent or NO data is received from GPS module.

2) three moving horizontal lines indicate, that data is received from GPS, but not in the specified format or time stamp is invalid.

Once, valid data is received (means time stamp is received) from the GPS module, then the time stamp is processed and displayed on the TM1637 display, with blinking colon.  You may also observe that, an LED on the GPS module is also blinking at 1Hz rate, called PPS (Pulse Per Second) LED.

By connecting Jumper J1, the displays shows UTC time, which is matching to time stamp or GMT (Greenwich Mean Time).

By disconnecting Jumper J1, the display shows Local time, which is calculated by using the following variables used in the sketch.  The values are dependent on the country's time settings as per GMT . 

Here, +5 hour 30 minutes are used for India.

int ADJ_HH =  5; // change the HOURS value as per your country's time w.r.t. GMT
int ADJ_MM = 30; // change the MINUTES value as per your country's time w.r.t. GMT

 

Incase, both the Jumpers J1 & J2 are dis-connected, then, the display shows Local time in 12 hour format along with AM / PM indication on any on of the LEDs.

Similarly, if the Jumper J1 is disconnected and J2 is connected, then the display shows Local time in 24 hour format.  Both the LEDs are OFF in this mode.

The serial data output at pin TX of Arduino Uno is suppressed by marking as comment / remark in the sketch.  If you want to debug the code, on serial monitor, then remove the double slash before all Serial.print commands, using find and replace option, as shown below.

existing in sketch (find word)  --->             // Serial.print . . . . .

to be modified in sketch (replace with)  --->  Serial.print . . . . .

Complete Satellite Clock project assembly, using external DC power supply (instead of USB), is shown below:

ASSLY_WIX.jpg

For source code (arduino sketch), (SatClock.ino) , please send message through contact formThe full source code will be sent to your e-mail.

SMT_CONTACT_LOGO.jpg

If you are not willing to learn, no one can help you.
If you are determined to learn, no one can stop you.