Score Board Project With P10 LED Display Using DMD

8,711

23

7

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    7 Discussions

    0
    None
    Tech &G

    2 months ago

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

    0
    None
    JanneW1

    Question 8 months 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
    None
    MifthaM

    Tip 1 year ago on Step 3

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




    1 reply
    0
    None
    SangarNMifthaM

    Reply 12 months ago

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

    0
    None
    arhman

    1 year ago

    Thank You very much.

    0
    None
    MifthaM

    Tip 1 year ago

    Add this code
    #include

    20180126_210220.jpg