top of page

Build: Arduino Reaction Timer + Experiment

  • Writer: engineering4impact
    engineering4impact
  • Aug 20, 2025
  • 5 min read

Updated: Aug 22, 2025

In this blog, we'll showcase our projects to inspire you to create your own. Our first project was a simple LED/button reaction timer powered by Arduino code. We used the Arduino Uno R3, connecting it via USB. Since this was our initial project, we chose to display the time values on the computer rather than on the device itself. However, it turned out to be quite useful for an experiment exploring the effects of visual and auditory distractions on reaction time. Below is a brief summary of our completed write-up for this experiment, which involved a single participant. We aim to demonstrate that various challenges can be addressed and solved through engineering, motivating us to make new discoveries. This particular experiment was designed to connect engineering with neuroscience.


1: Arduino UNO, 2: breadboard, 3: button, 4: LED, 5, jumper wires. (Not numbered: resistor (necessary to limit excess current) (220-330 for this project), USB cable (to connect to laptop)
1: Arduino UNO, 2: breadboard, 3: button, 4: LED, 5, jumper wires. (Not numbered: resistor (necessary to limit excess current) (220-330 for this project), USB cable (to connect to laptop)

How to Build It


This is a very simple build you can do with Arduino. We used an Arduino UNO R3 specifically. As seen in the diagram above, we connected a wire (blue) from the GND on the UNO to the negative rail of the breadboard. This establishes a ground connection for the whole circuit. Then, we did the following:


  • Place a resistor so that one end is in the same row as the GND rail, and the other end is in an empty row in the middle of the breadboard.

  • Insert the LED: the shorter leg (cathode) should be placed in the same row as the resistor, and the longer leg (anode) in a new row.

  • Connect a wire from the row with the LED’s longer leg to a digital pin on the Arduino (this pin will control the LED).

  • Finally, connect another wire from that same row (with the long LED leg) back to the negative rail (GND).

Why: rows on the breadboard are electrically connected. By linking the LED anode through a resistor to an Arduino pin, and its cathode to ground, the Arduino can safely power the LED.

  • A button has four prongs.

  • Place the button so that it straddles the middle trench of the breadboard (like a bridge between rows e and f). This way, each side of the button is separated.

  • Connect one side of the button to the row with the ground wire.

  • On the opposite side of the button, connect a jumper to a different digital pin on the Arduino.

Why: when the button is pressed, it completes the circuit and sends a signal to the Arduino pin. In the code, this lets the Arduino detect when you pressed the button.


Note: GND rail refers to the rail that the wire connected to the GND is on. There is not a specific rail called "GND rail".


Experiment Write Up


Below is the write up for our experiment on how distractions impact reaction time with an aim to explore why they do (using existing research in psychology and neuroscience).


Introduction

One's reaction time can be determined by many different parts of the brain as it involves various functions such as processing, attention, visual cues, and decision making. Factors like cognitive load and stimulus intensity can negatively impact reaction time (Clarke, n.d). This experiment therefore aims to model how external distractions can impact reaction time. It will use existing research to explore why they impact reaction time. It is not, however, representative of the actual brain and what happens to reaction time with these additional distractions.


Method

Materials used: 

  • Laptop with Arduino IDE

  • Arduino UNO R3 board

  • breadboard

  • jumper wires

  • 330 Ω resistor

  • LED

  • button

  • Bluetooth earbuds

  • smartphone.


The Arduino circuit recorded the time between LED flashes and the participant pressing a button. Bluetooth earbuds were used to amplify or block sounds, while a smartphone provided external stimuli.


Experiment Design

Each test had 10 trials, and there were four tests total: control, auditory distraction, visual distraction, and heightened alertness. Tests were performed at night with the participant seated. The LED flashed at random intervals to avoid predictability.


  • Control: Minimal/no environmental stimuli, earbuds used to block noise, well-lit environment.

  • Auditory Distraction: Background chatter played through earbuds, well-lit environment.

  • Visual Distraction: A second LED flashed between trials, and a silent video played on a smartphone, well-lit environment.

  • Heightened Alertness: Dim environment with distant ambulance sounds played through earbuds.


Results

Table 1: Reaction Times Across Different Conditions


Control

Auditory Distraction

Visual Distraction

High Alertness

Trial 1 (in ms)

205

403

317

285

Trial 2 (in ms)

280

237

256

279

Trial 3 (in ms)

233

300

261

304

Trial 4 (in ms)

248

428

445

276

Trial 5 (in ms)

218

254

384

225

Trial 6 (in ms)

221

404

234

239

Trial 7 (in ms)

266

266

300

379

Trial 8 (in ms)

264

294

281

218

Trial 9 (in ms)

217

250

319

265

Trial 10 (in ms)

259

276

224

253

Average (in ms)

241.1

311.2

302.1

272.3

Distraction tests showed greater variability in reaction time than the control, with auditory distraction causing the slowest average response.


Discussion

The slower average reaction time for the alertness test may reflect the effects of cognitive inflexibility that can occur during such conditions (Park and Moghaddam, 2017). This is further explained by Hannah Owens, as the amygdala is hyperactive during heightened alertness (Owens, 2024).


The results show that as more distractions were included, reaction times were slower, modeling attention-related challenges. External distractions can lead to reduced activation of the prefrontal cortex, the part of the brain responsible for executive function, due to the brain having to jump around to process the correct thing. The prefrontal cortex also plays a role in reaction time since the prefrontal cortex is responsible for temporal expectation using D1 dopamine. So, when that D1 dopamine is depleted, reaction times are slower (Parker et. al., 2014). This research suggests that external distractions can provide too much stimulation for the prefrontal cortex, disrupting sustained attention, and can indirectly impact D1 dopamine, leading to slowed reaction times. However, without a direct examination of activity in the brain, this research simply supports a hypothesis proposed in this experiment.


Limitations

This experiment included only one participant and relied on artificial distractions to simulate effects of overstimulation and scattered focus. Thus, the results cannot represent actual brain patterns and function with overstimulation. Participant bias of having an idea of which test will slow reaction time and a lack of diversity in age or gender may also affect outcomes.


Conclusion

The experiment demonstrated that external distractions can negatively impact reaction time. These results highlight the influence of overstimulation, scattered focus, and heightened alertness on cognitive performance.


However, this is a preliminary exploration and is not representative of activity in the brain when such distractions are present. It simply seeks to develop a simplified explanation of how distractions may impact reaction time using data and existing research.


References 

  1. Lmsw, H. O. (2024, November 19). This is what happens in your brain when you’re anxious, according to experts. Verywell Mind. https://www.verywellmind.com/this-is-your-brain-on-anxiety-8733665

  2. Otaki, M., & Shibata, K. (2019). The effect of different visual stimuli on reaction times: a performance comparison of young and middle-aged people. Journal of Physical Therapy Science, 31(3), 250–254. https://doi.org/10.1589/jpts.31.250

  3. Park, J., & Moghaddam, B. (2017). Impact of anxiety on prefrontal cortex encoding of cognitive flexibility. Neuroscience, 345, 193–202. https://doi.org/10.1016/j.neuroscience.2016.06.013

  4. Parker, K., Alberico, S., Miller, A., & Narayanan, N. (2013). Prefrontal D1 dopamine signaling is necessary for temporal expectation during reaction time performance. Neuroscience, 255, 246–254. https://doi.org/10.1016/j.neuroscience.2013.09.057


Comments


bottom of page