Pages

21.9.12

Quacking Oven Timer

The kitchen stove had no timer. Hannah had grown out of the waterfowl-themed slippers that she had been given. What came next? A schlock quack duck cook clock hack.




MSP430 Launchpad: I have time for this


It's a bit of an old video but I though I would post it just for fun. The TI MSP430 Launchpad is incredible value for a microcontroller development board and is ideally suited for making clocks. Firstly because the MSP430 series chips use amazingly little power so they can run for ages on a small battery, and secondly because the launchpad comes with a watch crystal.

There were also some inspiring clock builds out there. I was particularly taken with this superbly compact clock built on a mini breadboard by simpleAVR. (The taking didn't stop there: I borrowed a good deal of his code.)

A quacking, blinking duck head would make an ideal clock alarm. Inside it was a small PCB with 2 watch batteries, a couple of LEDs, and a piezo disc. I discovered that I could make it quack by grounding a particular pad on the PCB for a moment or two.


Multiplexing I/O Pins


The main difficulty was that the MSP430G2231 chip I was using had only 8 I/O pins. The LED display needed 12 inputs: 7 for the segments plus dot, and one each for the 4 digits. I handled the segments using just 3 pins connected to a 74HC164 shift register (data, clock, and the 3V power line). I used 4 more I/O pins to control the digits.

But I also needed three buttons to program the timer (UP, DOWN, and ON/OFF). I multiplexed the buttons using diode logic so that the ON/OFF button gave a signal equivalent to pressing both UP and DOWN at the same time. In the way I was able to get the input from all 3 buttons using 2 I/O pins, one of which I aliased with the data line on the 74HC164. This worked well, albeit with the drawback that the display froze when the pressing the button.

Lastly I needed 1 I/O pin to initiate the quack. A pull-up resistor on the power line for 74HC164 ensured that the alarm would go off when the pin was pulled low, but not when the microcontroller was asleep. This meant that the display went off briefly when the quacking was initiated. I decided to make this as a feature by flashing the display of zeroes on and off during the alarm.

Kitchen timer unquacked


I put the whole thing in one of these handy project boxes from Rapid Electronics. A bit of adhesive magnetic sheet helped stick it to the oven. I'm afraid that I wired it up freehand so I don't have a circuit diagram, but the code is archived in a repository on Github if you would like to try to recreate the project. Good luck!


Construction Tips


Recreating this project is going to be a bit Tricky, mainly because you will have to come up with your own schematic. Programming the Launchpad is not too difficult using the tutorials on the wiki.


Linkbacks


Quack A Day (just kidding)
Embedds
Little Bird Electronics (I kid you not)

No comments:

Post a Comment