Monday, August 18, 2014

Baseball Scoreboard - All-in-One Quick Start Guide

    For those who don't want to dig through 9 different posts in order to figure out how to construct your own scoreboard, I put this all-in-one quick start guide together.  If you follow this from start to finish, you should be able to set up your own scoreboard in a minimum amount of time (Guide starts after the jump).


1) Buy all of this stuff   

Scoreboard
Item
Cost
Cork Board
$10
3 x 16x24 Red LED Matrix Panel - Chainable HT1632C Driver (http://www.adafru.it/555) -
$75
Ribbon Cable
$3
10 10-pin IDC connectors
$4
2x Hooks
$5
Assorted nuts and bolts
$5
USB A-to-B cable
$2
Arduino Uno R3 (http://adafru.it/50)
$25
Adafruit  Proto Shield for Arduino PCB (http://adafrui.it/55)
$6
Break-away 0.1” 36-pin strip male header (10 pieces) (http://adafru.it/392)
$5
TOTAL
$140

Comms Processor
Item
Cost
Craft Box
$10
TP-Link TL-MR3040 WiFi AP
$40
Verizon JetPack  MiFi 5510L  (Novatel Wireless)
$100
Raspberry Pi Model B (http://adafru.it/998)
$40
Enclosure for Pi (http://adafru.it/859)
$15
1 10000 mAh USB battery
$17
3 USB A-to-micro cables
$4
1 15’ USB extension cable
$3
1 6 in cat 5e cable
$1
TOTAL
$230



2) Construct the scoreboard


  • Cut out the holes in the scoreboard for the LED displays centered on the 1/4 lines, as depicted.



  • Print out the templates found here, cut out and hot glue them to the scoreboard as depicted above. 
  • Color any exposed board material between the template and displays black. 
  • Construct the 5 ribbon cables (4 10-trace cables, 1 20-trace cable) using 10-pin IDC connectors and ribbon cables and protoshield (protoshield depicted below).

LINEFUNCTIONPIN
25V5V
6GNDGND
7WRITE3
8READ
2
11CS04
12CS15
13CS26


  • Wire the displays as depicted below.  Use hot glue to secure the components.


  • Affix the hooks to the back of the scoreboard, as well as the USB extension cable (depicted above).


3) Program the Scoreboard

  • Download the Arduino IDE and install (http://arduino.cc/en/Main/Software).
  • The github repository for my code can be found here.  Check it out into your Arduino working directory (i.e., git clone https://github.com/ScratchesTheItch/ScoreboardArduinoCode.git).
  • Fire up the Arduino IDE, open the GC_Scoreboard sketch file.
  • Upload the sketch to the Arduino.
  • Once loaded, select the Serial Monitor to test the scoreboard. (i.e., enter test into the Serial Monitor in order to cycle the display its test display).

4) Build the Control Box


  • Wire up the control box, as shown (starting from the upper right hand corner, components are 4G Hotspot, USB battery, WiFi AP, and Raspberry Pi).




  • Connect WiFi AP Raspberry Pi via Cat 5 network cable.
  • Connect 4G Hotspot to the Raspberry Pi via USB.
  • Connect the Scoreboard to the Raspberry Pi via USB.
  • Connect the USB Battery to the Raspberry Pi's Micro-USB power port.

5) Configure the WiFi AP


Using the AP Quick Setup menu:
  • Operation Mode:  Standard AP Mode
  • Wireless Operation Mode:  Access Point (AP)
  • Wireless Network Name:  Scoreboard (or whatever you like -- this is the AP name your scorers will join to get their internet)
  • Wireless Security:  WPA-Personal/WPA2-Personal
  • Wireless Password:  (whatever you like--this is the password your scorer will use to join your AP)

6) Configure the 4G Hotspot


  • Hide the Hotspot Wireless network name (under Jetpack Settings / Wi-Fi, uncheck the "Broadcast Wi-Fi name")


7) Setup the Raspberry Pi

  • Install Raspian onto the Raspberry Pi using NOOBS (http://www.raspberrypi.org/help/noobs-setup/).  Sometime during this step, connect the Raspberry Pi to your home LAN via ethernet.
  • Once the Raspberry Pi reboots, ssh in:
    • ssh pi@raspberrypi
  • Using raspi-config (sudo raspi-config):
    • (1) Expand file system
    • (2) Change password
    • (3) Boot to command line
    • (4) Internationalisation Options
      • (I2)  Change Timezone - Change to your timezone to enable proper functioning of box scores
    • (8) Advanced options
      •  (A2) Hostname - Recommend setting it to ScoreboardControl (NOTE:  Do not set to "Scoreboard"or the web server will not work properly due to DNS confusion)
    • Reboot
  • Once rebooted, ssh back in:
    • ssh pi@Scoreboard
  • Update/upgrade and install packages
    • sudo apt-get update
    • sudo apt-get upgrade
    • sudo apt-get install dnsmasq apache2
  • Install the Device::SerialPort and Compress::Zlib perl modules (The following command should work, if not see http://www.thegeekstuff.com/2008/09/how-to-install-perl-modules-manually-and-using-cpan-command/ for suggestions):
    • sudo cpan -i Device::SerialPort Compress:Zlib
  • Download install tarballs into your home directory 
    • cd
    • wget https://github.com/ScratchesTheItch/ScoreboardRaspberryPiCode_Configs/raw/master/configs/configs.tar.gz
    • wget https://github.com/ScratchesTheItch/ScoreboardRaspberryPiCode_Configs/raw/master/tinyproxy/tinyproxy-1.8.3-gcscoreboard-bin.tar.gz
    • wget https://github.com/ScratchesTheItch/ScoreboardRaspberryPiCode_Configs/raw/master/gc-parser/gc-parser.tar.gz
    • wget https://github.com/ScratchesTheItch/ScoreboardRaspberryPiCode_Configs/raw/master/webserver/webserver.tar.gz
  • Unpack tarball in your root directory 
    • cd /
    • sudo tar -xvzf /home/pi/tinyproxy-1.8.3-gcscoreboard-bin.tar.gz
    • sudo tar -xvzf /home/pi/gc-parser.tar.gz
    • sudo tar -xvzf /home/pi/webserver.tar.gz
    • sudo tar -xvzf /home/pi/configs.tar.gz


8) Start Everything Up

  • Plug scoreboard into control box
  • Power on WiFi AP
  • Power on 4G Hotspot
  • Power on Raspberry Pi (i.e., plug into USB Battery)
Once the scoreboard flashes a second time, it is ready for use.  

9) Score a Game

  • On the iPad, join your scoreboard's wireless network using the SSID and password configured above
  • Start the GameChanger app and score game as normal
  • Confirm scoreboard updates as the game is scored

10)Post Game

  • Disconnect USB battery
  • Power down WiFi AP
  • Power down 4G Hotspot
  • Disconnect scoreboard from control box
  • Pack it all up and go home

11) Between Game Maintenance

Three batteries need to be charged:
  • The WiFi AP
  • 4G Hotspot
  • USB Battery (NOTE:  This usually takes the longest)

By my accounting, this should get you from zero to project complete.  If you go through this guide and encounter any issues, please let me know so that I can correct the guide for others.  Thanks!

2 comments:

  1. Awesome! Surprised there is not a commercial product for sale considering how much gamechanger is used these days. Have you "pitched" the idea to gamechanger? Pun intended. I would love to have one to eliminate the "whats the score" and "how much time is left" questions. It would also be good to have display double sided so umps and field could see score and time. I see this post is a few year old. Any updates? Is it still working?

    ReplyDelete
  2. Thanks for the feedback. I did notify Gamechanger of what I was working on when I built it but they didn't seem interested. Since this post, the only addition was to display box scores between innings (https://scratchestheitch.blogspot.com/2014/08/baseball-scoreboard-update-to-display.html). It may still work (although I suspect Gamechanger has probably changed their communications by now); shortly after finishing this project my son graduated to high school baseball and proper scoreboards.

    ReplyDelete