Certamen Quiz Practice Machine
by arpruss in Circuits > Electronics
5810 Views, 10 Favorites, 0 Comments
Certamen Quiz Practice Machine
The Certamen quiz team competition from the Junior Classical League involves quiz questions on Greek/Roman subjects. Individual contestants press buzzer buttons when they have an answer. The machine keeps track of the order in which buttons were pressed, subject to the team-lockout rule that once a player on a team presses a button, the other presses from that team don't count. The machine we built was for three teams of four players each. Additionally, so that other school groups could use the machine as a standard quiz machine, there is an option to disregard teams and just keep track of button order.
The school Certamen team needed a machine to practice on, but the official machine is $545 for the standalone system (a variant that plugs into a computer is $435), which was budgetarily infeasible. Plus obviously overpriced!
And so I designed a much cheaper one, based on an Arduino Mega. It's not approved for official tournaments, but it's good for practice.
One of the design issues that I kept in mind was that we needed moderately long cables, and had to have signal filtering to avoid false positives due to electrical noise from nearby devices. I ended up using CAT-6 cable, with each button's signals going over one twisted pair. We tested electrical noise with an oscilloscope and an AC-powered electric pencil sharpener running on top of a messy pile of cables and found that 100nF capacitor should be sufficient for filtering.
Parts needed (October 2017 pricing):
- 3 segments of CAT-6 cable, each 26.5 feet long, with a male RJ-45 plug on each (one 70 foot cable, $16 on Amazon, to cut in half, plus a 30 foot cable, $9 on Amazon)
- Arduino 2560 rev.3 or clone with USB cable ($8 on Aliexpress)
- piece of 94mm x 53mm stripboard ($3.29 for pack of three on ebay)
- resistors, one of each: 2.2K, 1K, 100R (if you don't have them on hand, you can buy a 600 piece miscellaneous resistor set on Aliexpress for $2.30)
- 12 capacitors, 100nF, ceramic or monolithic (100 pieces for $0.81 on Aliexpress)
- transistor, 2N3904 (10 pieces for $0.74 on Aliexpress)
- 3 RJ45 sockets (10 pieces for $0.89 on Aliexpress)
- 3 RJ45 breakout boards ($0.55 each on Aliexpress)
- 1602 blue LCD module ($1.75 on Aliexpress); if you use a different color, you may need a different resistor value from the 2.2K that I'm using
- set of 65 breadboard jumper male cables ($1.09 on Aliexpress; or make your own)
- set of 40 male-female 15cm dupont jumpers ($1.39 on Aliexpress)
- toggle switch ($0.43 on Aliexpress) for changing mode
- 13 push buttons, ideally such that each team of four can get the same color, and there is a fourth color for the clear button:
- we used 30mm arcade buttons (20 pieces for $10 on Aliexpress)
- these clicky tactile buttons might have been better, but would require a different button design (I will discuss it in the instructions) (buy three sets of 10 pieces, for a total of $1.20 in Aliexpress)
- 52 sticky silicone feet ($1.14 for 100 pieces on Aliexpress)
- heat shrink tubing assortment (under $2 on Aliexpress)
- 64 screws, #4, 3/8" screws (about $3.50 for 100 at local hardware store; you only need 16 if you go with the alternate hand-held clicker design)
- 24 small cable (zip-style) ties (about $4 at Lowes)
Subtotal: about $68 plus applicable taxes.
And then you need to think about cases for the buttons and the control box. I designed and 3D printed ours, using up about $10 of filament. If you don't have access to a 3D printer, you could print my designs with a commercial service (or maybe for a reasonable fee have me print and ship?), or just use a standard project box--or just a plastic food container--for the main box and an alternate button design. You can preview the designs here.
Our 3D printed clicker button boxes sit nicely on a desk, unlike the hand-held official Certamen ones, so it's doubtful whether the Junior Classical League would approve them for official competition, but our machine was meant to be for practice.
If you prefer a more standard hand-held clicker version (still not officially approved, but you can try to seek approval from the JCL if you want to use them for tournaments rather than just school practice), I will also describe an alternate design, which I haven't actually built but it should be straightforward. An advantage of this design is that it doesn't need 3D printing (though you still need some sort of a case for the main box). It requires about six feet of schedule 80 1/2" PVC pipe, epoxy and hot glue, and reduces project cost by about $6.
Control Box: Introduction
The control box will contain the Arduino Mega, a stripboard with RJ-45 sockets, filtering capacitors, and various other connections, a CLEAR pushbutton, and a MODE toggle switch. Connections on the Arduino side will use jumpers, so they can be easily changed out.
I will assume you are making a three team version, with three RJ-45 sockets. With some care, it may be possible to fit four RJ-45 sockets, and the modifications to the firmware will be slight. If you want a two team version, just skip one of the sockets.
Control Box: RJ-45 Sockets
Solder the RJ-45 sockets to the breakout boards.
Solder the breakout boards to the stripboard edges. If you are using my 3D printed control box design, you should solder them in the same locations as in the photo.
Control Box: Capacitors and Connections
The stripboard now needs a number of further connections. You will want to refer to the schematic (to zoom in further, this png version or this svg version may help).
A lot of the soldering involves soldering jumpers to the board. You can use solid-core 22AWG wire, or else pre-made jumpers. If you use pre-made jumpers, you will sometimes be able to cut a long one in half and use both halves separately. Always ensure your jumpers are long enough to reach where they need to go. Unless I mention otherwise, "jumper" means "male-male jumper".
You can just go with the schematic and ignore the following hints, but you might find some of them helpful.
1. Reserve a central strip of the stripboard for ground, and solder a jumper (ideally, black) that goes to one of the Arduino's GND pins.
2. Each RJ-45 socket serves one team and has eight connectors that go in (twisted) pairs to the four buttons. Put a 100nF capacitor between 1 and 2, 3 and 6 (!), 4 and 5 (!), and 7 and 8. Connect 2, 4, 6 and 8 to ground. Connect 1, 3, 5 and 7 to jumper wires, whose other end will go to the Arduino's digital pins. Ideally, use jumper wires of the same color for each team, so it'll be easier to keep track.
3. Solder in the simple transistor circuit serving the speaker in the schematic. The pins of the transistor in the schematic are arranged left to right with the flat side facing you: the left should be connected to a jumper wire that will go to one of the Arduino ground pins, the middle wire to a 1K resistor whose other end goes to a jumper to Arduino digital pin 9, and the right pin goes to a 100ohm resistor whose other end goes to a wire to one of the speaker connections. The other speaker connection should go to a jumper that will plug into one of the Arduino 5V pins.
4. Wire up the toggle switch. You can just solder one wire from one of the mode toggle switch contacts to the ground strip, and solder a male jumper from another contact to eventually connect to the Arduino.
5. The clear pushbutton is trickier if you use the 30mm arcade buttons, as it will have to be snapped to the case from the outside, and you don't want to deal with the case at this point. I recommend taking one jumper with a female end, snipping it off close to the female end, and soldering the other end to the button. Then solder a male jumper to the stripboard's ground strip, and you can eventually attach that jumper to the button. Additionally, solder a male jumper to the other connector on the button; this will eventually connect to the Arduino.
Note: I put a 150ohm resistor in series with a 100nF capacitor across both the toggle switch and clear button, but frankly that's probably overkill, so I didn't include it on the schematic, and you probably don't have to bother with it. (The firmware does all the requisite debouncing in software anyway.)
Control Box: LCD
The two-line "1602" LCD probably comes with a male header you need to solder to it. Once you've got the male header, just plug the 16 female-to-male jumpers into it.
Note that in the circuit diagram, there are four pins on the LCD that go to ground, one of them through a 2.2K resistor. To conserve precious Arduino GND pins, cut the male ends from three of the female-female jumpers, especially, including the V0 one that gets the resistor. Solder one end of the resistor to the V0 jumper. Then join the other end of the resistor and the remaining three jumpers in such a way that they all converge to one male plug that can go to an Arduino GND pin.
Remember to eventually cover up all exposed stuff with electrical tape or heatshrink.
But note: The 2.2K resistor may need to be changed in the next step if the display contrast isn't good, so maybe don't do the heatshrink yet.
Also, there are two pins on the LCD that go to 5V: merge them similarly. You may want to check that the LED+ connector connects to a resistor on the LCD (it did on the board I got). If not, add a 220ohm resistor.
Then plug the male ends into the Arduino as on the circuit diagram.
Control Box: Upload Firmware and Test
Make sure you have the Arduino IDE installed. Download my software from here. You can just download the zip file and put its contents into the Arduino directory.
Inside the zip file, you will find another zip file, called ModNewLiquidCrystal.zip. This is a little tricky to deal with. It's a highly optimized library for dealing with the 1602 LCD, and it will improve the timing precision of the Certamen device. Delete the default LiquidCrystal Arduino library. (On Windows, it's in C:\Program Files (x86)\Arduino\libraries .) Then extract the contents of ModNewLiquidCrystal.zip into your Arduino user libraries folder.
Connect the Arduino to the computer, set Tools | Board | Arduino Mega ... 2560, Tools | Processor | ATmega2560, and Tools | Port to your Arduino's serial port (hopefully there is only there). Then upload with the right-arrow button.
If all is well, the LCD will show a Certamen message, and go to a screen that just says "Certamen". If not, something is wrong with your LCD connections. If the contrast is bad, you might swap out the 2.2K resistor for something else. Or use a 10K potentiometer, as here.
Unpower the Arduino and connect the stripboard, clear and mode jumpers to the Arduino as per the schematic.
Power up the Arduino again, and now you can test it some more. There are two modes: Certamen mode and Quiz mode. You flip between them with the toggle. In Certamen mode, a button press locks out the team. In Quiz mode, there is no team-lockout. Quiz mode is also useful for checking that all the connections work. Since you don't yet have the buttons hooked up, for testing just use a screwdriver to join the contacts on the RJ45 sockets.
Control Box: Finish
Your project box needs to be able to have holes for clear button, mode toggle, USB port, RJ-45 ports and LCD screen. It might be a good idea to have some openings for the speaker, but you can experiment. You can figure it out, or use the 3D-printable box.
If you use a 30mm arcade button as the clear button, and your mode toggle button has the same dimensions as mine, you can just print the STL files.
But if you want to change things, you'll need to download OpenSCAD and edit the mainbox.scad file. OpenSCAD can be intimidating, but if you just need to make minor changes, it'll be easy:
- If you aren't using a 30mm arcade button as your clear button, you can make a plainer circular button hole by changing use30MMArcadeButton to be false, and then adjusting the clearButtonNeckDiameter, clearButtonNeckLength and clearButtonOuterDiameter parameters to your liking.
- To resize the mode toggle hole, adjust modeSwitchNeckDiameter, modeSwitchNeckLength, modeSwitchOuterDiameter.
- If you have a different size speaker, there are various speakerXXX parameters.
To see the effects, click on the ">>" preview button. At the top of the file, there is a "mode =" which lets you select if you're rendering the TOP, the BOTTOM or some WASHERS that may be handy for fitting things. Once satisfied, click on the cube-with-hourglass button to render, and then the STL button to create a printable STL file.
Once the box is ready, mount the Arduino, the stripboard, and the LCD with the #4 screws. For some of the bottom holes the screws might be a bit too long and stick out. You can just file the ends of the screws flat, or use shorter ones. Slip the speaker into the slides by the speaker grille, and mount the mode switch and the buttons.
Prepare Cables
The setup I went for had each cable going out from the control box for about 14.5 feet to the first clicker box, and then the cable went through the clicker box to the next one, and so on to the last clicker box. I wanted about 3.5-4 feet between clicker boxes.
Each clicker box connects to one pair of the twisted pair wires:
- orange / orange-white: button 1 (near end, closest to plug)
- green / green-white: button 2
- blue / blue-white: button 3
- brown / brown-white: button 4 (far end)
You will need to connect to the right twisted pairs from the cable at the right points.
Measure out where you want the clicker boxes to go, with the last one going about three inches from the far end of the cable (the end opposite to the RJ-45 plug), and carefully strip about half an inch of the outer insulation from the cable at each of these four points.
Next, strip the tips of the brown / brown-white pair at the button 4 point.
Move on to the button 3 stripped area. Cut the blue / blue-white pair at the far side of the 1/2" stripped area (i.e., the side away from the plug), leaving 1/2" of pair on the . Strip the ends of the blue / blue-white pair, and solder splice wires (e.g., leftover jumpers) to the near (plug) side of the wires, about 3 inches for use with the on-desk clickers and 6-inches for the in-hand ones. Cover joints nicely with heat shrink.
Repeat with button 2 and green / green-white.
Repeat with button 1 and orange / orange-white.
You now have a cable with four pairs of wires sticking out at various points. Repeat for the other two cables.
I had a much more complicated procedure where I skipped the splices and pulled out wires from the far end of the cable. In doing so, I occasionally damaged the wires, and I recommend the above procedure instead.
Option A: 30mm Arcade Buttons and 3D-printed Clicker Boxes
If you go for the 30mm button on-desk clickers I did, you'll now need to print all the 12 clicker boxes. They are on the github page for the project, in both stl format and an OpenSCAD file that was used to generate them. The button boxes are labeled by team and player (teams: A, B and C; players: 1, 2, 3 and 4), so they are all different. Moreover, the player 4 box goes at the end of the cable so it has only one cable slot instead of two. There are also bases for the button boxes. The bases for players 1-3 are all the same, but the base for player 4 is different. To save plastic, I made bases out of 1/4" plywood instead with a hole saw (and then drilled attachments).
Pull the wires going to each button up through the bottom of the button box and solder to the button. Make sure all joints are covered with electrical tape or heat shrink. Put the cable in the holes at the bottom of the button box (or one hole if it's button 4), and attach cable ties inside to keep the cable from pulling out. Attach the bases with screws, and put silicone feet on.
Option B: Hand-held Clickers
Cut 1/2" schedule 80 PVC pipe into five inch segments for clicker handles.
File a slot for the cable on both sides of the bottom of the pipe pieces, except for in the case of button 4 which needs just one slot.
File the inside top of the pipe piece so that you can get a friction fit of the button on top.
Pull wires up through pipe, and solder to the button. Epoxy the button in place where it has the friction fit. Put the cable through the slot(s) you filed at the bottom. Put cable ties inside the pipe on the cable to keep it from pulling out. Then seal up the bottom of the pipe, either with epoxy or with hot melt glue.
I recommend putting some Shoe Goo or silicone sealant on the outside of the cable where it comes out of the pipe as strain relief.
Use!
Before using, test all the buttons. Set the mode switch to "Quiz", and have every player press a button. You should have all 12 buttons show up on the screen. Then switch to "Certamen" and you'll get the team-lockout feature. To clear the screen, press the Clear button.
My cable dimensions were designed so the buttons could be on separate desks in a classroom.
Technical Notes
In case of a tie, the software makes a random choice.
The timing precision for determining who is the first player to press a button is no worse than 50 microseconds (tested with oscilloscope).
On rare worst-case occasions, the timing precision for telling the second from the third press will be about 2 milliseconds. This happens only if all three presses happen within 2 milliseconds of each other, and is due to the processor being busy updating the screen after the first press. To minimize this source of timing error, the LCD has a parallel 8-bit connection (normally people connect 1602 LCDs using fewer pins on the Arduino) and I included an optimized LiquidCrystal library to make use of it (most of the optimizations aren't mine, but I added the parallel 8-bit optimization).
Easter Eggs!
If you hold the clear button down while the device is booting up, you get one of two easter eggs, depending on the state of the mode switch: a piano operated by the clicker buttons or some Latin poetry on the screen. To exit, flip the mode switch.