Pictured below is a programmable timer we recently made for animal behaviour research. The operator switches on the power to the timer which turns on an LED bulb (to indicate that animal training is in progress). When the timer finishes its count down the bulb is turned off, and an on board buzzer sounds briefly to remind the operator to turn off the power to the timer.
This timer is built around an Arduino Pro Mini board with additional components. Using the on board up and down buttons and a 16x LCD digital display, the operator can set the timer in one minute intervals to the desired time.
The most recent setting is stored in long term memory, so the timer only has to be re-programmed if the operator wants it to run for a different time than that most recently used.
While the timer is running, the timer setting and the time to go countdown are both displayed as shown above.
As the built in timer in an Arduino is consistent, but not very accurate, this device had to be calibrated to ensure that it was running at the correct rate. Initially it was programmed with 1000 Arduino milliseconds set to correspond to one actual second and run for 20 (Arduino) minutes simultaneously with an accurate stopwatch. When the timer finished, the stopwatch was stopped and compared to what the Arduino considered to be 20 minutes. It turned out that the Arduino clock was slow by 13 seconds over the 20 minutes, so we divided the real 20m13s by 20m and multiplied this error factor (1.0108) by 1000ms to give 1011 as the number of Arduino milliseconds in one actual second. After updating the code on the Arduino to reflect this, the timer ran to accuracy of under 1 second over 20 minutes – fine for a timer to be used typically for 10 minutes or less.
If you need a timer for any application, email email@example.com with details of your exact requirements.