Loading 3D model… large boards can take a moment.
This repository compiles code and documentation for an electronic scoreboard. It has been successfully operated for several years and was continuously updated and improved. The idea and inspiration comes from the awesome folks from Westbury on Severn Cricket Club You can find their blog with tons of useful information on the project at https://buildyourownscoreboard.wordpress.com/
The main idea is to have a Raspberry Pi acting as a web-server and providing control of the scoreboard via a simple webpage to connected devices. The Raspberry Pi will transmit the data to be shown on the scoreboard to an arduino board via serial interface. The Arduino will then control the hardware. Currently this includes
The 7-Segment elements are custom build and consist of 12V-LED stripes or bars.
To control the high number of LED elements by a single microcontroller (4 x 2digits x 7 LED elements), the schematics uses shift registers for multiplexing. Some great explanation of the functionality for a shift register can be found at https://www.mikrocontroller.net/articles/AVR-Tutorial:_Schieberegister Each shift register provides 8 output channels and can be used to control one individual digit of the scoreboard. All shift registers can be cascaded (serial_out connected to serial_in of the next IC) and controlled via one single data pin. The electrical signals we need are:
For controling the shift registers, we can use the SPI-bus of the Arduino, since it already comes with a resource-efficient implementation for sending serial data with a synchronous clock signal. SPI is a three wire communication bus that is intended to connect a number of slave devices to one master device in parallel. The electrical signals are:
Since all slave devices are connected to the SPI bus in parallel, there must be a mechanism to identify the device that is selected for communication. For this purpose, the SPI-bus uses an additional signal / wire for each slave device, that enables communcication. This pin usually is designated as SS (slave select). The default state of the SS-lines is +5V. During communication with one individual slave, its SS-line will be pulled to GND (for the duration of the communication).
The Shift registers have no slave select pin. However, it is still possible to use these devices in parallel with outher SPI devices by using the RCK pin (Release signal). Although the ICs will process all data (also data meant for other SPI-devices on the bus) and change the internal shift registers accordingly, there won't be any unintended change to the storage register and output channels without setting the RCK-signal. Since the Transfer from shift- to output registers is triggered by a positive flank on the RCK-line, the SS-select signal can be used and directly being hooked to the RCK pin. One should be aware, that when using multiple devices on the SPI-bus, the state of the shift registers might have some arbitrary state after some time. Before enabling the release signal, one must always (re-)set the shift-registers to its correct/intended state.
A convenient choice is the TPIC6B595N. The advantage is, that its open-drain DMOS transistors are intended for high current operation and can directly drive the LED-elements. With 8 outputs, one TPIC6B595N can provide current to all elements of one 7-segment display. The TPIC6B595N has a continuous sink-current capability of 150mA on each output channel.
If the LED-stripes to be used would sink more than 150mA () the TPIC6B595N would have to be reduced. I could not find suitable devices, that combine the shifter funtionality with the high current output capability. It would probably be advisable to use a dedicated (low current) shifter like a 74HC595 in combination with a multi-channel transistor IC like the ULN2803A. The ULN2803A is capable of sinking 500mA continuously.
Raspberry Pi and Arduino have to exchange information on the scoreboard status via serial port. The Arduino Firmware uses CmdMessenger by Thijs Elenbaas to implement the serial communication. Project repository can be found at https://github.com/thijse/Arduino-CmdMessenger. CmdMessengers message format:
Cmd Id, param 1, [...] , param N;
Default field seperator is a comma, default command sepeartor is semi-colon. For our application, the seperators are changed to:
There is a Python client to communicate with an Arduino implementing this protocol: https://github.com/harmsm/PyCmdMessenger
For controlling the 7-segment displays via the TPIC6B595N, the communication and control of the shift register has to be done via SPI. The specific control scheme to control the drain-outputs of the shift registers is implemented in a simple library called polposhifter. This library uses the standard SPI-library that is pre-installed with arduino IDE.
For setting-up the Raspberry Pi one can closely followed along the instructions from https://buildyourownscoreboard.wordpress.com/setting-up-the-raspberry-jessie/ The instructions are based on Raspeerry OS 8 (Jessie) and php versiion 5. I used more up-to-date software versions, which works with minimal modification to the. The main steps are:
Download and install the Raspberry imager from https://www.raspberrypi.com/software/
Use this tool to prepare the micro-SD card for the Raspberry (I use a Rev 3 B+ ) with Raspberry Pi OS in lite version (without desktop environement). The Version proposed and used by the installer was bullseye (version 11)
All further steps can be followed from the linked instructions, with some minor adjustements:
The main operation principle is as follows:
No comments yet. Be the first to ask about this board.