Homemade Clock - Page 1
Forum section: electronics / projects

author: rpetitho
author_rank: Contributor
timestamp: February 15, 2021, 08:53:27 pm
content: Here is a project I completed recently. It is a very accurate clock with LED matrix display. The goal of this one was to learn about LED Matrix multiplexing and build a few alarm clocks for the kids. I ended up with three clocks in some nice cases. See pics. I made some mistakes in the design that I would change in version 1.x but was able to solve in software. I put a place for a GPS add-on, but didn't feel like spending the time to program that portion, as the OXCO keeps darn accurate time.-Bob

author: MikeK
author_rank: Super Contributor
timestamp: February 15, 2021, 09:44:30 pm
content: Nice. How accurate is it? You may need some tint over the LED's to improve viewability.

author: MikeK
author_rank: Super Contributor
timestamp: February 15, 2021, 09:47:38 pm
content: You should add a "flame" mode, maybe for the alarm. Lots of examples of flames on 8x8 LED's. Or a random thing like Pac Man eating the characters at midnight.

author: rpetitho
author_rank: Contributor
timestamp: February 15, 2021, 10:26:45 pm
content: There is an acrylic sheet over it with some tint, but I would do a slightly darker tint next time. It has good visibility indoors day or night, and looks better in real life.The clock is very accurate, about 1-2 ppb when compared to my GPSDO stabilized frequency counter. I expect it to drift over time but there is a hidden menu to adjust if needed. One of the mistakes I made is the OXCO is trimmed by one of the 16 bit counters on the 328PB, filtered of course. But any change to the input voltage or current draw changes the trim due to the voltage change at the adjust pin on the OXCO. This is corrected by using the internal voltage reference in the 328PB to create a long term correction value. When I moved the input voltage from 5.1 to 5.0 the clock moves by about 30 ppb, but in the course of about 10 min corrects itself back to about 1 ppb.

author: Infrared_Fred
author_rank: Regular Contributor
timestamp: February 15, 2021, 10:46:25 pm
content: Nice case, What material did you use?

author: rpetitho
author_rank: Contributor
timestamp: February 15, 2021, 10:57:14 pm
content: Made out of wood. The pictured one is Purple Heart with some lacquer, the back is totally open for firmware upgrades.

author: lowimpedance
author_rank: Super Contributor
timestamp: February 15, 2021, 11:13:33 pm
content: That is a well thought out build, I like the PCB layout and choice of display, thanks for sharing.

author: MikeK
author_rank: Super Contributor
timestamp: February 15, 2021, 11:44:29 pm
content: What's the watch crystal for?

author: rpetitho
author_rank: Contributor
timestamp: February 16, 2021, 12:06:11 am
content: Quote from: MikeK on February 15, 2021, 11:44:29 pmA MCP7940N RTC. It keeps time, alarm, and OCXO calibration values in case of power interruption. Diodes prevent the cell from discharging when the clock is plugged in. Low power so it should give a very long life to the battery, 5+ years when running on battery only. When normally powered, the RTC is disciplined by the OCXO so it is good to about 1-2ppm during power loss.I needed to store OCXO cal values in the SRAM of the RTC because every new firmware update erased the EEPROM on the micro, so now the cal survives power cycles and new firmware updates without change. As long as you don't do a firmware update with a bad battery you are good.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: February 16, 2021, 12:18:16 am
content: Autographed, too. Nice