So we got tired of not being able to see what time it was when we were watching movies/shows on Netflix. We could have just bought a clock, but where’s the fun in that? I had an EM-406 GPS module and an ArduPilot lying around, and I heard about Sparkfun’s 12ft GPS Wall Clock so I figured I would give it a try.
I had built a clock before just using an Arduino board, but the clock would get out of sync after a couple of days because of the little bit of processing time that was taken by the Arduino. So I put that aside and was planning on getting a Real Time Clock DS3234 IC from Sparkfun, but the chip is a bit expensive, hard to solder, and the breakout board is even more expensive. Not that I couldn’t afford to spend $20 on this, I just had more exciting projects on my mind so it went to the back burner.
When I heard that you could use a GPS module to get very accurate UTC, I was like “Allllllrighty then!” and I started working. I had a little trouble programming the ArduPilot until I realized that you have to connect a power supply other than the FTDI cable to power the MCU. Once I did that, I got a simple blinky sketch running, and then I started working with the EM-406 module. When the EM-406 module has a signal, it’s LED blinks. Once it’s blinking you can get UTC time from it using an NMEA library, do some funky magic and “badda bing, badda boom” you’ve got a clock. See my code below: