This instructable will guide you through creating your own Arduino based Kitchen Timer. This is a quite simple project, requiring little or no programming or electronics knowledge, just the willingness to learn and fiddle - an ability most useful for modern man.
This kitchen timer is simple enough, press and hold a button and it will count up it multiples of five minutes, until you release the button. Upon doing so the timer will flash, and begin counting down. This timer includes an alarm and a display, with a piercing piezo buzzer to get your attention.
The arduino, laptop, protoshield, and USB Cable excluded; I took every electrical component from an old or broken device. Try to recycle things, its easy to get hold of broken electronics for free so make the most of it! See any jumpers on this design? No, paper clips are much better - cheap as chips and more sturdy too! :)
If you have any successes, or failures, modifications, or suggestions, please post them in the comments section below! I would love to see photos of your finished project!
Step 1: Components
For this instructable you will need:
An Arduino - I used the duemillanove, but you could always make one instead
Jumper Wires - I ran out of wire so used paperclips for this, but you could alway make your own
A momentary push button - I assume that you could use the one built into the protoshield!
A 10 Bar LED Bar Graph - you could just use 10 LED's for this, I found mine in a broken CD player
A Piezo-Electric Buzzer - I just desoldered this from an old Kitchen Timer with a broken chip in it, which was why I wanted to make myself an Arduino one in the first place!!
A resistor - to use any button with an Arduino a resistor is used; which gives a base voltage when the switch is open, and is bypassed when the switch is closed. I used a 10k resistor which I desoldered from a seed sowing machine.
An Arduino Shield - I have used this, since I like experimenting with my Arduino so don't want to have to keep building my kitchen timer whenever I need to use it.
A shield mounted breadboard - this just makes the whole thing a little neater.
More Resistors - for your components so as not to blow pins on your Arduino. Although I know that this is a good idea, I don't own enough resistors and don't know how to use the pull-up ones within the Arduino, so I have done without them for the moment. This is something to bear in mind, it's not my fault if you write off your Arduino!
Step 2: Build It!
This is the important bit of the Kitchen Timer.
The easiest way to show you how to wire up this circuit is to use the annotated Fritzing Sketch above.
I will now explain the circuit, to those who care.
As you can see one side of the 10 LED Bar Graph is connected to the Gnd pin on the Arduino, while each leg on the other side is connected to a digital Arduino Pin. This means that when a Pin on the Arduino is set to HIGH, the corresponding LED Segment will light up. The Pins used to connect the Arduino are 3, 4, 5, 6, 7, 8, 10, 11, 12, and 13, as Pin 2 is reserved for the button, and PWM Pin 9 is reserved for using the piezo-electric buzzer. The switch is wired so that when it is closed the 5v connects to Pin 2 and through to the Gnd Pin. This means that when the switch is closed Pin 2 can be read as HIGH, and when the switch is open Pin 2 will be read as LOW. The Piezo Buzzer is connected to PWM Pin 9 so that we can simulate a square sine wave through it using analogWrite, which will create a beeping noise to alert the user that the timer has finished.
Thats pretty much it, but I recommend checking back here if you need to do any trouble shooting.
NB: I recommend connecting the ground of the Piezo buzzer to the same ground as that of the LED Bar Graph, so as not to have anything interfering with the resistor and switch system for adding time to the counter.
Step 3: Code It! (Or use mine)
To run the Kitchen Timer you will need to feed your Arduino some nice tasty code. I have written a rather simple (but scary looking) code that can drive it all, and for those who are happy enough making it work but not understanding it you can download it now. If I remember correctly Instructables does something weird with .PDE files so I have compressed this in the ZIP format, although you can also find the text on PasteBin and paste it directly into your Arduino editor if you feel so inclined.
Explaining it gets a little complicated, so I will give you a brief overview, and the rest is pretty self explanatory:
First we initialise all of the pins and features that we are going to use, to make sure that our Arduino is going to be working with them. We use the const int to indicate that the Pin that we have initialised is constant and will not change. Variables can also be initialised, but are generally not constant as they are set throughout the script. We then check to see if the button (connected to Pin 2) has been depressed or not, and if it is it lights up the next segment and adds one to out 'tastyTimeVariable'. This means that we can then use an 'if' function to state the length of the required timing depending on the value of our tastyTimeVariable. You will see that we delay for "300L * 1000L" which equates to about 5 mins, as 300,000 milliseconds = 300 seconds, and 300/60 = 5, so quite accurately 5 mins. We then tell the Arduino that if the tastyTimeVariable is equal to anything other than 0 (in other words the button was pressed, and something has been timed) to play a graphical display, and buzz the buzzer. We can vary the length of the alarm by changing the for command.
I hope this has made some sense, I have also written comments into the script to help those trying to understand how it works, and modify it for their needs.
I have had a couple of updates made by individuals to the code, and you can find links to these in the comments below, although I will not be posting them here as I am unable to verify the accuracy of their code as the links that they have posted are no longer active. I can confirm that, although large, the code I have written and posted works well and is easy to understand should you wish to review it, so I'm afraid that I will not be able to assist in your troubleshooting should you use a different code.
Step 4: Get Cooking!
Yes, I mean it. Just plug it into a USB wall adapter, and you are away with your nice Arduino Kitchen Timer. I wouldn't think that it would be very waterproof, so please dry your hands well before using it, and anything you do with it is your own responsibility, so please don't try and sue me. I hold © Copyright for this Instructable and it's contents, but I would love you to share this if you reference the link to this instructable when you do so. Thanks guys, I hope it works for you!! Feel free to ask me anything in the comments, i will try to help you with it but I am a bit new to electronics and Arduino, so please bear that in mind!!
*/ Usage Instructions
Reset the Arduino, and press the button as the LED segments light. Each segment represents 5 mins. When the correct number of segments are lit release the button. The display will flash and the segments will appear again. After 5 mins one will disappear, etc until the timer is complete. At which point a graphic will be displayed and an alarm will sound. To stop the alarm reset the Arduino. There is no need to have the Arduino turned off, as the Kitchen Timer is designed not to function without input.
Anonymouse197, Ari Cooper Davis ©, anonymouse197[at]gmail.com