Arduino clock project - 7-segment display & RTC

I just finished a simple Arduino project that reads the time from a DS1307 module and displays it on a 7-Segment Display.

It started as a very simple clock using an RTC module, then I added a speaker audio feedback, a couple of buttons to set the time. Then I ended up adding in a menu system to allow the user to set the time, brightness, and sound setting and stored those variables in non-volatile memory of the DS1307.

What started as a simple project grew to eventually encompass a lot of other functions. This made it rather interesting, as it is a collection of many ‘typical’ embedded tasks. These include: accessing a module via I2C, parsing a serial stream to get user data, using square wave pulses to trigger interrupts for screen updating, using interrupts with a button to trigger a menu, button de-bounce (for the 2nd button), and storing data in non-volatile memory via I2C.

I spent a decent amount of time commenting, and breaking it up into different functions so it could be easily used by others. However, this caused the code grew to over 600 lines.

Its on github here: https://github.com/azrobbo/Arduino-Clock-Seven-Segment

EDIT - I’ve added a pic of the inside of the project box, and how everything is squeezed into the project box.

Here’s quick view of the assembly of the project.

  • On the front is a 4-Digit 7-Segment Display from Sparkfun. This is one of their current revisions, but I also have one of the earlier modules. I cut the hole as close as I could, then “cemented” the display in place with Sugru. (For those of you wondering, in the first picture, that’s the programming cable hanging out of the battery hatch. This was done so I could power the device for the picture.)
  • The small hole on the top left is for the speaker; I have a very small cell-phone speaker sugru’d in place up there. I had to carefully measure to align the hole just right with the hole in the speaker itself.
  • On the back is the jack for providing power (7-15VDC), and two buttons for accessing the menu, and changing values.

Vey Slick.....I'm doing something similar here http://arduino.cc/forum/index.php/topic,92858.0.html

Your code has led to some ideas for my project thanks!

Very nice box! The buttons are in the back, en. Hard to get to when you're half sleeping. :sleeping: I'd love to see a staples "that was easy" button type of thing stuck on the top surface. Just my 2 cents.

Thanks for the feedback unhappyeld & liudr.

Good feedback on the buttons. When I built it, I hadn't considered its use as an alarm clock. But, since it already has a speaker on-board, alarm clock features could very easily be added. So, I’ll add a button or two on top to be used for alarm and snooze features in the next rev.

This version was designed for my living room, so I was trying to hide the buttons & make it as small as possible. Since they’re rarely used with the current code, location hasn’t been an issue. But, I can absolutely see how it would if you try using it in another setting.

Any schematic would be very valuable.

Thanks!

Very nice work, I'm trying to build something similar at the moment :)