0% found this document useful (0 votes)
720 views

Interfacing P10 LED Display With Arduino

The document discusses interfacing a P10 LED display module with an Arduino board. It describes the pinout of the P10 module and explains how to select text fonts, display static and running characters, and control the brightness. Wiring the P10 module to the Arduino involves connecting the data, clock, latch, and brightness pins from the display to corresponding pins on the Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
720 views

Interfacing P10 LED Display With Arduino

The document discusses interfacing a P10 LED display module with an Arduino board. It describes the pinout of the P10 module and explains how to select text fonts, display static and running characters, and control the brightness. Wiring the P10 module to the Arduino involves connecting the data, clock, latch, and brightness pins from the display to corresponding pins on the Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

July 10, 2023 Recent posts    

Engineering Projects
Projects for Engineering
Students

 ARDUINO PROJECTS IC 741 PROJECT IC 555 PROJECTS ELECTRONICS PROJECTS ELECTRICAL PROJECTS CONTACT ABOUT US

AUTOMOBILE ELECTRONICS DESIGN TROUBLESHOOTING TUTORIAL CIVIL COMPUTER  

You are here Home  Electronics Projects  Interfacing P10 LED Display with Arduino

Interfacing P10 LED Display with Arduino

 July 10, 2022  Engineeering Projects

The P10 LED display is a single color (red, blue, and yellow), high brightness, lower power
consumption, and long lifetime display module designed for semi-outdoor use. One
display module we are using contains 16×32 = 512 LEDs. In the tutorial “
“, you will learn:

1. How to interface P10 Led display


with Arduino

2. How to select text font and size of


the character

3. How to display static character and


running character.

P10 display is a dot-matrix LED


display. Dot-matrix Led means a
group of LEDs set as a two-
dimensional array also called a 2D matrix array. Here each dot represents circular lenses
in front of LEDs. Dot-matrix Display or Running Text Display is often used in shops to
advertise their products. The module we are using contains a total of 512 no. of LEDs.
They can display di�erent types of characters, symbols, or messages (e.g. “Hello! World”).
We can connect multiple numbers of these types of displays in matrix format (i.e. ROW
and COLUMN arrangement).
Categories

555 Timer Projects (71)

8051 Projects (12)

AC Voltage Stabilizer (6)

alarm / sound generator (33)

Ampli�er Circuit (26)

Antenna Fundamental (12)

Arduino Projects (88)

ATmega Projects (11)

Automobile Engineering (8)

Automotive Circuit (7)

AVR Projects (8)

Figure 1: P10 Module Pinout Basic Electronic Projects (50)


Battery Charger Circuit (14)

▪ This pin is used to control the brightness of the LED panel, by giving a PWM Bearing Capacity Theories (17)
pulse to it.
C Based Project (18)
▪ These are called multiplex select pins. They take digital input to select any
C++ Based Projects (5)
multiplex rows
Civil Projects (123)
▪ These are the regular shift register control pins
Co�erdams (3)
▪ This pin is for data input in PWM form.
Computer Projects (24)

Conductor and Connection (1)


▪ duty scan type [one out of four LEDs on the module are driven by IC at one time]
Digital Electronics Projects (28)
▪ Brightness:3500nits to 4500nits
Diode (6)
▪ Max Power Consumption: 20W
Earth Pressure and Retaining Wall (19)
▪ DC 5V Voltage Input Easy Electronics Projects (22)
▪ IP65 Waterproof Electrical Projects (9)

▪ High contrast ratio and viewing angle Electrical Symbols (3)

▪ 1W pixel con�guration Electronic Game and Fun Projects (12)

Electronic Measurement and Tester


Circuit (33)
▪ Input voltage: 5V
Electronic Timer Circuit (10)
▪ Max current input: 4A
Electronic Tutorial (102)
▪ Average power consumption: 8W-10W
Electronics and Communication
▪ Colour: Red Projects (23)

▪ Pixel Pitch: 10mm Electronics Design (57)

▪ Led Pixel Size: 32X16 = 512 Electronics Projects (440)

Electronics Troubleshooting (16)


Interfacing P10 LED Display with Arduino:
Field E�ect Transistors (3)

Geotechnical Process (7)

