This build uses Synapse radio modules (2.4 GHz) for wireless communication; one in each Quiz Box and one connected to a PC via USB (for viewing/scoring). The PC program is written in Java, so could be run on any operating system, although, the serial USB connection is OS specific and I have only implemented it on Windows.
The build requires beginner to intermediate soldering skills. Also, you will have to send the electrical schematic files (that I have created) to a printed circuit board (PCB) manufacturer to be manufactured. In addition, you will need to be able to perform some drilling in the plastic quiz box. Also, if you want to add the acrylic LED shields, you will have to use a heat gun to bend them into shape.
The Bill Of Materials is attached below, and can also be found at: http://code.google.com/p/quiz-box (along with source code and other documents). You will need to download the BOM to get a list of the parts you will need, along with the suppliers.
Step 1: Soldering the PCB
On the download page in the google code site, I have placed a file, qb_docs_v2.zip. In that file there is another zip file containing the gerber files that a PCB manufacturer would need. You could use this, but it would be better if you learned how to generate your own, that way you could check it, add the order number, etc.
Once you have a PCB, you will find that it will require some soldering. There are two ribbon cable headers, two radio module headers and 4 resistors to solder in place. The resistor values are not very critical, I chose them to make a nice balance in the brightness of the LEDs, I might try to tweak them in the future to be a bit brighter and use more common resister values. UPDATE: I've since tweaked the resistors, now they are: 470, 220, 100, 1K ohm for RYGB respectively (originally they were 610,270,100,100; then 510,270,180,820).
The radio module headers are the trickiest. They require care, because if done incorrectly, solder will wick up into the sockets and prevent the radio from being plugged in. If this happens, the best thing to do is to pull the plastic header part of with pliers, de-solder the pins, and try again with a new header. I've found that the best way to avoid this is to tape some masking tape over the open end of the header (see picture). Make sure that it goes as far back against the pins as possible, and use a small flat head screwdriver or similar tool to press the tape on. Then, put the header in the PCB and solder in place. Use a temperature controlled soldering iron and make sure that it is set at a low temperature (around 325 C works well for me). Try to apply the minimum amount of solder in order to get a good solder joint. Test fit the radio when done.
Update: I've found a better way to solder the radio headers. Just put the masking tape over the holes in the PCB, then poke holes in the tape with a pin (it may help to hold up to a light to see through the tape). Then score the tape along the holes with a knife. Finally, push the header into place, through the pin holes. After soldering, just pull the tape out from either end (it should break where it was scored).
The ribbon cable headers and resistors are easy in comparison. Just make sure the cable headers are straight. Bend the resistor wires as needed to fit them in.
Step 2: Solder the Button Wiring Harness
Finally, crimp the 6 pin connector onto the ribbon. This is best done with a vice, with smooth jaws, or something smooth over the jaws, so that the connector does not get chewed up. The vice will allow you to get the connector on parallel and positioned correctly. Press the two halves of the connector over the cable carefully and slowly, until they are just touching and they snap into place. Put the connector on so that the cable goes out over the end of the PCB with the red and brown wire on the red pin as labeled in the PCB.
Step 3: Solder the LED Wiring Harness
Red LED: (+) = Red wire, (-) = Brown wire
Yellow LED: (+) = Yellow wire, (-) = Orange wire
Green LED: (+) = Blue wire, (-) = Green wire
Blue LED: (+) = Gray wire, (-) = Purple wire
Red Battery: BLACK wire
Black Battery: WHITE wire
Note: I find the best way to solder these is to cut/pull the individual wires apart from the ribbon cable an inch or so, and separate pairs of wires down 2 or 3 inches (see picture). Next, put some heat shrink tubing over each wire (and put a larger heat shrink tube over the pair of wires), strip the wire, wrap the wire around the LED wire, solder it, cut off the excess, move the tube over the joint, heat shrink, and finally heat-shrink the pair of wires.
Finally, crimp the 10-pin connector onto the ribbon. This is best done with a vice, with smooth jaws, or something smooth over the jaws, so that the connector does not get chewed up. The vice will allow you to get the connector on parallel and positioned correctly. Press the two halves of the connector over the cable carefully and slowly, until they are just touching and they snap into place. Put the connector on so that the cable goes out over the end of the PCB with the red and brown wire on the red pin as labeled in the PCB.
Step 4: Drill Button and LED Holes in Box
For the battery access hole, place the template on the outside of the bottom of the box and mark. Remove the template and drill a 3/8" hole with a twist drill.
Step 5: Assemble the Box
Congrats, you should now have a working QuizBox! (Well, it still needs to be programmed). If you have a fresh from the factory (default) RF266 installed in it, you should see the yellow LED light up, and nothing else. The buttons will not respond, yet. Skip ahead to step 7 to program a more useful box, or continue on with the next step to first create a light "visor" for your box (this next step is optional).
Step 6: Create the LED "visor"
I created a "visor" for the box, to hide the status LEDs from other teams. You could cut the pattern out of clear, 2mm acrylic yourself, or you can get it precision laser cut at Ponoko: http://www.ponoko.com/design-your-own/products/quizbox-eyeshade-x25-8721
Once you have the acrylic cut, you will need to bend it to shape. Each of the two ends will need to be bent twice, to form a long angled piece with flat tabs on the end (see pictures). I used a hot air gun and a thin piece of wood with a notch cut in it to direct the hot air along the line that I wanted to bend (I also added some sheet metal to the notched board, to keep it from burning). Make sure that you get the acrylic plenty hot, it should bend easily (or it will break). If it starts to bubble, it is getting too hot and will burn. Try heating on both sides. After it is hot enough, bend the acrylic along the line around a square piece of wood, with rounded edges, hold it for a few seconds until it cools enough to hold its shape. Take care, the acrylic and the notched wood both get very hot -- you may want to wear leather gloves.
Once the acrylic is bent, place it over the quiz box lid and mark where the screw holes are with a sharpy. You can then drill one hole on each tab, just large enough for the screw shaft to go through (1/8 inch). Finally, print the visor pattern (from the pdf) on some brightly colored paper and cut out with scissors. Bend the paper inside the visor (to block the light!) and screw the assembly to the Quiz Box. You are done!
Step 7: Connect Base and Program Quiz Boxes
Install Portal. Open the script directory in MyDocuments/Portal/SnappyImages.
DownloadQuiz2_install.zip from http://code.google.com/p/quiz-box/downloads/list This zip file contains (among other things) a Snappy directory that contains the "Remote5.py" and "Base5.py" files that you will need to program your RF266 radio modules. You will need to copy these to files into your Documents/Portal/SnappyImages directory on your hard drive.
Start up Portal and plug the USB adapter into your computer. Portal will ask you to connect to a port. You will need to hit cancel, because you do not yet have a port that Portal understands -- Synapse sends the RF266's pre-loaded with a script that isn't very useful and prevents Portal from recognizing the module. You will need to erase the script. From the Portal menu select 'Options' - 'Erase SNAPpy Image..." This will bring up a dialog with some parameters to enter. Enter the com port (if there are more than one com ports in use, you may have to unplug your RF266 USB adapter and watch which com port goes away). Next enter the platform, this will be "RF266". Finally, press "Erase". Wait for a dialog to pop up that says "Please restart your device to start the erase". At this point, you need a jumper wire to connect the reset pin to ground on the RF266 (see picture). The module should be quickly erased by Portal. You do not need to erase any more modules.
Now, you can program a quiz box! Turn one on (with an RF266 in it), you should see (only) a solid yellow light, indicating that it needs to be programmed. In Portal, press the "Watch" button, a new node should show up in the Node View called "AtCommandInterpretor" (see picture). Look for the network address that matches the address printed on the RF266. Select the new node in the Node View and press the refresh button in the Node Info tab. Next, press the Upload SNAPpy Image button and upload the remote.py script. After it uploads, press the Configuration Parameters button and set the Device Name to a short name that makes sense, like "AWANA_01". Also, set the Device Type to "remote". Also, you may want to (maybe not now but later) change the "Network ID" and "Channel" to something other than the default -- note that in order to communicate, both/all modules must have the same network ID and channel.
Now, find the "SNAPpy Modules" listed on the right side of the Node Info tab and find a function called "setBaseNodeAddr(address)" Click on this and you should get a dialog with an "address" text entry box. Enter the six characters of the address (as seen on the Node Views tab) - in quotes. It will look something like: "\x5D\x24\xBD" -- remember to include the quotes, backslashes and x's. Now, find the "setNodeName(name)" and enter a very short name (in quotes) -- something like "A01".
Now check your quiz box, the power light should be blinking blue (the base is not programmed yet -- wait to do this later). And, the red, yellow, and green LED's should turn on in response to pressing the buttons.
You can now program the reset of your quiz boxes, just remember to give each one a unique name -- this will make it easier to identify them later on.
Step 8: Program the Base
Once you have the configuration parameters set, you can upload the base script in the same way that you uploaded the remote script.
In the last step, you already downloaded Quiz2_install.zip from http://code.google.com/p/quiz-box/downloads/list and you copied the "Base5.py" file from the zip into your Documents/Portal/SnappyImages directory. Return to Portal and select the base node in the Node View and press the refresh button in the Node Info tab. Next, press the Upload SNAPpy Image button and upload the base.py script.
Now that you have a base unit and remote quiz boxes, you can use the quizzing software.
Step 9: Run the Java Quizzing Program
Download the files (Quiz2_9.jar (and quiz2_install.zip -- if you haven't already)) and extract to your hard drive. Also, download and read the "README.txt" file; there are some additional files that you will need to download rxtx here and install (make sure that you get 64 bit, if you are on Windows 64 bit). Also, you will need Java 7 JRE (Java Runtime Environment) installed on your computer : download here.
In addition, you will need to open the file "quizzing.properties" in the install directory and change the port (2nd line) to the actual port number of your USB explorer.
Also, you will need to open the file "QuizResults.csv" in the same directory and setup the boxes. The first column contains the box number and box id, for example: "1_0x5D24BE" where "1" is the box number and "5D24BE" is the id (which is the last 6 digits printed on the actual RF266 module. The second column is the team name. You may change this to whatever you like. The next column is the current team score; set this to zero. Next is the place (as in 1st, 2nd, 3rd); set this to zero also. Finally, set the speed count to zero (this is a counter used so that the number of speed questions that a team answers can be limited).
One of the uses of the QuizResults file (in addition to loading teams) is to record the results, which is the purpose of the score and place columns. In addition to reading in the team names on loading, the app also loads the scores, so that a game may be picked-up where it left off.