After building a 4bit counter using JK flip-flops last week, my son and I thought about what we could build using counters which would be of use around the house. We thought of two things – a 3 minute timer for timing how long you have brushed your teeth and a 6 minute timer for soft boiled eggs. The 9bit counter circuit required to build a 6 minute timer using JK flip-flops would require 5 chips plus a 555 timer set to “tick” once per second and quite a bit of discrete logic to turn on and blink the LEDs at the correct times. Knowing how much work this would involve to design it and then build it using strip board, I turned to the trusty PICAXE microcontroller to simplify things.
The advantage of using a microcontroller is that it is pretty simple to build what would be complex using discrete logic and therefore we decided to build an egg-teeth timer, i.e. both of the timers in one device. We used a PICAXE 20M to build the first prototype with output pins 0, 1 and 2 connected to 330 ohm resistors and then yellow LEDs. Input Pin5 is used to select the function of the device, i.e. eggs or teeth with output pins 4 and 5 connected to 330 ohm resistors and then green LEDs to indicate which function has been selected. A piezo buzzer is connected to output pin 3 to give an audible signal once the counter has reached either 3 or 6 minutes depending on the selected function. The code for the device is listed below:
Having built the first prototype, the next step was to build an enclosure for the device, below is an image of the prototype and the device’s enclosure.
The next step is to move the prototype into the enclosure, but before doing so we are going to redesign the device around a PICAXE-08 Proto Board and a PICAXE-08M microcontroller in an effort to reduce the space required in the enclosure and to use a “simple” microcontroller more appropriate to the devices’ functionality.