Monday, January 20, 2014

Personal Experience: Making a game-show buzzer controller

To kick off the new year, I teamed up with Aaron (he has a blog!) to put together a game show buzzer system for a project he's working on. We followed the directions from an Instructables guide, which were pretty straightforward. You'll want to read that all the way through if you want to follow in detail what we did; I'm going to talk about the highlights and gotchas we discovered, but not do a blow-by-blow replay of the Insructable itself.

Putting it together

This should have us covered

The kit we used (as suggested by the Instructable) included an Arduino UNO and the Learning Resources Lights and Sounds Buzzers. Aaron picked out a spacious project case (this proved to be a good move, as we ended up putting quite a few parts into that case. We started popping buzzers open and got to work following the modification guide.

The Buzzers

 Overall, these weren't too challenging to modify; I appreciate the designers leaving plenty of spare room in there for fingers, wires, and new components. One thing to be cautious about: the tape across the metal button plate is actually what secures the plate in place; as you solder to the contact pad under the button plate, don't take all the tape off or you'll have to chase the button around the table.

This was the first time I ever needed to kill a circuit board trace with an X-Acto knife; that was pretty fun!

Soldering and component connection were pretty straightforward. We checked with a multimeter as we went to verify all the connections were holding.

Modified button. Not my best soldering work; I utterly melted the insulation on the wire leading to the reed relay.
Aaron was kind enough to attack basically all of the drilling work, which I appreciated greatly. These are made of pretty solid plastic, so you have to work them a bit with the drill to make room for the audio jack. We were also reminded of the importance of stable work surfaces and securing your work before drilling.

Safety first, kids.

The Project Box

I'm glad Aaron chose a box this spacious; it gave us a lot of options.

One unfortunate quirk of this box was that the outer lip of the box is at a different height from the inner contents, which was inconvenient for mounting the audio jacks. Aaron was able to find a wooden shim to make up the height difference.
Jacks in place on their shim
Jacks mounted and ready. Quality!
For the project box, we deviated from the Instructable's recommendations on mounting the power supply. Since the USB jack doubles as a power input, we decided to leave the regular UNO power jack obscured by the project box and instead mount the battery brick internally, running its leads directly to the UNO's Vin and GND ports. I think it got us a better, more compact product, but it did introduce the issue of needing to mount a power switch to kill the battery line when the project wasn't in use. Fortunately, my Pop-Pop gifted me with a two-pole throw switch decades ago that has been looking for a home!
Battery brick mounted in-case alongside the UNO, with wires leading to the two-pole switch on the top case.

Control Code

The Instructable came with an example program that we could use, but we went ahead and wrote a new one from scratch (I'll provide a link when I can make time to upload it to Github). It's a bit shorter than the original and more dedicated to our purpose (simple first-buzz-in-wins indicator). We added a tie-breaker for more than one person buzzing in on the exact same scanning loop also; a winner is randomly chosen from those who buzzed in when that happens. The random number generator is seeded by reading one of the floating analog input pins; that's a nifty trick that I'll have to remember in the future.

Worth noting is that each button makes a different (slightly obnoxious) sound. We found a workaround to disable the sound that doesn't require cutting more wires in the buttons. The basic flow of information in the button ↔ control box circuit is this:
  1. Button depressed, which signals the control box
  2. Control box closes the circuit back to the button, which tells the button's onboard circuitry to activate lights and sound
  3. As long as the circuit back to the button is closed, the solenoid that enables or cuts the button's speaker is also closed.
Since the button's onboard circuitry has its own electronic latching logic, one only needs to close the circuit to the button long enough to trigger that latch. We found a 20 millisecond pulse to be enough to trigger the button's light without letting the sound play (any sound that might leak out in that brief period gets drowned out by the sound of the button physically clicking). 

Future Development Opportunities

Here are some things we considered doing and might do in the future, but haven't tried yet.

Speaker in the control box

Though we disabled the audio on the buttons, it'd be nice to get some sound when they're toggled. A speaker embedded in the control box itself could do the trick; there are some helpful posts floating around out there about wiring a speaker to an Arduino.

Direct LED control

Traces to intercept for LED control

Looking at the circuit board for the LEDs, there are six clear traces between the control circuit and the LEDs. Cutting those and rerouting them to the input from the controller could allow us to bypass the button's internal circuitry for controlling when these buttons are lit, allowing us to light the button for longer or shorter periods and light the button without an input press. Combined with a speaker in the control box, the system could double as multiplayer SIMON.

We did one last test once we had the whole thing put together (thanks to Amanda and Mel for joining us for a short round of quiz game!).