Introduction: Reaction Time Tester

Picture of Reaction Time Tester
A month ago I knew nothing about Arduino and first project!
Looking back, this project combines allmost all of the tutorials that I have read in this short period: blinking LED, push button, piezo and LCD display. A useful project for every beginner!

I have made this device for some of my friends who have a hard time admitting how fast alcohol influences their driving abilities.
It will test you on three levels because they all have to do with driving a car safely:
  • DECISION time. 
  • REACTION time
  • Resistance to DISTRACTION.
The test starts as soon as you hold down the push button. When a red light appears, you should let go off the push button as soon as possible. Your reaction time will appear on the screen.
However, driving has to do with making fast decisions as well. So in random order you can get a green or blue light first (or multiples). You should not react to this and hold down the push button until the red light appears.
Finally, on occasions you will hear a short beep in between lights (just for fun). By now you are so tense to do well, that a simple distraction like a beep can and WILL set you off!! 

A fun game with your dinner guests upon arrival and confronting upon leaving!

Step 1: What You Need

Picture of What You Need
  1. Arduino microcontroller (I have used an Uno).
  2. 1 RGB LED (you can use 3 separate ones if you like).
  3. 4 resistors (220 ohm).
  4. LCD Display
  5. Piezo speaker
  6. Breadboard.
  7. Push button.
  8. Wires.
  9. Ping pong ball (optional).
  10. Box.

Step 2: The Hardware.

Picture of The Hardware.

For the experienced Arduino user this total view makes immediate sense. However, if you're a beginner just like me, a breakdown in steps can be useful.

