- Difficulty
- Intermediate
- Build time
- 60-90 min
- Estimated cost
- $0-$15
- Age range
- 11-17
- Workspace
- A clear table about 90 cm wide
The finish line
What you will build
The timer records five valid reaction trials in milliseconds, detects early presses, and reports an average and best time.
Learning goals
- Identify how button press after a light cue produces measured reaction time in milliseconds.
- Construct and explain a human event-to-digital timing result system.
- Measure how cue type or hand used changes performance.
- Diagnose losses caused by button bounce and display delay.
Before you build
Materials, tools, and safety
Reuse-material cost: Usually under $5 with an existing kit. Supervision: Adult guidance recommended for wiring and cutting.
Tools
- Small screwdriver
- Wire stripper
- Multimeter
- Low-temperature glue gun or tape
Low-cost swaps
- Use alligator-clip leads for a no-solder version.
- Build and test the mechanism manually before adding electronics.
- Use a microcontroller board with built-in button and LED for a no-breadboard version.
Wiring table
| From | To | Purpose |
|---|---|---|
| Pin 9 | LED anode through 220 Ω | Provide visual cue with limited current |
| LED cathode | GND | Complete LED circuit |
| Button | Pin 2 and GND | Provide active-low response input |
| USB | Controller and serial monitor | Supply power and show results |
Project-specific safety
- Use only the listed low-voltage battery supply; never use mains electricity.
- Disconnect power before changing wires and stop if a motor, wire, or battery becomes warm.
- Use low voltage, include the LED resistor, keep screen brightness comfortable, and take breaks rather than repeating for long periods.
Orient the build
Place the build so button press after a light cue is on your left and measured reaction time in milliseconds is on your right. Call the side facing you the front, the far side the back, the tabletop the bottom, and the opposite face the top.
Build it
Step-by-step instructions
Step 1
Build the cue circuit
Connect the LED through its resistor and verify polarity.
Point it toward the player without glare.
Step 2
Wire the button
Connect between pin 2 and ground with internal pull-up enabled.
Mount it firmly.
Step 3
Test input edges
Print button state and confirm one press changes HIGH to LOW.
Add a short debounce interval.
Builder checkpoint: After test input edges, the first subassembly should stay aligned when handled gently.
Step 4
Create random waiting
Choose a 2-5 second random delay after a ready message.
Keep the LED off.
Watch for: If this stage binds or drifts, inspect timer resolution before adding more parts.
Step 5
Detect false starts
If the button is pressed before the cue, cancel the trial.
Require full release before reset.
Step 6
Measure valid response
Store millis when LED turns on and when a new press arrives.
Subtract and print the result.
Builder checkpoint: After measure valid response, operate the build slowly and confirm that measured reaction time in milliseconds begins without binding.
Step 7
Collect five trials
Record each valid result and ignore only clearly labeled false starts.
Allow a rest between trials.
Step 8
Report summary
Calculate average and minimum valid time.
Explain why more trials improve confidence.
Builder checkpoint: At the final checkpoint, The timer records five valid reaction trials in milliseconds, detects early presses, and reports an average and best time.
See the engineering
Why it works
- Input
- button press after a light cue
- Output
- measured reaction time in milliseconds
- Motion
- human event-to-digital timing result
- Energy losses
- button bounce, display delay, false starts, timer resolution
Why this works
Elapsed-time measurement
The program stores the cue time, waits for a new button edge, and subtracts timestamps. A random pre-cue delay prevents anticipation from replacing reaction.
Look for: Compare the distribution of five trials rather than treating one fastest press as the whole result.
Where the energy goes
Efficiency and losses
The ideal model leaves out button bounce, display delay, false starts, timer resolution. These effects turn some input energy into heat, sound, vibration, or unwanted motion, so measured performance will be lower than an ideal calculation.
Look for: Run the build slowly and locate the first place where button bounce becomes visible or audible.
Math bite
Calculate average reaction time
Formula: average = sum of valid times / trial count
- Times = 245, 260, 238, 275, 250 ms
- Trial count = 5
Substitute: average = 1268 / 5 = 253.6 ms
Result: Average reaction time is about 254 milliseconds.
The best single trial does not represent consistency.
Button and software timing add small delays.reaction_timer.ino
A complete serial reaction timer with false-start handling and five-trial average.
const int ledPin=9, buttonPin=2; long total=0; int validTrials=0;
bool pressed(){ return digitalRead(buttonPin)==LOW; }
void waitRelease(){ while(pressed()) delay(5); delay(30); }
void setup(){ pinMode(ledPin,OUTPUT); pinMode(buttonPin,INPUT_PULLUP); Serial.begin(9600); randomSeed(analogRead(A5)); }
void loop(){
if(validTrials>=5){ Serial.print("Average ms: "); Serial.println(total/5.0); while(true){} }
Serial.println("Ready"); waitRelease(); unsigned long waitTime=random(2000,5001), start=millis();
while(millis()-start<waitTime){ if(pressed()){ Serial.println("False start"); waitRelease(); return; } }
digitalWrite(ledPin,HIGH); unsigned long cue=millis();
while(!pressed()){} unsigned long reaction=millis()-cue; digitalWrite(ledPin,LOW);
Serial.println(reaction); total+=reaction; validTrials++; waitRelease(); delay(800);
}
Make it behave
Test, troubleshoot, and tune
Controlled test
Start here: Confirm false-start detection before collecting valid data.
Success looks like: Five valid trials are timed and early presses are rejected.
Measure: Reaction time, false starts, average, best, and range.
Change: cue type or hand used
Keep constant: same participant, button, delay range, posture, code, and room
- dominant hand
- non-dominant hand
- audio cue if available
| Symptom | Likely cause | Confirm it | Fix |
|---|---|---|---|
| Times read zero | A held button is accepted as a new press | Log button edges | Require release before cue |
| Every trial is a false start | Input polarity or pull-up logic is wrong | Print raw state without game code | Invert logic or rewire |
| Results vary impossibly | Button bounce creates extra edges | Watch serial timestamps | Add edge debounce |
| The delay repeats | Random seed is constant | Compare sequences after reset | Seed from an unused analog input or entropy source |
Choose your tradeoff
Make the cue and input logic reliable before comparing people or conditions. More smoothing can reject bounce but adds measurement delay.
Keep experimenting
Try another version
Three trials
Show each time with no average.
Consistency score
Calculate range or standard deviation.
Two-choice reaction
Use two cues and two buttons, scoring both speed and correctness.
Build together
Classroom and access options
Classroom version
Teams can compare cue type or hand used while keeping same participant, button, delay range, posture, code, and room. Assign builder, tester, recorder, and explainer roles; have each team predict the result before collecting three trials.
Access adaptations
- Color-code and label every wire at both ends.
- Use clip leads, larger controls, and pre-crimped connectors when fine motor work is difficult.
- Offer an audio buzzer cue or large external switch and compare within the same cue type only.
Reflect on the design
- How did cue type or hand used change the measured result?
- Where did button bounce affect the build most strongly?
- What evidence shows that elapsed-time measurement explains the motion?
- Which change would improve measured reaction time in milliseconds without creating a new problem?
Glossary
- Elapsed-time measurement
- The program stores the cue time, waits for a new button edge, and subtracts timestamps.
- Input
- The action or energy supplied to a system; here it is button press after a light cue.
- Output
- The useful response produced by a system; here it is measured reaction time in milliseconds.
- Efficiency
- The fraction of input energy that becomes useful output instead of friction, sound, heat, or unwanted motion.
Build your dreams
One build can start the next.
Share what you learned, change one variable, and help another builder understand what worked.
Explore more guidesSources and build notes
A platform-agnostic low-voltage robotics or electronics project with original assembly guidance.
- Low-voltage design review: Battery voltage, polarity, component roles, current paths, and motor or LED protection were editorially checked.
Written and edited by BrickLabClips. Published 2026-07-22; updated 2026-07-22.