IC 741 Based Projects (36)

IOT Projects (7)

Led Projects (8)

Machine Foundation (11)

Mat Foundation (5)

Microcontroller Projects (28)

Microprocessor Program (2)

Microwaves (22)

Motor Driver Circuit (11)

Nonsinusoidal Generator (5)

Numerical method Lab Manual (1)

Op amp Tutorials (10)

Oscillators and Signal Generators (2)

PIC Projects (4)

Piers and Caissons (7)

Piled Foundation (15)

Figure 2: Wiring Diagram of interfacing P10 display with Arduino power supply (48)

Python (1)

RFID Projects (3)

Robotics (5)

Sheet Pile Wall (6)

Site Investigation (20)


Spread Foundation (9)

Switching and Controlling (41)

Tech (11)

Top 10 Electronics Projects (2)

Transistor Ampli�ers (22)

Uncategorized (2)

Veri�ed Preampli�er Circuit (16)

Connect the P10 LED Display with Arduino according to the pin con�guration shown in
the above �gure. Here P10 Display module consists of 16 pin connectors (DMD Pins). So Top Posts & Pages
connect DMD-pins 3, 5, 7, 9, 11, 13 & 15, to a ground pin of the Arduino board (as shown
in the �gure). Then connect DMD-Pin 1 ( pin) to D9 (PWM pin of nano). Similarly, 50+ Top 555 Timer IC
connect DMD-Pin 2 ( ) to D6 (PWM pin of nano) and DMD-Pin 4 ( ) to D7(nano). Lastly Projects
connect DMD-Pins 8,10 &12 to nano pins D13, D8 & D11 for and inputs
Arduino PH Meter using PH
respectively. DMD-Pins 6,14 &16 are kept open, as shown in Figure 2.
Sensor

Components required for Interfacing P10 LED Display with 12v, 7Ah Smart Battery

Arduino: Charger with PCB Diagram

▪ Jumper wires Interfacing P10 LED Display


with Arduino
▪ Arduino Nano

▪ P10 display Analysis of Common Emitter


Ampli�er using
▪ 5V @ 4A DC supply h-parameters

Op-amp | Block Diagram |


Introduction to FONT used in the P10 Display module:
Characteristics of Ideal and
While displaying in P10 we can choose from multiple libraries according to our needs. For Practical Op-amp
this article, we only use 3 font types out of many, which are:- “ ”,
“ ” and “ ”. Approximate h-model of CE,
CB, CC ampli�er
▪ The font <SystemFont5x7>, lets you display characters with a simple design and
each character consumes 5-row LEDs & 7-column LEDs (i.e. 35 LEDs; Font width=5; Operation Ampli�er 741
Font height=7). This font type allows you to display a series of characters in two rows Based Projects
(i.e.over the whole 32X16 P10 display module).
Electronics Washing
▪ Similarly <Arial_black_16>, lets you display characters with the Arial_black style which Machine Control | Circuit
is part of the Arial font family with a larger character set. In this font type, each Diagram
character consumes 10 row LEDs by 16 column LEDs (i.e. 160 LEDs; Font width=10;
Listening Bug Using op-amp
Font height=16). This font type allows you to display only a single row worth of
741
characters since the P10 module consists of only 16 LEDs vertically.

▪ Lastly, the font <Arial14> displays characters in the most widely known Arial Font
style. This style is a tiny bit smaller in size than the <Arial_black_16>. It consumes 10
row LEDs by 14 column LEDs (i.e. 140 LEDs; Font width=10; Font height=14). Choosing
this font type only allows a single row of characters similar to the Arial_black_16 font
style.

First, you need the libraries required to operate and communicate with the display
module. The stable ones are <DMD.h> and <SPI.h> which ensure smooth coordination
between the Arduino controller and the display module. Another library called
<TimerOne.h> is needed provides interrupts.

Now, you need to include their libraries to use the font style “SystemFont5x7” or any
other font style while displaying characters. To use the SystemFont5x7 font style you
need to download the SystemFont5x7.h library �le. Similarly, for “Arial_black_16” and
“Arial14”, you need to download the Arial_black_16.h and Arial14.h library �les.
Library link: DMD library includes DMD.h, SystemFont5x7.h, Arial_black_16.h, Arial14.h

