Skip to content
Scott Thomas edited this page Apr 9, 2021 · 17 revisions

What Do I Need?

Hardware

Required Parts

  1. Raspberry Pi Kit (3b+, 3A+, 4B)
  2. Adafruit RGB Matrix Bonnet
  3. Header Extender
  4. Led Matrix (32x32, 64x64, 64x32)
  5. 5v 4amp - or - 5v 10amp power supply
  6. 8GB Class 10 SD/Micro SD Memory Card

Optional Parts

  1. Computer that has an SD card slot
  2. Keyboard
  3. Mouse
  4. HDMI cable if you have a Raspberry 3 | Mini HDMI cable if you have a Raspberry 4
  5. Monitor with HDMI port

Tools

  • Small flathead screwdriver

Buying the Right Parts

Choosing the right LED matrix board

Matrix board comes in different sizes and they are defined by the number of LEDs and spacing between each LED. This is really important because the closer the LED are from each other the harder it is to read from a distance. This also affects the size of your LED matrix. A 32x32 at 6mm pitch is about 7.5 inches big whereas a 32x32 at 4mm will be 5 inches big.

32x32 RGB LED Matrix - Perfect to hang or you sit more than 6 feet away.

64x32 RGB LED Matrix - Perfect to hang or you sit more than 6 feet away & want more visual space.

64x64 RGB LED Matrix - Great when you are less than 12 feet away. However, you will need to modify your RGB bonnet

Setting Up Your Raspberry Pi

Preparing Your Operating System

What you will need

  • Desktop or notebook computer
  • Micro SD Card reader, if your computer doesn't come with it.
  • Micro SD card
  • Rasberry Pi's Imager Software

Step by Step Instructions (How-To Video)

  1. Plug your SD card into your computer.
  2. Download and install the Raspberry Pi's Imager. This will let us download and write the OS into our SD card.
  3. Launch the Rasberry Pi's Imager and click the CHOOSE OS button.
  4. Select Rasberry Pi OS (32 Bit) from your options to bring back to your main menu.
  5. Now Click, CHOOSE STORAGE and select your SD Card
  6. Last, click WRITE. It will prompt you when you are done.
  7. Now eject and remove your SD card and you ready to move on to assembling your Rasberry Pi!

Assembling Your Raspberry Pi

What you will need

For the Rasberry Pi

  • Raspberry Pi
  • Heat sink stickers
  • Newly imaged Micro SD card
  • Powercord
  • Wireless/wired mouse
  • Wireless/wired keyboard
  • HDMI Cable
  • Header Extender

For the LED Matrix

  • Adafruit RGB Bonnet
  • LED Matrix
  • Power Cable for RGB LED Matrix (Red/black wire)
  • IDC cable (Gray cable)
  • Small flathead screwdriver
  • 5v 4amp - or - 5v 10amp power supply

Quick Notes

  • The following images are for a Raspberry Pi 4, you can use Pi 3 for this task. The key visual differences are the HDMI ports.
  • Rasberry Pi's do not have a power button. I wouldn't plug your Pi into the wall until the last step.
  • If you don't have a monitor, keyboard, or mouse. You can ignore those steps because you can still set up your Pi and remote it from your computer.

Step by Step Instructions

  1. First place your two heatsink stickers based on the location of your instructions. They are easy to place and adjust if needed.

Place the three heatsink stickers on your raspberry pi

  1. Next, place your Mini SD card into its slot. The slot is located underneath the board.

Insert micro sd card into your raspberry pi

  1. Place your header extender in the 20pin port on your raspberry pi without placing too much force on it to bend the pins.

Add your header extender to the raspberry pi

  1. Now sit that aside and grab your RGB bonnet. Use your flathead screwdriver to screw in your Power Cable for RGB LED Matrix. These are the red and black prongs, with the red cable going to the close slot to your power supply.

Connect your power supply to the bonnet

  1. Plug in your IDC cable (its gray cable) into the proper slot in your bonnet.

