Picture of Lap Stopwatch with ATmega328 Microcontroller
This instructable will show you how to build your own stopwatch to record multiple splits using an ATmega328 programmable microcontroller. When one presses the start button (or slaps the metal band in my watch), the screen displays the last lap for a second then continues the time on the next lap. It’s great for all you runners out there doing an interval workout.
Remove these adsRemove these ads by Signing Up

Step 1: Gather Materials

Picture of Gather Materials
Needed Materials:
• Arduino Uno or Duemilanove
• ATmega328 microcontroller
• Computer to use Arduino
• breadboard
• Three buttons
• A switch
• Three resistors*
• 16 MHz crystal oscillator
• Two 22 pF capacitors
• Adafruit SSD1306 128X32 LCD screen**
• Two AA batteries**
• Soldering iron and soldering board
• Wires
• Wristband
• Encasing

Optional but Useful:
• Hot Glue gun
• Super glue
• Wire strippers
• Multimeter
• Acetal Polymer
• Blue tempered spring steel

*I used 10 kΩ, but the value doesn’t matter too much, as it is just used to stabilize the voltage so it drops quickly when the buttons are no longer pressed.

**I realized later on that this lcd screen needs 20mA of current, but a regular coin battery that can only provide .19 mA, so I had to use two AA batteries to meet the current demand. I would suggest looking for a more compact battery that can provide at least 3 V but less than 5V and more current such as some camera batteries. Either that or try to find a different lcd screen, but then the code will need to be modified. As of now, this lcd can be bought at (
combs11 months ago


Battery-wise... seems like you could use AAAs instead of AAs?

Or the much smaller CR2032 coin cells... this white paper from TI suggests (at a skim) that 20ma draw is reasonable enough:

Those versed in the ways (and dangers) of lithium-polymer/lithum-ion batteries can also find many tiny 150mah-250mah cells on eBay, which would still be nice and light when paired with a $1.50-2.00 protection/USB charging PCB.

combs combs11 months ago

P.S., not sure about the Adafruit library, but the u8g library lets you put the SSD1306 into a fairly low-power (0.4mah for my 128x64) "sleep mode" that makes it friendlier to smaller power sources.

P.P.S., if you'd like to skip the resistors, connect switches to ground instead, and use INPUT_PULLUP instead of INPUT on your pinModes and swap the HIGHs/LOWs. (When pullup mode is enabled, the input pins are "pulled up" in voltage by tiny, weak pathways in the atmega to 5V; pressing the button makes a much stronger connection to ground, causing a digitalRead to return LOW instead of the non-pressed HIGH.)