Oops Clock

This is a digital clock I designed that includes a ring of WS2812 Neopixel LEDs to mimic a sweep second hand. In normal timekeeping mode, the seconds LEDs fade from one to the next every 2 seconds, while the 4 digit LED in the middle displays the hours and minutes. As the LEDs circle around the clock, they change color every time the sequence gets to the top and a new minute starts.


Why is it called the “Oops Clock”? Do you notice anything weird about the front panel LED ring? I didn’t notice a pretty big mistake until after I had made all the parts, attached the LEDs, and assembled the clock, and set out to write the operating software to control it all! Do you see it yet?

There are only 29 holes for the seconds LEDs instead of the 30 you’d normally expect in a ring that counts in 2 second intervals!

When I was laying out the LED ring in the CAD software, I assumed that the original object wasn’t counted when you did a circular pattern. So when I selected “repeat 29 times” it made a total of 29 holes in the ring, not 29 new holes plus the original hole.  I somehow did not notice the mistake until much later.  Oops!  I decided to celebrate the 29 LED ring as a ‘feature’ – the original intent was to transition the LEDs every 2 seconds all around the ring. My fix was to take an extra 2 seconds to transition the color of the seconds LED as it crosses at the top of the minute. Now the LEDs still move at the intended 2 seconds transition rate, but the missing LED is accounted for in the color change that happens at the top of each cycle. Surprisingly it looks like it was intended like that from the beginning. What do you think – did this fix turn a fail into a win?

A press of the mode switch selects between normal clock timekeeping mode and a timer mode. We have this clock mounted in our exercise room, and it’s convenient to go to timer mode and start the count at the beginning of a workout to keep track of how much time has elapsed. The clock will automatically revert to normal timekeeping mode if it’s not manually switched back within 100 minutes.

The front panel is a piece of 1/4″ maple plywood and was prepared using my CNC machine to cut the holes and the opening for the digital readout. The seconds holes were filled with hot melt glue as diffusers for the LEDs. The front panel is sized to mount in a standard 8 by 10 inch picture frame, along with some small pieces of wood with keyhole slots used to mount the clock to the wall. The LED ring was also cut out with my CNC machine, and the LED strip was cut into individual segments and attached using the self-adhesive tape backing. Then the +5V, Ground, and DI/DO connections were made between each LED.

The display is a red 1.2 inch 4 Digit 7 Seven Segment LED Display with an I2C interface bought from a seller on eBay. The processor is an Arduino Nano. The time is kept by a DS1307 AT24C32 real time clock (RTC) module. There are 29 WS2812 Neopixel LEDs in the ring – these are the ’60 pixels per meter’ self-adhesive strip kind. The three low profile pushbutton switches are mounted to a piece of perfboard. Everything is attached with small screws to short wooden standoffs which are glued to the back of the front panel for a neat and slim profile.

The clock module as delivered has circuitry set up to use a LIR2032 type rechargeable coin cell battery. I wanted to use a standard CR2032, so it’s a good idea to disable the trickle charge circuit so this non-rechargeable battery doesn’t prematurely die. It’s easy to do – just remove R4, R5, R6, and D1 from the board and replace R6 with a jumper. This connects the coin cell battery’s positive terminal directly to the VBAT input of the DS1307 chip. With the battery standby current load of 300 nanoamps specified for the DS1307 chip, a standard CR2032 that has a capacity of about 230 mAh should last for well over 10 years, which is likely longer than the shelf life of the battery itself. (300nA x 24 x 365 x 10 = 26.3 mAh).

Here is a link to the Arduino software for this clock.

Here is a link to the dxf file for the front panel.

Comments are closed.