Maybe you just drink coffee. Then this article is not particularly interesting for you. But if you like a cup of black or green tea once in a while you might know the problem: You prepare your tea and you let it stand for a minute too long. Then it is bitter. So the next time you use the timer functionality of your smartphone … unlock the screen, open the timer app, enter something like “3:00” (minutes), press start, pour boiling water over the tea, wait. Then your phone beeps like crazy while you are fumbling around with the hot and wet teabag you want to dispose of. Finally you unlock your beeping phone with your wet fingers, open the timer app again and silence it. Pure stress.
Of course that is a first world problem and you could just deal with it. Or if you are a tinkerer, like me, you might want to build yourself the perfect tea timer. The desired properties are:
- Very small
- Extremely simple user interface
- When finished it plays a short melody and goes to standby by itself
- Not expensive
- Long battery life
So I made a small PCB with the toner transfer method hosting only very few (SMD) components:
- Atmel ATTiny25 microcontroller
- Piezo speaker
- LED (+ resistor)
- Two miniature push-buttons
- Battery holder (for CR2032)
The PCB design was done using KICAD. But the project would be also very suited to be build on a protoboard.
As you see in the pictures, the whole thing is powered by means of a CR2032 3.0V lithium battery. The battery holder is made from rectangular pin headers for the (+) contact and a small thin piece of sheet metal (crimp contact tape reel) which contacts the (-) contact of the battery.
Yes, there is no quartz; I use the internal oscillator of the ATTiny, which makes it not a super-accurate clock.
There are two buttons. One button increments the timer by one minute, the second increments by ten minutes. The first push also arms the timer. So, to set the timer to three minutes, one would push the one-minute-button three times in a row.
When the timer is running, the LED is flashing each second to indicate that the alarm is set.
The countdown can be aborted any time by pushing one of the buttons for circa two seconds.
As always, the microcontroller is programmed in C. And because I’m an open source nerd I do it with gcc-avr and avrdude in the linux command line rather than in a shiny IDE.
Most of the time the microcontroller is in deep-sleep mode. The push buttons are wired to pins that can trigger interrupts and wake up the microcontroller. In the sleeping state the whole device practically draws no current.
I also happened to write a very simple music synthesizer to play melodies on the piezo buzzer.
I designed a simple case for the tea timer which can be 3D-printed. Design was done with FreeCAD (guess, it’s open source).
Here you have the source files for the PCB design, the AVR C source code and the case 3D model:
or if you prefer, here is the same stuff in form of a git repository: