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.

Step 1: 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 (https://www.adafruit.com/products/661).
<p>Nice! </p><p>Battery-wise... seems like you could use AAAs instead of AAs? </p><p>Or the much smaller CR2032 coin cells... this white paper from TI suggests (at a skim) that 20ma draw is reasonable enough: http://www.ti.com/lit/wp/swra349/swra349.pdf</p><p>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. </p>
<p>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) &quot;sleep mode&quot; that makes it friendlier to smaller power sources.</p><p>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 &quot;pulled up&quot; 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.) </p>

About This Instructable



More by bgyroscope:Lap Stopwatch with ATmega328 Microcontroller 
Add instructable to: