Introduction: 2 Players Competition / Quiz Buzzer Box System Using Arduino
A bit of background.
My brother came to me with an odd box that a friend of his asked someone to make so that they can determine the fastest contestant to push a button. The box consisted of some LEDs, two buttons, and two sets of bicycle bells that made some weird noises. It did light up and make noises, but it did not actually serve the purpose it is made for, which is to actually determine the first competitor to push the button.
I told him that I can help, and I searched for an instructable or a tutorial to make something of the sort using arduino, however, not knowing the exact name of what I'm searching for didn't help much, so I set on making one combining whatever it is that I know about arduino which is not much.
Once I finished the project, I found out that it is called a quiz buzzer system (I was searching for a competitors button box), and that there are some cool samples in instructables that could have saved me a lot of time, but I managed to make something, and I would like to share it with everyone, so here it goes.
Step 1: Prototype Components
As a proof of concept, I had to prototype the whole thing. I used the following items:
- Arduino nano clone
- 4 LED lights (it helps if they are of different colors. I used white, green, yellow, and blue)
- Jumper wires
- 2 push buttons
- 2x 5K resistors
- a breadboard
Step 2: The Actual Box Components
So I am not interested in jailing the nano in a plastic box for eternity. I will make an arduino on breadboard to do the job, and for this, the components are as follows:
For the circuit I used:
- PCB (I use a 5x10 cm pcb)
- 1x ATMega 328P-PU
- 6 green LEDs
- 1 red LEDs
- 5 blue LEDs
- 1x 16MHz crystal
- 2x10 uF capacitors
- 2x 5K resistors
- 10 meters of 2 core telephone wire
- 2x quick release switches
- 1 female micro USB connector
- 1 on/off switch
The tools I need are a soldering iron, solder, and access to a CNC machine.
Step 3: Sketch Logic
To be able to make sense of the loops and actions that will take place. I drew it on paper, but I think this is a clearer view of the way I envision the whole thing to work.
Step 4: Making the Prototype
I used the components I had to wire the prototype. it goes this way:
Place the arduino on the breadboard
Place the push buttons
Connect the resistors to ground and one leg of each button
Connect the other push button leg to +ve (I will use 3V3)
Connect the arduino 3V3 pin to the +ve rail of the breadboard and the GND pin to the GND rail of the breadboard
Now you need to figure out the pins you will use. In my code I used the following pins:
First player LED: 8
Second player LED: 9
Green LED: 10
White LED: 11
First player button: 12
Second player button: 13
Connect each LED to the pin and ground
For the buttons, connect PIN 12 to the leg opposite of the resistor for player 1 button, and PIN 13 to the leg opposite of the resistor for player 2 button
The fritzing sketch should show the whole thing very clearly.
Step 5: The Code
So the diagram in step 2 will give you an idea of how the whole thing works. The code required to make it happen is rather simple, and I have attached it here for you.
One thing to note. The white LED is actually red in the code.
Upload the code to your arduino, and move to the next step
Step 6: Testing the Prototype
With the code uploaded, power your arduino up and do some testing. My testing is in the video here.
Step 7: Making the Actual Circuit
If you wanted to only do this for fun, the prototype should work just fine. If you want to turn your design into something useful that serve the purpose it was created for, then read on!
Arduinos are not easy to come by where I stay, they are not cheap so the way I get them is buying them from AliExpress. I get a good deal buying them this way. I got the nano I used for example for 3 dollars, If I buy them here, I need to pay 30 dollars a pop. Having said that, it is better to use an ATMega 328P-PU and make a complete circuit than to encase the Nano in a box since I can use it for something else.
The circuit is simple, you will just need patience, and a good soldering iron. What I am making is an Arduino on breadboard. The ship pin mapping is available online and there are so many tutorials on how to make this like this one from the arduino website.
I have added an LED salvaged from a toy as a power indicator, and another LED is connected to pin 13. The buzzer is connected to pin 5, and I have extended some wires to be connected to the LEDs and the bell switches that will be connected to the finished system.
The LEDs are of 2 colors, blue and green, I soldered 7 of each color in series using the CNC machined box as a template, these will sit below a transparent acrylic sheet sandwiched between two dark acrylic sheets with opening indicating the team name.
Wiring was a mess, especially wiring the bell switches, but it came out great with some testing everytime a solder joint is made. The wires were long so I had to tape everything together to make sure installation in the box won't be difficult.
Step 8: Making the Box
You can actually make a box out of any material you want. The box I have is cut from 3 mm acrylic sheets and is put together using Chloroform. To show the LEDs there is a layer of transparent acrylic sandwiched between two layers of brown acrylic.
There is a box below that is used to store all the wiring and the power bank used to power the project, in addition to a small door to access the power bank.
The Arabic text reads First team and Second Team, right to left.
There was a flaw in the first design we cut where the LEDs lit up the names of both teams. The top was changed to two separate pieces and the issue was solved.
Step 9: Putting It All Together
So finally we are here to make something out of this buzzer system. This is where all the time spent wiring and soldering pays off. If you have noticed, the buzzer system in the prototype did not have a buzzer. I have salvaged one out of an old PC and connected it to the circuit in step 7.
I used hot glue to make sure that excess cables and the circuit won't move, and to use as insulation for some LEDs. I have also added an on/off switch to the whole system.
The code for the buzzer system with a buzzer is attached here.
I have also used large switches so that the children can easily push the buttons. The entire circuit is powered using a power bank. Any power bank will do, it can also be powered with any USB mobile charger.
Step 10: And We Are Done!
After all the wiring and coding and CNC milling, the box is finished. The power bank gave it the advantage of making the whole thing portable. allowing the teacher that will use this to move it from class to class with ease. It works fine and serves it purpose well, and I think there are many more things that can be done with this project to make it even better. Perhaps using 240v LED strips with relays on a podium and a stand to make the contestant glow, and even adding a control box for the presenter to add points and reset the system without the need for a delay.
Thank you very much for reading my instructable. It may not be the best implementation of the system, I'm very sure that there are some better ways to get this done, but since I have made this from the scratch, I thought it would be good to share it so that if someone who is looking to make a buzzer system and not knowing what it is called can have a place to start.
And please consider voting for this entry in the microcontrollers contest!
We have a be nice policy.
Please be positive and constructive.