Arduino Reaction Speed Game
by ArduinoPrints3D in Circuits > Arduino
354 Views, 2 Favorites, 0 Comments
Arduino Reaction Speed Game
In many olympic sports reaction time can be vital for a successful race. They are often so short that a few hundred milliseconds can make a huge difference. That is why I made this reaction timer. This device measures in milliseconds how fast you can respond to sound, light, or both.
Photo by Vidar Nordli-Mathisen on Unsplash
Supplies
To make this project you need:
- Computer with Arduino IDE link
- Access to a 3D printer
- Slicer software (I used Orca Slicer) link
- hot glue
- Arduino Uno (I used the R4 WIFI model but any model should work) link
- 8x32 led matrix module link
- Female/Female Jumper Wires link
- Extra-long break-away male header link
- 28 mm arcade button (mine was from this kit but you may be able to find them induvidually for cheaper) link
- active buzzer
- 10k Ω resistor
- 100 uF electolytic capacitor
- 0.1 uF ceramic Capacitor
- M3 - 0.5 x 16mm machine screws link
- M3 - 0.5 hex nut link
Print the Models
For this step all files need to be downloaded, sliced, and printed.
The model is divided into four parts:
- The base is the main body of the timer.
- The diffuser scatters the light of the led matrix and serves as a front cover.
- The Bracket holds the led matrix onto the diffuser.
- The Lid covers up the side of the timer.
The print settings I used are 0.2 mm layer height, precise wall, PLA at 200℃ , and brim. The diffuser needs to be printed in white but you can choose the other parts' colors.
Before you put in any electronics you should test that the diffuser is not too loose in the base. If it is you can use a heat gun or hair dryer to heat the base and bend the walls in a little
Feel free to edit any parts as you need.
Assemble Electronics
Please refer to the above images and wiring guide for help with these steps.
- Slide the Arduino into the base.
- Glue the breadboard close to the Arduino.
- Wire the 5v and GND of the Arduino to the + and - rails on the breadboard.
- Add the capacitors to the power rails.
- Add the resistor connecting the - rail to a standard row on the breadboard.
- Add the buzzer to the breadboard with the GND side on the - rail.
- Add a row of five headers to the arduino between D13 and D9 on the Arduino.
- Connect D9 from the Arduino to the + pin of the buzzer.
- Connect the arcade button to D10 of the Arduino and the - rail on the breadboard.
- Connect the VCC and GND from the led matrix to the + and - rails on the breadboard.
- Connect DIN, CS, and CLK from the led matrix to D11, D12, and D13 on the Arduino respectively.
- To make the wires long enough to reach the lid you may need to extend them with another wire as shown in the eleventh photo.
- Once you are done with the wiring you can secure the wires and components down with hot glue and/or tape.
Assemble the 3D Prints
- Screw the arcade button into the hole in the diffuser.
- Attatch the led matrix to the diffuser with the bracket, four screws, and four hex nuts.
- Slide hex nuts into the slot in the base.
- Slide the diffuser into the base.
- Screw the lid on.
Code
This is the code to upload to the Arduino. The full explanation for the code is in the comments of the code.
The code uses these libraries:
- Chrono
- MD_Parola
- SPI
- CTRL
Downloads
Usage
This is how you use the device.
- Plug the timer into any device with a serial monitor or plotter (your could use Arduino IDE or an online option like https://web-serial-plotter.atomic14.com/)
- Set baud rate on your device to 115200
- Press the button whenever the screen lights up or the buzzer beeps.
- If you want to switch to a different mode send:
- 'L' to switch to light.
- 'S' to switch to sound.
- 'B' to switch to light+sound.
- 'P' to pause, unpause the game.
- Note that these settings will only be triggered at the end of the loop.
Final Thoughts
I really enjoyed making this project and I hope you liked reading this documentation of me making it. Maybe it could help you improve your reaction time. I learned about how your brain processes stimulus and how you can react to sound faster than light. I tested each mode for 20 rounds and I ended up getting a score slightly faster on average for sound.