Software Code of Interfacing P10 LED Display with Arduino:


Before displaying in P10 you need to know, how many characters can a module �t at
once? (depending on font style). Also while passing strings from Arduino to P10, some
garbage value might also be included. So to avoid any unnecessary hassle, you can
convert the strings you want to display into an array of characters. For this, you de�ne a
char array “ ” and string variable “ ” as shown in below sample code. This step will
make sure that all characters are displayed without errors and with appropriate length.

1 #include <SPI.h>
2 #include <DMD.h>
3 #include <TimerOne.h>
4 #include "SystemFont5x7.h"
5 #include "Arial_black_16.h"
6 #include "Arial14.h"
7 #define DISPLAYS_ACROSS 1
8 #define DISPLAYS_DOWN 1
9 String str;
10 char b[8];
11 DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
12
13 void ScanDMD(){
14 dmd.scanDisplayBySPI();
15 }
16
17 void setup() {
18 Serial.begin(9600);
19 Timer1.initialize(5000);
20 Timer1.attachInterrupt(ScanDMD);
21 dmd.clearScreen(true);
22 }
23
24 void loop()
25 {
26 int slen = 0;
27 dmd.clearScreen( true );
28 /*--------------------------------------- Display using SystemFont --------------------------
29 dmd.selectFont(SystemFont5x7);
30 str="HELLO";
31 slen = str.length()+1;
32 str.toCharArray(b,slen);
33 dmd.drawString(1,0,b,slen,GRAPHICS_NORMAL);
34 str="WORLD";
35 slen= str.length()+1;
36 str.toCharArray(b,slen);
37 dmd.drawString(1,8,b,slen,GRAPHICS_NORMAL);
38 delay(4000);
39 dmd.clearScreen( true );
40 delay(2000);
41
42 /*--------------------------------- Display using Arial_black_16 ----------------------------
43 dmd.selectFont(Arial_Black_16);
44 str="BEP";
45 slen = str.length()+1;
46 str.toCharArray(b,slen);
47 dmd.drawString(2,1,b,slen,GRAPHICS_NORMAL);
48 delay(4000);
49 dmd.clearScreen( true );
50 delay(2000);
51
52 /*---------------------------------- Display using Arial14 ---------------------------------
53 dmd.selectFont(Arial_14);
54 str="BEP!";
55 slen = str.length()+1;
56 str.toCharArray(b,slen);
57 dmd.drawString(4,1,b,slen,GRAPHICS_NORMAL);
58 delay(4000);
59 dmd.clearScreen( true );
60 delay(2000);
61 }

The output of the Program:


Figure 3: “HELLO WORLD” using <SystemFont5x7.h>

Figure 4: “BEP” using <Arial_black_16.h>

Figure 5: “BEP!” using <Arial14.h>

How to display Characters (Static and Running)


After completing the hardware interface between P10 and Arduino, we will be creating a
program to display a static and running message in the P10 display. Below is the stepwise
explanation of the program code.

▪ Include necessary libraries:

Some important libraries such as <SPI.h> for Serial communication, <DMD.h> for P10
display operations and <TimerOne.h> for interrupts tasks need to be included in the
program. Include the display font library <Arial_black_16.h> and <SystemFont5x7.h> for
large and small sized text displays.

▪ De�ne necessary variables:

Initialize a char type array “ ” and string variable “ ” as shown in code. Then de�ne the
number of modules we have to display_across and display_down. In our case we are
using only one module, so Display_accross and Display_down value will be 1. Lastly,
initialize an object of the DMD class to carry out display operations with parameters:
“ and ”.

▪ De�ne Scan_module() function:

function will check for any incoming data from the Arduino side through
the SPI Terminals. If yes, then it will trigger an interrupt pin for certain events.

▪ Initialize the Setup function:


Inside setup(), initialize the timer and attach the interrupt to the function scan_module()
with 5000-microsecond intervals to initiate the ScanDMD call. Also, a time period longer
than 5000 (5ms) can cause a �icker in the display. Here dmd.clearScreen(true) is used to
set all pixels o� initially to clear the display board.

Then �nally we utilize the string variable “ to store some string and convert it to byte
form using the function and store it in a byte type array . Then
select a font using and display the contents using as shown
above. Lastly, clear the screen after a 1-sec delay using

Code for Static Character


1 #include <SPI.h>
2 #include <DMD.h>
3 #include <TimerOne.h>
4 #include "SystemFont5x7.h"
5 #include "Arial_black_16.h"
6 #include "Arial14.h"
7
8 char b[8];
9 String str;
10 #define DISPLAYS_ACROSS 1
11 #define DISPLAYS_DOWN 1
12 DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
13
14 void ScanDMD(){
15 dmd.scanDisplayBySPI();
16 }
17
18 void setup() {
19 Serial.begin(9600);
20 Timer1.initialize(5000);
21 Timer1.attachInterrupt(ScanDMD);
22 dmd.clearScreen(true);
23 }
24
25 void loop()
26 {
27 int slen = 0;
28 dmd.selectFont(SystemFont5x7);
29 str="HELLO";
30 slen = str.length()+1;
31 str.toCharArray(b,slen);
32 dmd.drawString(0,0,b,slen,GRAPHICS_NORMAL);
33 str="WORLD";
34 slen= str.length()+1;
35 str.toCharArray(b,slen);
36 dmd.drawString(0,8,b,slen,GRAPHICS_NORMAL); //(x, y, value, length,type)
37 delay(4000);
38 dmd.clearScreen( true );
39 }

All these declaring, de�ning, and “void setup()” part of the code for scrolling action is
identical to the above static ones. So, to display a sliding character only the code in “void
loop()” needs some changes. Here we use two new function of DMD library called
and . Also, is used to determine the speed of
scrolling.

The function starts drawing the scrolling text onto the DMD. The text is
read from an array of char “ ”. The drawMarquee function is also initialized with the
length of the text message, and with the position from where the message is to appear.
In this example, scrolling will start from the right side of the DMD, (i.e. the LED at the 31st
column and 1st row). Whereas, the function is responsible for updating the
texts. Its parameters control the direction of the scroll. With (-1,0), the text will move 1 –
LED to the left and 0 – LED vertically. But, If you want to move the text toward the right,
use (1,0).

Code for Running Character


1 #include <SPI.h>
2 #include <DMD.h>
3 #include <TimerOne.h>
4 #include "SystemFont5x7.h"
5 #include "Arial_black_16.h"
6 #include "Arial14.h"
7
8 char b[8];
9 String str;
10 #define DISPLAYS_ACROSS 1
11 #define DISPLAYS_DOWN 1
12 DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
13
14 void ScanDMD(){
15 dmd.scanDisplayBySPI();
16 }
17
18 void setup() {
19 Serial.begin(9600);
20 Timer1.initialize(5000);
21 Timer1.attachInterrupt(ScanDMD);
22 dmd.clearScreen(true);
23 }
24
25 void loop()
26 {
27 int slen=0;
28 dmd.selectFont(Arial_Black_16);
29 str = "BestEngineeringProject.com";
30 slen = str.length()+1;
31 str.toCharArray(b, slen );
32 dmd.drawMarquee( b, slen, (32*DISPLAYS_ACROSS)-1 ,1);
33 unsigned long timing = millis();
34 boolean flag = false;
35 while (!flag)
36 {
37 if ((timing + 70) < millis())
38 {
39 flag = dmd.stepMarquee(-1, 0);
40 timing = millis();
41 }
42 }
43 }

Arduino Projects Electronics Projects

 Capabilities and Limitation of Sample and Di�erent Ways Of Joining Metals Without
Hold Circuit Welding 

LEAVE A COMMENT

Comment

Name
Email

Website URL

Notify me of follow-up comments by email.

Notify me of new posts by email.

ADD COMMENT

Recent Posts

Frequency Shift Keying Demodulator Circuit


Light-Sensitive Switch Circuit Using Op-Amp
741: A Comprehensive Guide
Ripple-Free Short Circuit Protected Variable
Power Supply Circuit Design
Transistor and Diode Tester using 555 IC
AC Mains Voltage Indicator Circuit

Copyright © All rights reserved

You might also like