Introduction
Quiz Control Panel - updated! see bottom of page
The Quiz Control Panel is a standard setup of four contestant buttons, each with an output to provide an indication of who pressed
first. The program locks out the other three buttons and provides an output for a 1s buzzer. The Question Master then has to press
his reset button to normalise the system. A GUI with different team colours is included if a monitor is used. When the Pi is headless
(no monitor) there is a button to gracefully shutdown the Raspberry Pi so it can be unplugged without fear of corrupting the SD
card. The program requires to be started at power on, this is done by editing the file:
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
and adding the line,
@/usr/bin/python /home/pi/????.py (the path & program and the path & file name of the script)
The Quiz unit comprises of four button boxes each with a wireless remote control key fob built in and the master box with the relay receiver board, Raspberry Pi, output relay board, lamps and buzzer. There is also an off button and a system ready LED to indicate the Raspberry pi has booted successfully.
RPi Quiz Script (just copy & past into IDLE 2.7).
RPi Quiz Panel Schematic.
Quiz GUI
Complete quiz system.
Demonstration of the prototype Quiz Panel - Buttons and Lamp boxes will be replaced with something more suitable..
UPDATE 1One thing that annoyed me about this project was the program always ran with the CPU usage at 100% so I fixed that with version 1.2 and I also took the opportunity to write the code to suit a Raspberry Pi Zero (or any with the 40 pin header) - see below:
RPi Zero Quiz Script. (just copy & past into IDLE 2.7).
RPi Zero Quiz Panel Schematic.
UPDATE 2
I have expanded the unit for six teams and built a small hat for the Pi zero to simplify the connections of the buttons and lamps.
Quiz GUI
Pi Zero, HAT and Relay Board.
RPi Zero Quiz Script for six contestants. (just copy & past into IDLE 2.7).
RPi Zero Quiz Panel Schematic for six contestants.
UPDATE 3
As part of updating some older scripts I have decided to implement the Quiz Control Panel on the Raspberry Pi Pico. This has a couple of advantages over using the Pi Zero, firstly it is instant 'on' no waiting for the Pi to boot up. This is significant as the Pi Zero takes a heck of a long time to start up and secondly there is no need to shut it down gracefully just pull the plug!
To make it simple to swap out the Pi Zero I have made a motherboard for the Pico, Pico to Zero..
Below is the test setup, waiting for the Pico to Zero board to arrive. Once fully tested it'll replace the Pi Zero in the system above.
The Pico to Zero board populated with the Pico and header running on the test setup. It is now a simple swap out of the RPi Zero in the Quiz Control Unit.
The Pico to Zero board fitted neatly in the place of the RPi Zero under the interface Hat. During testing the Pico was very sensitive to the back EMF from the radio receiver relays even although protection diodes are fitted on the PCB's. As these were surface mounted I left them in place and added 1N4007 diodes directly across the coil of each relay which prevented the effects of the back EMF on the Pico.
Below is the finished unit.
Hindsight Engineering - This project started about five years ago and isn't the way I would approach it now. With PCB's being relatively cheap I would design a board to do away with the relay interface and use ULN2003A drivers instead. I'd also modify the radio receivers to remove the relays and interface them directly to the Pico.