The most accurate clock in your house This clock combines a microcontroller, a multicolor display, and a GPS to put precision timing on your desk. After noticing one of my GPS clocks losing signal ...Read More…
This clock combines a microcontroller, a multicolor display, and a GPS to put precision timing on your desk. After noticing one of my GPS clocks losing signal at random times, I wanted to know at a glance not only the time, but also how many satellites were in view because normally at best all you get is a PPS LED.
In short, this device takes timing information from GPS and both triggers an interrupt on an ATMega328p to update the time that is displayed on the display and also sends the signal out the serial port for NTP on your computer. The microcontroller also monitors the NMEA feed to learn how many satellites are in view and updates the background color of the LCD to be red for low visibility, green for acceptable, and blue for superb signal. I've found other clocks that used GPS for time, but they looked to the NMEA stream instead of a time pulse, so they were always at least a half-second off. While this device has delays of about 100ms associated with updating the LCD, human vision takes half that time to go from the retina to the occipital lobe so the difference between the onscreen display and the pulse out the serial port is basically a blink in human time scales.
There are female headers on the right for attaching a GPS; the pinout is printed on the bottom but it's Adafruit format: PPS, 5V, GND, RX, TX (with the next four NC) so you can make your own. After that, the PPS pin goes to four places: First, an extra pinout so you can wire in something fun. Next, to an SMD LED on the underside of the board. Then into a hex inverter and off to the SP232 and on to the DCD pin of the DB9. Finally, one leg reaches the interrupt pin on the ATMega328p to trigger that handler. 5V and GND are what you'd expect, and the RX and TX feed into both the SP232 for the DB9 and into the ATMega328p so it can be aware of the current time.
The right side of the board has three pairs of connections. The first is used to prefer 12-hour time instead of 24-hour time with a jumper. Next are two buttons: One is momentary and triggers an interrupt for configuration mode, the second is a toggle switch to enable or disable a one-hour offset for Daylight Time. The left side of the board has three trimpots: timezone, brightness, and contrast. You'll see in the video they were originally knobs until I decided they get set once and never change so I moved them to the board. Timezone supports every current timezone: I see many who assume that all timezones are exactly one hour offset from UTC but a look at the time in India, Newfoundland, or Afghanistan quickly demonstrates there are as many exceptions as rules.
The board takes power from a normal 7V to 12V 2.1mm C+ jack. From there it passed through a fuse and diode before hitting an EzSBC 5V PSU2 regulator. Those parts costs fifteen times as much as a normal heat-generating linear regulator but it helps us all burn a little less dinosaur fuel. The board has extra power pins: VIN, GND, and 5V are all available for troubleshooting or rewiring.
The board has an ISP header, so if you want to change my code and upload your own code, it's simple enough. The board also has some expansion ports currently unused, like the slot for the phototransistor to automatically cut brightness in darkness and room for a 5mm LED at the back if the SMD LEDs aren't preferred. The core functions exist, so it's time for me to release what I planned instead of letting feature creep keep the board from ever existing.
I used to offer this as a bare PCB or kit. I don't anymore, but if you really really want that, send a message.
So now there's just one option: a fully assembled kit. It's made with love, attention, and pride by me. I turn the contrast all the way up, adjust the brightness to something reasonable, and set the timezone for you.
The case is the easy part, compared to how many board revisions I've gone through so far. I've done a few mockups so far, but it's still at the prototype phase. I expect to have someday a final and perfect SVG file you can send to Ponoko to get a 3mm acrylic case made. But I keep changing my design... ugh.
Coming soon I'll post here a list of the materials used and instructions for assembling the kit. I also hope to shortly update the software to determine if it's pitch black and halve the brightness level. But as anyone that's worked with a phototransitor or photocell is probably well aware, finding the right values for resistors and gauging the difference between sunlight and a lamp is hard.
Hey, if you made it this far, thanks. Send me an email or find me on Twitter if you have questions. Also check out my simple-helper-adapter for the Adafruit GPS in another listing.
Randal | Feb. 16, 2018
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!