Author Topic: Homemade Clock  (Read 1000 times)

0 Members and 1 Guest are viewing this topic.

Offline rpetithoTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Homemade Clock
« on: February 15, 2021, 08:53:27 pm »
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

 
The following users thanked this post: DrG

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: Homemade Clock
« Reply #1 on: February 15, 2021, 09:44:30 pm »
Nice.  How accurate is it?  You may need some tint over the LED's to improve viewability.
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: Homemade Clock
« Reply #2 on: February 15, 2021, 09:47:38 pm »
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.
 

Offline rpetithoTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Homemade Clock
« Reply #3 on: February 15, 2021, 10:26:45 pm »
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. 
 

Offline Infrared_Fred

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: Homemade Clock
« Reply #4 on: February 15, 2021, 10:46:25 pm »
Nice case, What material did you use?
Cheapness has its own cost.
 

Offline rpetithoTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Homemade Clock
« Reply #5 on: February 15, 2021, 10:57:14 pm »
Made out of wood. The pictured one is Purple Heart with some lacquer, the back is totally open for firmware upgrades. 
 

Offline lowimpedance

  • Super Contributor
  • ***
  • Posts: 1270
  • Country: au
  • Watts in an ohm?
Re: Homemade Clock
« Reply #6 on: February 15, 2021, 11:13:33 pm »
That is a well thought out build, I like the PCB layout and choice of display, thanks for sharing.
The odd multimeter or 2 or 3 or 4...or........can't remember !.
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: Homemade Clock
« Reply #7 on: February 15, 2021, 11:44:29 pm »
What's the watch crystal for?
 

Offline rpetithoTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Homemade Clock
« Reply #8 on: February 16, 2021, 12:06:11 am »
What's the watch crystal for?

A 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.
 

Offline JohnnyMalaria

  • Super Contributor
  • ***
  • Posts: 1154
  • Country: us
    • Enlighten Scientific LLC
Re: Homemade Clock
« Reply #9 on: February 16, 2021, 12:18:16 am »
Autographed, too. Nice :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf