In this project, we will use the chipKIT Uno32 board to build a digital stopwatch capable of timing minutes, seconds, and 1/10th of seconds, and with a basic start and stop control feature. A MAX7219-driven 8-digit seven segment LED display is used to display the time elapsed. The Reset switch on the Uno32 board will be used to reset the current time back to 0 when the stopwatch is stopped.
A stopwatch is a timepiece that measures the amount of time elapsed between the time when it is started and the time it is stopped. Stopwatch is useful in many activities, including sports, games, and cooking, for timing events. We are going to construct a digital stopwatch using the chipKIT Uno32 board and the SPI7SEGDISP8.56-1R display module. The stopwatch will have the time resolution of 1/10th of a second or 100 milliseconds, and maximum measurable interval of 99 minutes, after which the stopwatch rolls over to zero again. More details on the MAX7219-based serial seven segment display interface can be found here.
The power supply pins (VCC and Gnd) of the SPI7SEGDISP8.56-1R module are connected to the 5V and Gnd header pins of the Uno32 board. The DIN, CLK, and LOAD signal lines are driven by digital output pins 7, 6, and 5 of the Uno32 board. A tact switch is also required to toggle between Start/Stop of the stopwatch. It is connected to the interrupt pin INT0 (which is available on I/O pin 38) of the Uno32 board. A simple RC filter circuit is used to debounce the switch. The following figure shows the switch debouncer circuit and its debounce time as implemented in this project. The debounce time can be computed from the simple RC circuit transient response equation as illustrated below. For the given values of R2 and C1, the debounce time is computed to be ~3.5ms.
The complete setup of this project is shown in the picture below. The Start/Stop switch and the debounce circuit is built on a breadboard.
This Post / Project can also be found using search terms:
- google arduino timer tutorail
- stopwatch led display
- uno clock millisecond display