This Instructable will show you how to build an automatic stopwatch. Because running is fun, but sometimes you don't have anyone with you who can time you. I tried to keep it as simple, cheap and accurate as possible. You don't need a remote control or anything like that. It's one unit. I hope you can follow this Instructable and I would appreciate some feedback. Happy sprinting, running and building.
Step 1: Things Needed
1 x Arduino Uno
1 x Buzzer (I used a 28mm one: AL-28W01-PT)
1 x LCD (16 x 2 ; that works with the liquid crystal library)
3 x Buttons with a 7 mm diameter (you can use larger ones if you drill out the holes)
1 x Motion sensor HC-SR501
5 x 3mm screws
1 x Power button that fits in a 1.8 cm x 1.15 cm hole
2 x battery holder for 2xAA
- pins & sockets for arduino and LCD
- (hot) glue
- 3D printer (not nesecary)
- soldering iron
Step 2: Start Your 3D Prints
The prints are gonna take a while, so the first step is to get them going. I use a layer height of 0.2mm. Support is only needed for the main body. You can also build the case from other materials like wood but if you have access to a 3D printer you should use it. The only thing you should keep in mind is the orientation of the motion sensor.
Step 3: Wire Up the LCD
Lets get soldering. Put headers in the arduino and sockets on the LCD. Wire them up according to the wiring diagram. Take your time and make sure no contacts are bridged. The wire length from the LCD to the arduino should be around 70 mm (2.75 inch). I put the resistor (220 ohm) in heat shrink tubing and soldered the directly to the ports to save some space and make it simple.
Step 4: First Test
The next step is to load up the code and see if the LCD works. It should show the "home screen". If it doesn´t check your wiring and if your upload of the code to the arduino worked. Feel free to change the code to your personal preferences and add your own ideas.
Step 5: Buttons, Buzzer and Motion Sensor
Now its time to solder the buttons, buzzer and motions sensor to the arduino. The buzzer does not need to be exactly the same. You can even use multiple smaller ones and wire them up in parallel (they should be 3V-5V).
Simply follow the wiring diagram for all of the components. The wire length should be around 50 mm (2 inch) for the sensor and buzzer. The switches should have a wire length of 80 mm (3.15 inch) to give some slack when opening the stopwatch. Again take your time and check for errors.
Now if you start up the stopwatch you should hear some beeps and you should be able to navigate through the menu with the + and - buttons and change values with the middle button.
Step 6: Put It Together
Now it is time to put the electronics in the body. Some holes in the body probably need some sanding and treatment with a knife to make things fit.
Unplug the LCD and place it in the slot. Use some hot glue to secure it in place. Then you can put the internal battery cover in its place with some super glue. Slide the arduino in the hole at an angle and then put it down on the standoffs. It does not matter if some brake of since you can secure it with some hot glue. You can now plug in the LCD. The buzzer can simply be pressed in the hole. If you use a smaller buzzer simply secure it with some hot glue. The buttons can be screwed in the top cover. Button 6 goes to the left, button 8 in the middle and button 7 to the right.The motion sensor can be pressed in the hole and also secured with some hot glue.
Step 7: Power & Covers
We still need some power other than through the USB port. To make a battery holder I used two 2xAA battery holders. Simply glue them to each other and wire the up in series. (one black cable to one red cable) The other two cables go through the hole at the back of the battery compartment. The black one gets connected to one ground port of the arduino. The red goes through the hole for the power switch. Be sure to leave some slack so the pack can be pulled out to change the batteries.
Now its time for the power switch. Solder a red wire to the "Vin" port on the arduino (length: 65mm / 2.58 inch). The other end also goes through the hole for the power switch. Now you can solder the two wires to the two terminals of the switch and plug it in the hole.(if necessary secure it with glue)
You can also power the stopwatch with a powerbank through the USB port on the side.
Now screw on the top and battery cover and you are DONE!
Step 8: How to Use
It hope the building experience was not too bad. Congratulations if you have made it successfully.
But how does it work?
The button on the left is the minus button. The one in the middle is the main enter button. The one on the right is the plus button.
You can navigate thought the menu with +/-. To change a value press enter and change it with +/-.
Start distance: It is the direct distance to start. It is there to compensate the speed of sound since the watch beeps when you need to start and the signal arrives with a delay.
Start delay : It is the time you need to go to the start and get ready after you trigger the watch.
Volume: You guessed right... it controls the volume.
Now that you put in all your parameters you position the stopwatch at the finish line and press enter. It counts down your delay time and beeps 3 times when you got 10 seconds left, 2 times when you got 5 seconds left and one final, loud time when you need to start. When the motion sensor is triggered or the enter button is pressed the stopwatch stops and displays the time needed.
Happy running :-)
Step 9: Thank You!
Thanks for reading my Instructable. If you actually made the stopwatch that´s even better and definitely write a comment. If you have any questions or difficulties just let me know. I am happy to help.