Insert your IDC into the bonnet

  1. Grab your LED Matrix you will notice there are two ports for your IDC cables (its gray cable) to go in. One in input and the other output. You want to find the port with an arrow pointing inward and plug the other half of your IDC cable into it(its gray cable). Plug in the port of the black/red cable into the matrix.

Insert your IDC and power cables into the matrix

  1. Now grab your Rasberry Pi. Place your RGB bonnet on top of the extender pin, but don't press too hard down.

Insert your IDC and power cables into the matrix

  1. Plug in all your HDMI connected to your monitor, wireless/wired mouse, and wireless/wired keyboard.
  2. Now connect your raspberry power supply and RGB bonnet power supply.
  3. When everything connected and ready to go, plug your power supplies into the wall and watch two lights flash.

Starting Up Your Raspberry Pi

Watch the how-to video

Key things you will need to do;

  • Connect to your wifi
  • Update your admin password
  • Run software updates
  • Update your timezone

Setting Up The MLB Scoreboard

Installing the Software

  1. Open up the terminal, you will be using this a lot to run and edit this project.
  2. First we are going to check for updates. Type this into your terminal and hit enter

sudo apt-get update

  1. Next we going to get Git for cloning this repo and PIP for installing the scoreboard software. Type this in and hit enter.

sudo apt-get install git python-pip

  1. Going to pull and download the files from Git. Type this in and hit enter.

git clone --recursive https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard

  1. Now we want to enter it into that folder to install it. We do this by

cd mlb-led-scoreboard/

  1. Next we want to run the installation for the software. We do this by

sudo ./install.sh

  1. You will be prompted with Yes/No questions. Just hit y both times.

Running the Scoreboard

Tweaking Your Matrix

How do I use flags?

You can use multiple of these flags to modify your led matrix. The full list is found here - https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard#flags

This is an example of what adjustments you might put in to turn on the scoreboard

sudo python main.py --led-gpio-mapping="adafruit-hat" --led-slowdown-gpio=4 --led-brightness=80

My Led Matrix is Flickering or Glitching

This seems to be a common occurrence for multiple users. First, try slowing down GPIO. You will need to do this for faster Pis and/or slower panels. You have the ability to set it from 0-4. The default is 1.

sudo python main.py --led-gpio-mapping="adafruit-hat" --led-slowdown-gpio=4

If that doesn't work, try following the troubleshooting steps found here https://github.com/hzeller/rpi-rgb-led-matrix#troubleshooting. Sometimes it could be other services that might be causing the issue.

I am getting a low voltage warning

There are three ways to solve this issue; First, lower your led brightness level to reduce your energy usage. You can do this by using the --led-brightness flag. You have the ability to set your brightness from 0-100

sudo python main.py --led-gpio-mapping="adafruit-hat" --led-brightness=80

Second, try adding powering your raspberry pi as well as the bonnet. It's not the most appealing method, but it works.

Third, try purchasing a higher voltage power supply. Try using a 5v 10amp power adapter - https://www.adafruit.com/product/658

Additional Mods

64x64 Panel Mod

If you are using a bonnet, you will need to place a dot of solder on 8 on the E. I recommend looking over the this How To Guide

Creating a timer to turn on and off your scoreboard

You might not always want your scoreboard on. This is how you can set up a timer to turn and off your scoreboard.

First, following the steps listed here to create the service - https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard/wiki/Creating-a-systemd-startup-script

Second, create cron job to trigger the event and you do this within the terminal

crontab -e

Now add the times you want it to start and stop

This starts the scoreboard at 7am

0 7 * * * sudo service mlb-led-scoreboard start

This stops the scoreboard at 8pm

0 20 * * * sudo service mlb-led-scoreboard stop

To understand cron time, here a resource for you https://crontab.guru/

Can I add additional panels?

You’ll want to refer to https://github.com/hzeller/rpi-rgb-led-matrix (The matrix driver the scoreboard uses)

  • Short answer: it is that simple, you just pass a --led-chain or --led-parallel to determine the size of the chain and orientation
  • Long answer: There are probably caveats (i.e. panels with different sizes, orientations, etc.) The scoreboard will need to support whatever matrix size the total of the panels creates