Introduction: Score Board Project Using DMD

Picture of Score Board Project Using DMD

Often we meet in a soccer stadium, there is a giant LED board that serves as a scoreboard. So also in other sports field, also often we know the scoreboard of the display screen made of LED. Although not possible, there is also a field that still uses a manual board.

In this project, we create a scoreboard using Dot-matrix Display using Bluetooth-based Android Smartphone as the controller.

Step 1: Materials You Need

You will need:

  • Arduino Uno
  • SFE DMD Connector
  • P10 Outdoor/ Semi Outdoor
  • HC-05 Bluetooth Module
  • Power Supply 5 Volt
  • Tact Switch
  • Bread Board
  • Jumper Wires

Step 2: Setup

Picture of Setup

Once the components have been collected, connect each component according to the schematic above.

Step 3: Code

Picture of Code

After each component is connected, make sure that the component is properly installed before turning it on. Also attach the DMD connector according to the pin shown on the PCB. Connect Arduino on your PC / Laptop, and upload the program below.

// Insert File library

#include <DMD2.h>

#include <fonts/MyBigFont.h>

#include <EEPROM.h>

// Define function

#define bCLEAR A1

#define bRIGHT A2

#define bLEFT A0

#define Panjang 2 // Number of height Display P10

#define Lebar 1 // Number of width Display P10

SoftDMD dmd(Panjang, Lebar);

// Declaration Variable

byte Brightness;

byte debounce = 100;

int rightScore = 0;

int leftScore = 0;

int i;

char dmdBuff[10];

char BT;

// Setup Function, done once when arduino reset

void setup() {

Brightness = EEPROM.read(0);

dmd.setBrightness(10);

dmd.selectFont(MyBigFont);

dmd.begin();

dmd.clearScreen();

Serial.begin(9600);

pinMode(bCLEAR,INPUT_PULLUP);

pinMode(bRIGHT,INPUT_PULLUP);

pinMode(bLEFT,INPUT_PULLUP);

blinkDisplay();

}

// Blink Display Function, function to make the display blinking

void blinkDisplay(){

dmd.clearScreen();

delay(300);

sprintf(dmdBuff,"%d",leftScore);

dmd.drawString( 0, 0, dmdBuff );

dmd.drawString( 29, 0, "-" );

sprintf(dmdBuff,"%2d",rightScore);

dmd.drawString( 43, 0, dmdBuff );

delay(300); dmd.clearScreen();

delay(300);

sprintf(dmdBuff,"%d",leftScore);

dmd.drawString( 0, 0, dmdBuff );

dmd.drawString( 29, 0, "-" );

sprintf(dmdBuff,"%2d",rightScore);

dmd.drawString( 43, 0, dmdBuff );

delay(300);

dmd.clearScreen();

delay(300);

}

//GOAL Function, displays GOAL text when input is inserted

void GOAL(){

dmd.clearScreen();

delay(400);

dmd.drawString(5, 0, "GOAL!!!" );

delay(400);

dmd.clearScreen();

delay(400);

dmd.drawString(5, 0, "GOAL!!!");

delay(3000);

}

// Loop Function, done repeatedly

void loop() {

if(Serial.available()){

BT = Serial.read();

}

if(digitalRead(bCLEAR) == LOW || BT == 'X') {

delay(debounce);

leftScore = 0;

rightScore = 0;

dmd.clearScreen();

BT = 0;

}

if(digitalRead(bLEFT) == LOW || BT == 'A') {

delay(debounce);

leftScore++; GOAL();

blinkDisplay();

BT = 0;

}

if(digitalRead(bRIGHT) == LOW || BT == 'B') {

delay(debounce);

rightScore++;

GOAL();

blinkDisplay();

BT = 0;

}

sprintf(dmdBuff,"%d",leftScore);

dmd.drawString( 0, 0, dmdBuff );

dmd.drawString( 29, 0, "-" );

sprintf(dmdBuff,"%2d",rightScore);

dmd.drawString( 43, 0, dmdBuff );

delay(300);

if(digitalRead(bLEFT) == LOW && digitalRead(bRIGHT) == LOW) {

dmd.clearScreen();

delay(debounce);

setBrightness: Brightness = EEPROM.read(0);

if(digitalRead(bLEFT) == LOW ){delay(debounce); Brightness++;}

if(digitalRead(bRIGHT) == LOW){delay(debounce); Brightness--;}

EEPROM.write(0,Brightness);

dmd.setBrightness(Brightness);

sprintf(dmdBuff,"%3d ",Brightness);

dmd.drawString( 16, 0, dmdBuff );

delay(50);

if(digitalRead(bCLEAR) == 0){dmd.clearScreen();

delay(debounce); loop();} else{goto setBrightness;}

}

}

Step 4: Application

Picture of Application

If an error occurs while uploading the program, you need an existing DMD library of additional fonts to support the display of the scoreboard, download DMD2 libraries. The image above is the Scoreboard display.

Step 5: Android Application

Picture of Android Application

SFE Scoreboard android apps can be downloaded here. Here's the main view of the SFE Score Board app.

Step 6: Try It!

Picture of Try It!

How to use it, as follows:

  1. Install the application on your Android Smartphone.
  2. Open the app, if there is a notification to activate bluetooth click yes.
  3. To connect to the bluetooth module, click the Bluetooth icon at the top of the application, it will display a bluetooth list that has been terpairing with your device.
  4. But if the name of your bluetooth module is not available on the device, you must make pairing first by entering the bluetooth settings menu on your device. After the scanning process is complete and appear the name of your bluetooth module, do pairing. If prompted to enter a password, enter password 1234 for the module standard, if it has not been replaced.
  5. If the application is connected, you can already access the scoreboard using your Android device.

Comments

DIY Hacks and How Tos (author)2017-09-27

This would make an awesome fan sign to see at a stadium.

About This Instructable

764views

9favorites

License:

Bio: Electronics Component - PCB [Design, Printing, Inserting] - Electronic Programming
More by sfeelectronics:Line Follower Basic using Arduino NanoArduino Webserver Controller Using Ethernet ENC28J60 and ArduinoRemote Robot Using Android
Add instructable to: