Score Board Project With P10 LED Display Using DMD

13,754

27

11

Introduction: Score Board Project With P10 LED Display Using DMD

About: Electronics Component - PCB [Design, Printing, Inserting] - Electronic Programming

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: Wiring

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

Step 3: 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>
// Defining function
#define bCLEAR A1
#define bRIGHT A2
#define bLEFT A0
#define Panjang 2                         // Number of height of Display P10
#define Lebar 1                           // Number of width of 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 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, make the display blink
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, display GOAL text when input 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

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

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

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.

Step 6: Check the Video to Know More

LED Contest 2017

Participated in the
LED Contest 2017

Wireless Contest

Participated in the
Wireless Contest

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    11 Discussions

    0
    merd38
    merd38

    5 months ago

    Hello there. I congratulate you for your good work. I did this work on me. I need your help. Can you help me. Thanks a lot for your attention. I merd38@hotmail.com

    0
    parvatyele
    parvatyele

    Question 11 months ago

    How to add small images in P10 Score board such as name of the team in other languages

    0
    scoremoto
    scoremoto

    1 year ago

    Can you help me on how to change the team name in the app and send it to arduino just like on your video wherein you change team1 to sfe? Thank you.

    0
    1kinseybenjamin
    1kinseybenjamin

    Question 1 year ago on Introduction

    If I provide specs, do you know of someone or a company that can create a prototype scoreboard for me, similar to what you have shown here?

    0
    Tech &G
    Tech &G

    1 year ago

    Hello , can you give me link for your font, and can you tell me how you create it. Thanks

    0
    JanneW1
    JanneW1

    Question 1 year ago on Step 6

    Hi, if 2*P10 is used then visibility is limited to short distance.
    Have you experience 3*P10 in two rows above each other so total of 6 pc

    0
    MifthaM
    MifthaM

    Tip 3 years ago on Step 3

    if during Compile this coding errors, make sure you have to add specify the source code
    #include




    0
    SangarN
    SangarN

    Reply 2 years ago

    pleas you can send me code for 4 dmd , thank you .

    0
    arhman
    arhman

    2 years ago

    Thank You very much.

    0
    MifthaM
    MifthaM

    Tip 3 years ago

    Add this code
    #include

    20180126_210220.jpg