Top‎ > ‎Atmel AVR stuff‎ > ‎

! Tic Tac Clock

  • Small.
  • Simple:  ATTINY84A, 15 x 5mm LEDs, 7 x 220Ω resistor, 0.1µF capacitor, piezoelectric speaker.
  • Long life on batteries: less than 13µA @ 3 volts, over 5 years on two AAAA batteries or a single CR2450 cell battery.
  • Very readable.
  • 12/14 hour modes.
  • Date, leap-year aware.
  • Daily alarm.
  • Two extra days-of-the-week alarms.
  • Count-up timer.
  • Count-down timer.
  • Chronometer (stopwatch).
  • Animations.
  • User editable messages.
  • User editable font characters.
  • Battery voltage display.
  • Chimes.
  • Pulses.
  • Random dice generator.
  • Tunable crystal frequency drift compensation.
  • Open source, user manual, utilities.

Fits inside a tic tac® box:



Tic Tac clock with 15 LEDs schematic.

All functions on the clock are operated using the single button:
  • One press displays the time.
  • Two display the date.
  • Three display the alarm.
  • Four display the count-up timer.
  • Etc...
A long press of the button (one second or mode) enters the settings mode.

Here's a video of the clock being operated to display the time (05:45:24) and then
the date (Sun Jun 22 2014):

N.B.: Crappy webcam that has issues with raster frequency.  In person the display is solid.

The choice of a 15 LEDs (3x5) display is to get the most functionality with the least resources.
It can display pretty much all uppercase letters, punctuation and a few other doodles:

Tic Tac clock font.

The design decisions for this clock are that first and foremost I wanted a small, portable clock that I could
use on the go.  I'm far-sighted (bad eyesight, not clairvoyant) so I need glasses for looking at near things,
but I usually walk outside without glasses since I can see just fine past the length of my arms.

This makes it annoying for reading the time on a wristwatch or a phone; it requires pulling out the glasses.

The tic tac clock's large single digit makes it very easy to read without glasses.

Ever since I've owned a digital watch, I've always wished that it had a way to adjust the clock's drift without
having to open the blasted thing and adjust a finicky variable capacitor, an endeavour that usually ends
up with a much worse drift.  The Tic Tac clock lets the user adjust the drift so that very good accuracy can be
accomplished with adjustments as small as parts in 100 million.  That's over-kill since the crystal's drift
caused by temperature fluctuations is larger, but 2-3 seconds per month is feasible.

It's using red LEDs because they have lower forward voltage than other colours, so the clock will
last longer on batteries as the voltage drops.  Also, red doesn't affect night vision that much, a god-send
for nighttime.

The end goal is to make a wristwatch (SOIC, SMD, etc...) but this prototype is already so useful I've
been carrying it around.

I've chosen a tic tac® box for an enclosure because it's the smallest that fits the components, it's cheap,
and the contents of the box are a bonus.  I like tic tac® candy. Lastly, "tic tac" is French for "Tick Tock", so
it's very apropos.

By the way, if you'd prefer you can use a 7-segment single digit display module instead, although the
current firmware 7-segment code isn't up to date.  It will be fixed in a future revision, soon.

7 segment schematic

Very good accuracy can be achieved with drift measurement and compensation.  In this video, two
clocks are running side by side, the one on the left is a breadboard prototype which has had its
time set just a few minutes prior, the one on the right in the orange tictac box had its time
adjusted four days prior.   Both are in drift measurement mode which displays pulses every
second and minute and show better than 1/30th of a second synchronization.  That's not
bad after four days.  The pulses disappear for a short while in the middle of the video because
of the video camera's induced stroboscopic effect.

Here's the content of cheatsheet.txt, if you're curious: (you must be if you're still reading)

+--- Display modes ---+ +--------------- Action modes ----------------+
|  1  TIME            | | .  Set parameters       P  Power down       |
|  2  DATE            | | A  Animations           R  Reset timer      |
|  3  ALARM           | | C  Toggle countdown     T  Tiggle timer     |
|  4  TIMER           | | D  Dice                 U  Edit user msg.   |
|  5  COUNTDOWN TIMER | | G  Chrono (stopwatch)   Z  Zero seconds     |
|  6  BATTERY         | | M  Measure drift        =  Set alt. params. |
|  7  RUN TIME        | +---------------------------------------------+
|  8  DRIFT COMP.     | +---------------- Parameters -----------------+
|  9  (C) + VERSION   | | 12 34 56  78  9ABC  DE FG  HIJKLM   N   O   |
| 10+ USER MESSAGES   | | 23:59 31 Jul  2014  AL:RM  DRIFTC  SEC 12H  |
+---------------------+ |   P     Q    R     S      T     U   V   W   |
  +-- Chime/Pulse --+   | Pulse Chime Beep Speed  Rfrsh Slow VRB DOW  |
  | 1  Every second |   +---------------------------------------------+
  | 2  Every minute |   +-------------- Day of the week --------------+
  | 4  Every 15min. |   |  0:SUN 1:MON 2:TUE 3:WED 4:THU 5:FRI 6:SAT  |
  | 8  Every hour   |   +---------------------------------------------+
  +-----------------+   +- Alternate Parameters --+------- DD --------+
                        | 1234 56789A BCDEFG      |  3E= MON to FRI   |
                        | CDTM ALRMDD ALRMDD      |  41= SAT to SUN   |

Here's a copy of the manual's Table of Contents:

  - Display modes.
  - Action modes.

  - Setting parameters.
  - Setting the time and date.
  - Setting the alarm.
  - Setting the chime.
  - Setting the pulse.
  - Setting the beep tone.
  - Setting the display speed.
  - Setting the 12/24 hour mode.
  - Setting the display seconds mode.
  - Setting verbose mode.
  - Setting the display refresh rate.

  - Using the timer.
  - Using the chrono (stopwatch).
  - Using the dice.
  - Using the animations.

  - About the alternate parameters.
  - Using the countdown timer.
  - Using the two alternate alarms.

  - Personalizing the user messages manually.
  - Personalizing the user messages using RS232TA.
  - Adjusting the clock's time using RS232TA.

  - Editing the user characters.
  - Setting the user characters with RS232TA.

  - About adjusting the clock's drift.
  - Adjusting the clock's drift manually with a calculator or CALCDRIFT.SH.
  - Adjusting the clock's drift using RS232TA.

  - Turning the clock's power off.
  - Compiling the RS232TA optional utility.
  - Various notes.

Danny Chouinard, July 2014.

Danny Chouinard,
Jul 26, 2014, 3:03 AM
Danny Chouinard,
Jul 26, 2014, 3:04 AM