Drawings were made with software by "Fritzing" (

I have used a RGB Led with a common Anode (3 Cathodes: R, G, B). Therefore the setup may seem a bit ackward. The consequence is that in the sketch (step 3): HIGH=off and LOW=on.

Step 3: The Sketch.

As bescribed in the Intro, different lights might appear in random order prior to the red light.
To make the test even more unpredictable, I have added two other features:
  1. The duration of a light is random (within some limits).
  2. The pause between lights is random as well (within some limits).
This is to avoid that people get a feel of the "rhythm" of the test. Making it predictable.
You can make the test harder by increasing these intervals. The sketch is in the TEXT file below.

Step 4: The Box.

Picture of The Box.

This is quite straight forward and I never intended to copy the Instructables Robot, but once I was started, I saw some similarities...

Picture 1: Drill the pattern in the bottom of the box (to hold the Arduino in place). Hole size 3 mm.

Picture 2: Drill and cut two holes in the side for the USB connection and power supply (if you do not need to program the controller anymore and you have chosen to use batteries, you don't need this step. The Arduino is kept in place with small bolts (remove it prior to painting!).

Picture 3: Cut a slot in the lit of the box for the LCD. Drill another two holes, one for the LED (ping pong ball) and another one for the push button. Make sure that the hole for the ping pong ball has a sloping face.

Picture 4: Take two caps of a Coke bottle and cut the top section of the bottle as well. Glue the bottle top sections to the side of the box (make sure you have a nice and flat face for the glue).
Sand the box with a fine sand paper.

Picture 5: Apply several layers of paint (without the Coke caps).

Picture 6, 7, 8: install the Arduino. I have used a small breadboard for the components (Piezo and Pot. meter of the LCD). The LED was solderd seperately. Since the Arduino is tightly bolted into place, foam blocks can be installed against it and thus providing a tight fit for the LCD.
I didn't have red, blue and black wires so I used purple, green and grey:

Purple: +
Green: pin
Grey: Gnd 


FancyFish made it! (author)2016-10-07

Fantastic Instructable! Thank you so much, I had fun building this.

I made a few modifications to the hardware (and code as a result), to fit what I had. Its using a LCD which already had an I2C attached and its also using a RGB LED module so I can display a larger selection random colors.

I changed the code to display a countdown before starting, not show red on the first light and to also play a selection of music before the start button is pressed - just because :)

bertus52x11 (author)FancyFish2016-10-09

Nice one! I'm happy that you made one.

I'll send you a patch...just because ;)

CamiCy (author)2016-02-27

Hello. I'm making a reaction timer for my biology project, and the design is inspired by your project. I want to be able to time and compare the reaction time between an LED and a sound. I was wondering if you could give me some tips on how to do that because I have never worked with kind of thing before. Thanks

bertus52x11 (author)CamiCy2016-02-27

I'm not sure if I understand your question. The reason why there are different lights and beeps is to "throw you off" so you need to watch and listen carefully before releasing the button. Measuring the time between a LED an beep has nothing to do with your reaction time.

CamiCy (author)bertus52x112016-02-27

Sorry for the confusion. I know that the sound in your project was used to through people off, but i was wondering if there was a way in which I can program it to make sound and change color at different times in order to log the reaction time to those two variables separately. So, I can test whether or not people react faster to a visual or a sound.
If you don't get what im asking its alright. Like i said I'm new at this stuff, but thank you for replying. I appreciate it.

bertus52x11 (author)CamiCy2016-03-01

yes you can, but it requires some slight adaption to the program. In fact you could make two programs and load either one of them into the Arduino without telling the participant. You'll need to register the reaction times depending on the program you use.

CamiCy (author)CamiCy2016-02-27

*"throw people off"

cliptwings (author)2016-01-26

Really liked this instructable. I was looking for a reaction tester that I could use for a geocache puzzle and this one fit the bill. I modified the code so once a finder logged a reaction time less than 400 milliseconds, a servo opens a compartment to reveal the treasure and log inside. Works great!

bertus52x11 (author)cliptwings2016-01-27

Thanks and what a nice idea about locking!
Post an Instructable about it and I'll send you a patch. (help me remind though).

geocacher2 made it! (author)2014-05-18

I modified the program to launch a display when the reaction time is less than 200. I loved the instructable. It was easy to follow and understand. I'll add a couple pictures of my final project (outside pics). The inside is a boarduino, and a tiny piezo speaker. I also added a 6 AA battery tray on the bottom, that is accessable on the outside.

PS - I love the ping pong ball diffuser !

jhon153 (author)geocacher22015-11-17

you have programming?

bertus52x11 (author)2014-05-19

Nice one! I have just sent you a patch!

geocacher2 (author)2014-05-18

Any updates on the programming? I seem to get into a long loop during a blue or green light press. It sometimes just goes blank, instead of displaying the 'too early'.

bertus52x11 (author)geocacher22014-05-18

are you sure you've got the coding right? I have never encountered this problem.

freeza36 (author)2013-04-09

Awesome man! My grandpa made on of these when I was 6 or 7 and I would play with it for hours.

nirzayorza (author)2013-03-13

hello. im interested in your project. do you have the schematic diagram for this? thanks in advance.

bertus52x11 (author)nirzayorza2013-03-14

Step 2 shows several diagrams on how to connect the circuit.

robot1398 (author)2011-10-12

whats the unit in which it displays the reaction time?

bertus52x11 (author)robot13982011-10-12

milliseconds (1/1000th sec).

robot1398 (author)bertus52x112011-10-12

ohk! thanks

ben_cullen_1809 (author)2011-10-03

hiya pal!! really like the look of this as my uni project! if possible do you have a schematic diagram available??

just click on the icons below the picture.

freethetech (author)2011-07-14

Hi there. This project looks like an amazing beginning to my work with Arduino (it came in on Monday via mail, and I just bought the USB A to B cable today). There is only one problem - I cannot obtain an LCD Display for some time because all of my local stores are out of stock. Any possible substitutions?

One of my ideas would be to rewrite the code (I know the basics of the code) to round everything to the nearest thousandth (reaction time), and then have it go to a corresponding LED.

bertus52x11 (author)freethetech2011-07-26

Sorry for the late reply (holidays). have you tried getting a Display through internet. Shouldn't be too difficult.
You suggestion of rounding off will work. However, you need to really think about how to use the LED, maybe in patterns or even Roman numbers. Otherwise you'll need lots of them!

sbertin (author)2011-05-30

what kind of difficulty is this? i haven't done circuitry before

bertus52x11 (author)sbertin2011-05-31

I'm far from an electrical engineer and I have done this as my first Arduino project. It's not too difficult. The nice thing about Arduino is that you don't need to know much about circuitry because al the switches or conditional steps are programmed (instead of using transmitters, capacitors....the whole lot).
If you can tell + from - and you can (learn to) program, there is no limit.

francisroan (author)2011-03-31

instead of the lcd i updated the code and added Serial.begin and now i can see the time in the serial monitor!!!!!

bertus52x11 (author)francisroan2011-03-31

Yes, that's very well possible!

francisroan (author)2011-03-31

is that serial lcd?

joedibiase (author)2011-03-20

This looks like a fun project. I'm new to this kind of thing and am a bit confused about the LED. The LED only has 4 posts (1 anode and 3 cathodes), but in the step-by-step instructional pictures, it looks like there are more posts seated in the breadboard. Would you be so kind as to clarify?

Thanks much!

bertus52x11 (author)joedibiase2011-03-21
Yes, it's fun and it can be confusing (partially my fault). This is what happened:

There are different types of LEDs and I mixed them along the way. I hoped nowbody would notice the inconsistency, but you did!
In the picture of step 2 (with the breadboard), I used a RGB Led with 6 pins:
  • 2 common grounds (you should interconnect them)
  • 1 Red Pin (+5V)
  • 1 Green Pin (+5V)
  • 2 Blue Pin (+5V) you should interconnect these.

You can magnify the picture by clicking on the “i” in the left corner and you’ll see.

Later on I obtained a different LED with 4 pins (instead of 6) and to my own surprise, the system was reversed as well:

  • 1 common Anode (+5V)
  • 1 Green Pin
  • 1 Red pin
  • 1 Blue pin

This is the Led I have used in the reaction Time Tester. Now I went back to step 2 and changed the schemes (Fritzing) accordingly to this new LED. You can see a picture of this Led in step 4 (7th picture).

Hope this helps, if not just let me know.

joedibiase (author)bertus52x112011-03-24

Thanks for the explanation! We're almost there, but are having a problem with the LED. We've got everything hooked up, but the LED doesn't come on. Here's what's going on ...

- The display says "Hold button to start"
- We press the button and the display goes blank 
-When we release the button, one of two things happens:
     (1) A reaction time is displayed on the display, or,
     (2) There is a beep and the display reads, "Released too soon"

At no time does the LED blink or come on at all.

You can see the picture I uploaded. I checked current with a multi-meter and got these results. On the picture, the lead connecting to Arduino 8 has current as soon as you press the button, and then periodically has current as long as the button is held. The lead connecting to Arduino 6 has current continually. The lead to Arduino 7 has current as soon as the button is pressed, and then has current periodically while the button is held.

As I mentioned, I'm new at this, so am a little baffled. Any help will be much appreciated. Thanks!

bertus52x11 (author)joedibiase2011-03-24

Just a quick one (I'll look into it in more detail this weekend).
How many pins does your push button have? (some types block current when the're pushed, others allow current to flow when pushed). Have you checked this with a multi-meter?

joedibiase (author)bertus52x112011-03-24

Thanks so much again. I picked up some different LEDs and they work! Must have been something kludgey with the original LEDs.

This works great ... please know that you've made my daughter's 6th grade science fair project very cool!

bertus52x11 (author)joedibiase2011-03-28

Good to hear you solved the problem.
Just one question: if it's the science fair of your daughter, how come Dad is doing all the work? ;-)

joedibiase (author)bertus52x112011-03-28

Haha! It might seem like Dad is doing all the work, but my daughter did much more than it would appear. She learned a lot about circuits, the Arduino, soldering, and then, how to test a sample of people (how does talking on a cell phone affect reaction time?), then analyzing the results and drawing a conclusion.

We really appreciate your instructable and your following up on our questions!

bertus52x11 (author)joedibiase2011-03-28

Glad I could help. Actually the cell phone test is a very nice one I didn't think of. Some people over here think that driving and phoning do no influence eachother (you just end up doing both things bad!).

From my own experience, I now that the flu has a great impact too.

joedibiase (author)bertus52x112011-03-24

The button has 4 pins. When we press the button it blocks current.

Thanks for your help ... it's very nice of you. We're getting nervous about my daughter's science project, so your help is really appreciated.

duboisvb (author)2011-03-23

Hello again,
I was looking thru old comments and noticed that you said you would send a patch if I made this and published it and reminded you. . Which I did and was wondering if the offer is still good. :)


bertus52x11 (author)duboisvb2011-03-23


duboisvb (author)2011-03-10

Hey, I just published an Instructable based on this and I hope I gave you the correct credit . Please advice if I should have done something more . I am new at this. Thanks again.

bertus52x11 (author)duboisvb2011-03-10

No need to worry...
And it looks great!

duboisvb (author)2011-03-10

Hey again, here is my project

LucasOchoa (author)2011-02-03

just wondering did you get this idea from any kits of any sort and btw are you using parallax or adurnio

bertus52x11 (author)LucasOchoa2011-02-03

No not really, although it's not the first and not the last reaction time tester in the world.
It started quite simple with 1 red Led. Then replaced it with a RGB Led and finally added some sound as well.
It corresponds actually quite well with the tutorials I have been reading while learning Arduino (see Intro).

LucasOchoa (author)bertus52x112011-02-22

yeh bro any ways really nice instructable

janw (author)2011-02-18

Very nice project! I like the casing.

bertus52x11 (author)janw2011-02-18

Thanks and congrats to you for reaching the finals!

GaryMeow (author)2011-02-06

awesome project :)

singhtarandeep15 (author)2011-02-04

What is its use in daily life(practical use)?

About This Instructable




More by bertus52x11:Stone Ski HelmetThe Selfie Ring a.k.a. the Phone RingWashing Machine Door Salad Bowl.
Add instructable to: