Friday, February 5, 2010

Introducing IllyClock - alarm clock in a coffee can

Updated Aug 3/2011
Check out the "minimalist" version here.




Borrowing from Ladyada's idea of encasing the MintyBoost in an Altoids tin box, I thought that a coffee can, Illy in particular, would make a good enclosure for an alarm clock.

The electronics is based on Wiseduino (Arduino clone with DS1307 real time clock on board), with a LED matrix shield sitting on top. The shield is built with 74HC595 shift registers that drive two bi-color (red, green, and orange by subtraction) 8x8 LED matrices.

The clock uses a rotary encoder with button as the only user input.
The functionality is simple and intuitive:
  • time is shown as hour and minutes;
  • clicking the button will show, using the symbol of a bell, the state of the alarm (enabled or disabled);
  • double clicking the button will show the alarm time and allow the user to set the alarm hour and alarm minutes (toggle between the two by clicking the button); increment the numbers by rotating the knob;
  • holding down the button will allow the user to set the time;
And here is an original feature: three hours before the alarm will sound, the time is shown in orange; one hour before the alarm will sound, the time is shown in red. So just by squinting at the clock, one can realize how much longer one can sleep.

Here it is in action:


A few details on the dual matrix shield can be found below.
(I will dedicate another post to this shield though.)





The shield was originally designed (as it is shown in the schematic above) to be equipped with an infrared receiver and a push button. "Hacking" it to take a rotary encoder instead is trivial.

The diagram below shows how the user can change the clock's state by either rotating the encoder or pushing the button.





Related:

6 comments:

  1. Nice! What music is playing on the video?

    Mike

    ReplyDelete
  2. Thanks Mike.
    The track is called, if I remember correctly, "Amerigo Vespucci".

    ReplyDelete
  3. Hello! How can i use common anode matrix? Have i change a shem or onli sketch? Thanks!

    ReplyDelete
  4. Sergey,
    You definitely can, with no change in schematic. You just need to change the software: negate the bits you push through the shift registers, then also negate the values you set on the rows.

    ReplyDelete
  5. I get an arror with the basic code :(

    In function 'void EEwrite_RTC(int, int)':
    error: 'class DS1307' has no member named 'set_sram_byte' In function 'int EEread_RTC(int)':

    Any ideas?

    Mowcius

    ReplyDelete
  6. Yes. The correct DS1307 files come in the zip. When They will unzip, they get expanded in their own directory. Make sure you delete all other DS1307 files you have around.
    Download code from here:
    http://code.google.com/p/wiseclock2/downloads/list

    ReplyDelete