Step 5: Dissecting the Brains
Like I mentioned earlier the Quiz-O-Tron 3000 brains are implemented with an Arduino shield and an Arduino Uno microcontroller development platform. The shield contains the interface and control circuitry that connects to the four big button boxes and the Arduino Uno contains the software and input/output pins to make everything work. The brain’s shield is broken down into two main parts: the button switch input circuitry and the LED power control circuitry. Here’s a breakdown of what each main part of the brain’s Arduino shield does.
The switch input circuitry (one for each button) consists of a single resistor that connects one of the Arduino input pins to +5 volts. Then the same input pin is connected to ground via the Easy Button switch which is normally open. The Arduino software reads the voltage state of this input pin which is HIGH (+5V) until the button is pressed and then the state changes to LOW (ground/0V). This is how the Arduino program knows that a button is pressed and can then perform the programmed response to that event.
Once the Arduino senses that a button has been pressed we want to take the following actions: 1) light the winner’s LED on the master control console while flashing the LEDs on the triggering button’s box, 2) lock the other buttons out for 5 seconds before resetting for the next question.
Since we have a circuit that flashes the LEDs in the button’s box, all we need to do is send power to the LED circuit board in order to activate the lights. This is done with the power control circuitry (one per button) which is under the control of one of the Arduino’s output pins. The Arduino software controls the state of the output pin, whether it is HIGH (+5V) or LOW (0V). The Arduino output pin is connected to a transistor via a resistor.
In this configuration, the transistor becomes an electronic switch that controls the flow of power from the shield to the LEDs. When the Arduino software changes the state of the output pin to HIGH the transistor allows power to flow to one of the LEDs on the MCC and to the LED board in the associated big button box. The transistor does this by completing the power circuit’s connection to ground. The positive DC voltage for the LED power control circuit comes from the “Vin” pin of the Arduino. If we power the QT3K with 9 volts DC via the Arduino’s power connector we get the ideal voltage sent to our flashing LED circuit. The software then waits five seconds before changing the output pin’s state to LOW thus turning the transistor off and killing power to the LEDs.
We use transistors to control power to external devices because the Arduino output pins are limited to 5 volts at a maximum of 40 milliamps. The transistors allow us to control devices that require higher voltages and that draw higher currents. The transistors used in this project can handle up to 600 milliamps each. This allows for much more variety in the kinds of devices we can control with Arduino.
The first image shows the schematic diagram of the button input and LED power control circuitry that is implemented on the Arduino shield. This circuitry is repeated for each button with each one being connected to a different set of Arduino input and output pins.
The Quiz-O-Tron 3000 master control console includes the ability to report which button was pressed. This is done with the 4 LEDs mounted on the master control console. These LEDs are powered by the same circuit that is powering the blinking LED board in the big button box. You can see these LEDs in the second photo which shows the completed master control console.
The LEDs are arranged in the same pattern as the DB-9 connectors on the top of the console which is where the connection is made to the big button boxes. The red button next to the LEDs is used to reset the Arduino. It is connected to the “reset switch” area of the Adafruit Proto Shield. This comes in handy if you want to quickly clear the LEDs from flashing and prepare the buttons for the next question.
The case for the master control console needed to house the Arduino, shield, DB-9 connectors, LEDs and reset switch. I used a project case made of ABS plastic with a removable aluminum panel. I drew a template for the top of the case with the layout of the DB-9 connectors, the LEDs and the reset button. I checked the template for fit and made sure that the Arduino and shield would clear the DB-9 connectors when mounted on the removable panel. Once I was sure of my template I used see-through masking tape to completely cover and secure the paper template to the top of the case. I then used this as a guide for my Dremel rotary tool as I prepared the case for the hardware to be mounted there.
The Dremel tool made quick work of the case with a drill bit and a cutting bit. I then used a cutting wheel to cut the squared notches on the back side of the case which exposes the Arduino USB port and external power connector. Each was cut from the open side of the case (once the aluminum panel was removed) by making two parallel cuts up from the opening. I made the space separating the two cuts the width of each associated jack. I then scored a line between the two cuts at the appropriate “top” of each opening I was creating. Pliers were used to break off the two bits of plastic at the score lines to create the holes that would expose those connectors. Then a hand file was used to square and neaten each opening.
I also used the Dremel rotary tool to drill four mounting holes in the aluminum panel to hold the Arduino and shield securely in place. The third photo shows the bottom of the master control console where you can see the position of the Arduino mounting hardware. The forth photo gives you a peek inside the MCC. And the fifth show the Arduino mounted to the project box aluminum panel.