Reaction Timer
Welcome to my first instructable post! This guide will walk you through creating a basic Arduino-based reaction timer. Don't worry if you don't have a background in electronics; this step-by-step tutorial is designed to be beginner-friendly, allowing anyone to dive into the world of Arduino projects. So, let's get started!
Supplies
- Arduino Nano board
- 400-Point Solderless PCB Breadboard
- LED - Light Emitting Diode
- Silent Silica gel tactile switch - breadboard-friendly version
- USB cable for Arduino board
- Computer with Arduino IDE software installed (available for free from Arduino.cc)
- Option: Vintage Morse Key (e.g. Marconi, Kent or similar)
Setting Up the Arduino IDE
If you haven't already, download and install the Arduino IDE software on your computer. Below is the link to download Arduino IDE and also guides on how to install it in different systems:
https://docs.arduino.cc/software/ide-v1
This software will be used to program the Arduino board.
Ensure the correct board, processor and port are selected under the "Tools" menu.
Tools -> Board -> Arduino Nano
Tools -> Processor -> ATmega328P [or ATmega328P (Old Bootloader) for many Chinese clones]
Tools -> Port -> [usually port with the highest number]
Once installed, connect your Arduino board to the computer using the USB cable.
Building the Circuit
Let's start by connecting the components on the breadboard:
- Place the Arduino board on the breadboard.
- Insert the longer leg of the LED (anode) into the breadboard exactly below pin D11 on the Arduino board.
- Insert the shorter leg of the LED (cathode) into the breadboard exactly below pin D12 on the Arduino board.
- Insert one leg of the tactile switch into the breadboard exactly below pin D2 on the Arduino board.
- Insert the other leg of the tactile switch into the breadboard exactly below pin D4 on the Arduino board.
Writing the Code
Open the Arduino IDE software and copy the code provided below
Downloads
Upload the Code to Arduino Board
Connect Arduino Nano board to PC computer using USB cable
Start Arduino IDE software
Ensure the correct board, processor and port are selected under the "Tools" menu.
Tools -> Board -> Arduino Nano
Tools -> Processor -> ATmega328P [or ATmega328P (Old Bootloader) for many Chinese clones]
Tools -> Port -> [usually port with the highest number]
Click the "Upload" button to transfer the code to the Arduino board.
Initialise Serial Monitor
Initialise Serial monitor.
Tools -> Serial Monitor
Testing the Code
It's time to test the reaction timer with the code uploaded and the circuit connected. Press the push-button switch every time the LED blinks. Your reaction time will be displayed on the Arduino IDE's serial monitor.
Analysing the Data
Copy (Ctr+A followed by Ctr+C) data from Serial Monitor and Paste (Ctrl+V) them into an Excel file.
Data can be analysed in Excel or Jupyter Notebook.
Above is an example histogram of 130 samples of reaction time tests for the same person using a tactile switch. The average reaction time was 219 ms.
Optional: Morse Key
A Morse key, or a telegraph key, was designed to send Morse code messages. It typically consists of a lever or paddle that makes or breaks an electrical connection when pressed or released. One unique feature of the Morse key is its adjustable components, often made of brass screws. These screws allow the operator to fine-tune the key's sensitivity and response according to their preferences. By adjusting the tension and positioning of these screws, operators can achieve optimal performance and comfort.
When the Morse key is correctly set up, it provides a faster and more accurate input method for reaction time testing.
Optional: Connecting the Morse Key
- Remove the tactile switch from the breadboard.
- Insert one Morse Key cable into the breadboard exactly below pin D2 on the Arduino board.
- Insert the other Morse Key cable into the breadboard exactly below pin D4 on the Arduino board.
Optional: Testing the Morse Key
Press the Morse Key every time the LED blinks. Your reaction time will be displayed on the Arduino IDE's serial monitor.
Above is an example histogram of 130 samples of reaction time tests for this same person using a Morse Key. The average reaction time is 179 ms. It is much faster than a tactile switch.
Summary
Congratulations! You have successfully built a simple Arduino-based reaction timer and had the opportunity to compare a tactile switch and Morse Key. This project is just the tip of the iceberg regarding Arduino possibilities. Feel free to experiment, modify the code, and expand upon this project to create your own unique creations.
Remember, practice makes perfect! Enjoy the process of exploring electronics and coding with Arduino. If you have any questions, feel free to comment; I'll be happy to assist you.
This project was created with the support of AI.