a→ab

computation, game design, and experimentation


front page | about | archives | code dump | c.s. for mere mortals | tags | rss feed

MSP430G2xxx based Tea Timer

November 8, 2010
tags:

Hello all,

I am an avid tea drinker. As such, I make many cups of various kinds of tea, each with their own optimal steep times. Usually, I just keep track of the time, but I have found that I can make the best cup of tea by setting a timer to go off after a certain amount of time, depending on the style of tea that I am brewing. I find the best results come from going by the following table (based on personal preference and experimentation):

Tea VarietyRecommended Steep Time
White tea2 minutes
Green tea3 minutes
Black/Oolong tea4 minutes
Herbal tea/infusions (most varieties)5 minutes
Rooibos tea (African redbush)6 minutes
Chai tea (regardless of base)8 minutes
Kukicha twig tea and other varietiesin intervals of 1 minute

With this in mind, I decided that I should make a tea timer. This seems simple enough, and it has been on my to-do list for a while anyway, and 43oh! is having an MSP430 Project of the Month Contest, so I decided to hack it together. Turned out rather simple.

The full part count is as follows:

  • 3 toggle switches (or a 3-switch DIP, as I used)
  • 4 10k resistors
  • 1 5mm green LED
  • 1 piezo buzzer with integrated driver circuit
  • 1 tact switch/push button
  • wire
  • Any MSP430 uC with at least 1k flash and a TimerA module (though I could have hacked the WDT to work)

So, I assembled the circuit on my breadboard, following the schematic at the end of my post, and programmed the MSP430.

For the code, I borrowed beretta's TimerA code example, and tweaked it to fit the needs of my timer. The timer is to read the input value of the three switches as a binary value to determine tea type, set a "goal" amount of half-second ticks based upon the user's request, and when the user presses the "start" button, go into a waiting period. While the uC is waiting, the LED will be flashed slowly at first, but increasingly faster as the timer ticks closer to the goal. Once the goal amount of ticks has been reached, the LED will be turned on, and the buzzer will sound (mine sounds reminiscent of an old-fashioned tea kettle, so it's suitable). The buzzing can be stopped by pressing the "start" button again to reset the device, and allow another time to be set. Simple enough, right?

The code is available:

click here.

Basically, as I stated above, the user selects a mode (tea type) by way of the three switches, and then presses a button to start the timer. When the tea is done steeping, the buzzer goes off, and the user can press the button again to reset it. The switch positions corresponding to the tea types are as follows:

P1.6P1.5P1.4Tea type (time)
000White Tea (2 minutes)
001Green Tea (3 minutes)
010Black/Oolong Tea (4 minutes)
011Herbal Tea/Infusions (5 minutes)
100Chai Tea (8 minutes)
101Rooibos Tea (6 minutes)
110Other1 (1 minute)
111Other2 (30 seconds)

Now, this isn't the most accurate timer, as I'm not using the crystal, but it's accurate enough to steep a good cup of tea (believe me, I've used it a lot since I hacked it together), and my stopwatch tells me it's accurate to within around 6 seconds on average.

In the future, I'd like to use a better input mechanism (I might be geeky enough to remember binary codes for tea types, but most are not, so a rotary switch or something would be perfect), maybe a cheap LCD for a status indicator, even showing how much time remains, and potentially having the last two codes (110 and 111) be user programmable for any time in second increments up to half of an unsigned long (as the ticks are half-second ticks). Maybe even shove it all into an Altoids tin for portability and the geek-chic factor. Who knows?

Anyways, here's the schematic, and a photo of it in action:

Tea-Timer in action! (notice the LaunchPad is only used as a power supply here... I don't have a battery clip yet.)

tea-timer in action!

schematic

schematic

Thanks for reading!

Keep tweaking~

EDIT: Featured on 43oh! again! Check it here!

EDIT THE SECOND: Ended up tied for 4th place. Congratulations to the winners, AMagill and simpleavr! Check out the results here.

blog comments powered by Disqus