Design of LED dot matrix screen based on Bluetooth technology

Publisher:HeavenlyLoveLatest update time:2012-07-05 Source: 中国LED网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

This paper designs a dot matrix LED text display screen that is easy to update, expandable, and low-cost. The ways to reduce costs are: ① Use the Bluetooth data transmission function of mobile phones that almost everyone has to update the LED display content, eliminating the cost of professional host computer software and control cards, and making the operation simpler; ② The single display content is 5 to 30 Chinese characters or English letters. Because the display content is small, the expansion circuit can be simplified.

1 System Design

1.1 System composition

The system consists of a smart phone with Bluetooth function and an LED display screen. The LED display screen consists of a single-chip microcomputer, an LED dot matrix module, a font chip, a Bluetooth receiver module, a 5V switching power supply and a 3.3V voltage regulator circuit, as shown in Figure 1. The system works as follows: The user edits the "data" through the notepad of the smart phone and sends it to the Bluetooth receiver module on the display screen via wireless Bluetooth. The main control single-chip microcomputer reads the "data" received by the Bluetooth receiver module and processes it. The "data" consists of "control commands" and "display content", and the two parts of data are separated by a custom feature character. The "control command" is used to set the brightness of the display screen, the speed and direction of the display content; and the single-chip microcomputer finds the corresponding 32-byte display code in the font chip according to the character code of the received "display content" and sends it to the dot matrix screen for display.

Figure 1 System composition

Figure 1 System composition

1.2 Working principle of LED dot matrix screen

LED dot matrix display screen can be composed of several LED unit boards according to display needs. The general LED unit board is composed of 2-bit 16 × 16 dot matrix LEDs with a size of 160*320mm2. The working principle of the unit board is as follows.

Each board has 16 rows and 32 columns, and the data is displayed using the traditional row-column scanning method. Usually, in order to reduce flicker and increase the scanning speed, 1/4 scanning is used, that is, 16 rows are divided into 4 4-row groups, and the corresponding rows in the same sequence of 4 4-row groups are selected at the same time each time. In this way, 16 rows of scanning display can be completed by scanning 4 times. Among them, the column control is undertaken by 74HC595, and there are 16 pieces on each unit board, and each piece controls 4 rows and 8 columns of dot matrix small units. The row control is undertaken by a decoder 74LS138, which selects the corresponding rows in the same sequence of 4 4-row groups of the unit board each time. In order to ensure normal current drive (brightness), the output of 74LS138 is driven and amplified by AMP4593. Each unit board has 4 pieces, and each piece drives 4 rows. 16 74HC595s are connected in cascade mode. Since 4 74HC595s are required for every 4 rows and 32 columns, 16 rows and 32 columns are 16. Let the first 4 rows of 4 74HC595s be numbered 1, 2, 3, 4, and the second 4 rows of 4 74HC595s be numbered 5, 6, 7, 8, and so on. The data output end of each piece is connected to the input end of the next piece. The data is serially input from the input end of the first piece. Under the action of the shift pulse, the data is shifted in one by one. After 8 × 16 pulses, the first data shifted in is shifted to the lowest bit of the 16th piece (also the output end of the piece). After all the data are shifted in, a complete content of a board can be displayed. According to this rule, the display software design can be carried out. If the number of words displayed is large, the number of spliced ​​LED unit boards will be large, and the number of shift pulses required to display a complete content of a screen will be large. This display mode requires the main control microcontroller to have a high instruction execution speed, otherwise there will be a flickering feeling. The schematic diagram of the dot matrix unit board is shown in Figure 2.

Figure 2 Schematic diagram of dot matrix unit board

Figure 2 Schematic diagram of dot matrix unit board

2 Selection of main system modules and circuit design

2.1 Main control chip

2.1.1 Chip selection

In order to meet the display of LED display screen and the expansion of multiple boards, the system main control microcontroller is required to have a faster running speed; a larger storage space is used to store display data, so the C8051F410 of Silicon Corporation of the United States is selected. This chip is a high-performance product, and the FTQP-32 package (9mm*9mm) greatly reduces the volume; due to the use of a streamlined instruction structure, each machine cycle only requires one clock cycle, and the operation speed is greatly accelerated. If the internal clock of 24.5MHz is used, its running speed is about 24 times that of the ordinary 8051 microcontroller working at 12MHz clock; the chip has rich internal resources, built-in watchdog, and can be connected to the debugger through the JTAG interface to facilitate hardware online debugging; the chip contains UART, SPI, I2C and other communication interfaces, which are convenient for connection with peripheral chips; 4 timers/counters make programming more convenient; the built-in 16K/32KFLASH can store about 1K Chinese characters.

2.1.2 Minimum system circuit design

The system has no special requirements for the accuracy and temperature stability of the microcontroller clock. The built-in clock oscillator of the C8051F410 microcontroller can be used directly without an external oscillator. When using it, it should be noted that the chip working power is introduced from the Vregin pin (+ 3.3V), VDD is the internal reference voltage output pin, and VIO is the power input pin when the I/O port is used as a digital pin. When designing the circuit, filtering and decoupling capacitors (4.7μ and 104p) must be placed close to these three pins. P1.0~P1.3 are the control lines CLK, SCLK, R and OE of the display; P1.7, P0.0~P0.2 are the control lines of the font chip, using the SPI interface; P2.0 and P2.1 are the line scan control lines A and B of the display; P0.4 and P0.5 are serial communication lines, connected to the Bluetooth module. These 12 pins need to be configured as digital pins. The minimum system circuit is shown in Figure 3.

Figure 3 C8051F410 MCU minimum system

Figure 3 C8051F410 MCU minimum system

2.2 Bluetooth module

2.2.1 Module selection

The requirements for selecting Bluetooth modules are: cheap, small, and easy to use. There are many Bluetooth module products that meet the requirements. The design uses the GC-02 Bluetooth module produced by Nanjing Guochun Electric, which is a high-quality CLASS2 Bluetooth module. This Bluetooth module has an object exchange protocol (OPP) file receiving function. As long as it is powered on, it can be recognized by the mobile phone Bluetooth, and can successfully pair and establish a connection to receive files transmitted by the mobile phone Bluetooth.

The GC-02 Bluetooth module has 29 pins and can communicate with the microcontroller through the SPI interface or the UART interface. The microcontroller of this system selects the UART method to communicate with the GC-02. When the Bluetooth module is in standby mode, the paired mobile phone sends files to the Bluetooth module. The unpaired mobile phone needs to be paired first, and the pairing can be done by entering the correct PIN code (i.e. pairing password). The factory PIN code of this Bluetooth module is "1234", and its PIN code can be modified by sending instructions to the Bluetooth module.

2.2.2 Circuit Design

The microcontroller communicates with the serial port (pins 12 and 13) of the Bluetooth module GC-2 through pins P0.4 and P0.5, and the other functions of the Bluetooth module are not used. The connection between the microcontroller and the Bluetooth module is shown in Figure 4.

Figure 4 Connection diagram between MCU and Bluetooth module

Figure 4 Connection diagram between MCU and Bluetooth module.

2. 3 Font Chip

2.3.1 Chip Selection

Since the displayed content needs to be changed frequently during use, the method of using text "modulus" to obtain display data is obviously not feasible. Storing the font library in the display circuit or using a font library chip is a feasible solution. The design uses a font library chip and selects the GT21L16S2W standard Chinese character font chip.

GT21L16S2W is a Chinese character library chip with 11 × 12 dot matrix and 15 × 16 dot matrix, supporting GB2312 national standard simplified Chinese characters (including the legal authorization of the National Standardization Committee), ASCII characters and GB2312 and Unicode encoding conversion table. The arrangement format is horizontal and horizontal. According to the address of the character dot matrix in the chip, the character dot matrix information can be continuously read from the address.

Taking 15X16 dot matrix Chinese characters as an example, Chinese character information requires 32 bytes (BYTE 0-BYTE31) to represent, and the dot matrix data is arranged horizontally. Its specific arrangement structure is shown in Figure 5. Each Chinese character is stored in the chip in the form of a Chinese character dot matrix font. Each dot is represented by a binary bit. The dot with 1 can display a bright spot on the screen when displayed, and the dot with 0 is not displayed on the screen. The dot matrix arrangement format is horizontally arranged: that is, the high bit of a byte represents the dot on the left, and the low bit represents the dot on the right. After a row of dots is filled, the next row is arranged. In this way, the dot matrix information is used to display directly on the display according to the above rules, and the corresponding Chinese characters will appear. 15X16 dot matrix Chinese characters are stored in the chip address range of 00000H ~3B7BFH. As long as the internal code of the Chinese character is known, the first address of the Chinese character display data can be calculated.

Figure 5 Chinese character dot matrix arrangement format

Figure 5 Chinese character dot matrix arrangement format

2.3.2 Interface circuit

The functions of each pin of the font chip GT21L16S2W are as follows: Pins 1, 2, 5, and 6 are SPI interfaces, where: 1 (CS#) is chip select input, 2 (SO) is serial data output, 5 (SI) is serial data input, and 6 (SCLK) is serial clock.

Pin 7 (HOLD#) is bus suspend, which can be used to suspend data transmission during the period when the chip select signal is valid. The microcontroller communicates with the font chip through pins P0.0 ~ P0.2 and P1.7 to read the display data. The HOLD# pin is suspended, and the Vcc working power supply is 3.3 V. The connection between the microcontroller and the font chip is shown in Figure 6.

Figure 6 Connection diagram between MCU and font chip.

Figure 6 Connection diagram between MCU and font chip.

2. 4 Connection between LED dot matrix screen and microcontroller

The dot matrix screen uses the most widely used P10 single red outdoor unit board on the market. This module has the characteristics of high stability, high brightness, uniform color, etc. The scanning mode is 1/4 scan, the control method is simple, which is conducive to optimizing software design. The dot matrix unit can be pieced together as needed, and it is flexible. The connection between the LED dot matrix screen and the single-chip microcomputer is shown in Figure 7. Among them, OE (P1.3) is the enable signal, connected to 74HC138, used for brightness control, and can also be used for display screen blanking. Just adjust its duty cycle to control the change of brightness. ABCD is the line scan signal, A is the lowest bit. If all ABCD signals are used, the maximum range of the control scan is 16 lines. In 1/4 scan, only AB (P2.0 and P2.1) signals are needed. When the line control signal is abnormal, there will be display dislocation, highlight or image overlap.

CLK (P1.0) is a shift pulse, each pulse shifts data in or out one bit. When the clock signal is abnormal, the whole board will be displayed in a disorderly manner. STB (P1.1) is a latch signal, which latches the data in the shift register and displays the data content by lighting the LED through the drive circuit. RI (P1.2) is the input terminal of the display data.

2.5 Power module

The power module consists of a 5 V high-power power supply and a + 3.3 V low-power voltage regulator circuit. The former provides power to the LED screen, and the latter stabilizes the 5V voltage into 3.3 V and provides it to the microcontroller, Bluetooth module and font module. Here, the ASM1117-3.3 chip is selected. The input rated power of the commercially available LED board is about 190 W/m2, the area of ​​each unit board is 160*320 mm2, and the maximum operating current is about 2 A (the power consumption is 10 W at 5 V working voltage). The power of the switching power supply can be selected according to the required area of ​​the LED display. The commonly used switching power supply, with dual MOS tube output, enhanced heat sink and filter capacitor coil, can ensure pure and sufficient current output.

2.6 System overall circuit

This system uses the single-chip microcomputer C8051F410 as the MCU, and the peripheral circuits include a Bluetooth module, a font chip, an LED dot matrix screen and a power module. The system circuit principle is shown in Figure 8.

Figure 8 System Schematic Diagram

Figure 8 System schematic diagram.

3 System Software Design

The initialization of the microcontroller includes: ① Clock initialization, select the 24.5MHz internal clock on the chip. ② Pin configuration: Configure P0. 0 ~ P0. 2 as SPI interface (3 lines) to communicate with the font chip; Configure P0. 4 and P0. 5 as serial ports to communicate with the Bluetooth module; Configure P1. 0 ~ P1. 3, P2. 0 and P2. 1 as digital I/O to control the display screen.

③ Initialize interrupts, timers/counters and FLASH related registers. The system software flow is shown in Figure 9.

Figure 9 System software flow

Figure 9 System software flow

After initialization, the system will actively read the data in the specified address range of FLASH, and convert the data (Unicode character set) to obtain the address code of the GB2312 character set code corresponding to the Unicode data in the font chip, and then send the address code to the font chip to extract the GB2312 character set corresponding to the address, and then convert the GB2312 character set code through the font chip to extract the corresponding 16*16 dot matrix code, and send the code to the microcontroller through the SPI port, and then the microcontroller sends the dot matrix code to the dot matrix screen and controls the dot matrix screen to display the data.

Under normal working conditions, when the mobile phone Bluetooth is paired with the system Bluetooth module, the mobile phone can only be paired successfully after entering the correct PIN code. After the pairing is successful, if the mobile phone uses the notepad software to send data via Bluetooth, the Bluetooth module will receive the data and send it out through the serial port. At this time, the microcontroller receives the data. If the start bit of the valid data is recognized as the flag bit "#", the system will consider the command to be a control command, that is, to control the brightness, speed, and moving direction of the LED display. The format of the control command is defined independently. For example, "#35 left" means: "#" is the control flag, "3" controls the brightness (the control range is 0 - 9, the larger the value, the higher the brightness), "5" controls the speed (the control range is 0 - 9, the larger the number, the slower the speed), and "left" is the direction control bit (left is the moving direction to move to the left, right represents moving to the right, up represents moving up, and down represents moving down). If the start bit of the valid data is not "#", then the data will be assumed to be the new content to be displayed by the LED, and the system will store the data in the specified FLASH address range in sequence, and the new data will be displayed on the screen after reset. It should be pointed out in particular that in order to ensure the reliability of the display screen, the "feeding dog" parameter should be set at an appropriate position in the display cycle program.

4 Conclusion

The system achieves the purpose of updating the display content through the mobile phone, which is convenient and fast. After a group of users, the display performance and control performance are relatively stable. However, in the actual use process, there are also unresolved problems: ① Some mobile phones do not support the Unicode character set format. ② This design is limited to the transmission of display data edited by the smart phone through the notepad, and the notepad editing software used by different mobile phones is not fully compatible. This design is based on the Nokia mobile phone software.

Reference address:Design of LED dot matrix screen based on Bluetooth technology

Previous article:On Semi NCL30051 60W LED Driver Solution
Next article:Detailed interpretation and analysis of the driving and application of white light LED

Recommended ReadingLatest update time:2024-11-16 17:53

RGB LED drivers enable colorful lighting designs
Next-generation architectural and decorative lighting can achieve a fuller range of colors by properly combining the outputs of red, green, and blue LEDs. In such high-brightness, multi-LED series applications, the typical forward voltage drop may reach 22V to 36V, and the absorption current is 1A to 2A. The LED
[Power Management]
RGB LED drivers enable colorful lighting designs
LED and laser printing technologies meet on a narrow road
LED, also known as light-emitting diode technology, is one of the earliest and most advanced imaging technologies in the world. Printer manufacturers led by OKI have promoted the maturity of LED technology in printing and imaging applications, and it is called the two cornerstones of digital printing and imaging tog
[Power Management]
On Semi NCL30051 60W LED Driver Solution
The NCL30051 from On Semi is a peak current controlled fixed off time buck controller designed for LED driver applications. It has adjustable off time, 250mA source/500mA sink peak drive capability, ±3.2% current detection accuracy at 25°C, 3.3V level dimming input, thermal shutdown, overcurrent protection and maximum
[Power Management]
On Semi NCL30051 60W LED Driver Solution
STM8 study notes---light up the LED
There are generally three steps to operate a single-chip microcomputer: 1. System clock selection. 2. Single-chip microcomputer peripheral initialization. 3. Main program writing. To light up the LED light, follow these steps. First select the system clock, open the STM8S Chinese reference manual, and find the clock
[Microcontroller]
Analyze the factors affecting LED quality
Most designers think that all LED products are of the same quality. However, there are many manufacturers and suppliers of LEDs, and Asian manufacturers supply low-cost LEDs to the world. Surprisingly, only a small number of these manufacturers can produce high-quality LEDs. For applications that are only used for simp
[Power Management]
Analyze the factors affecting LED quality
Measurement of junction temperature of LED light strip bulbs
The LED light bar can achieve 360-degree light source without adding lens, which makes people feel like returning to the traditional incandescent lamp.    LED light bar has many application advantages, which has created a big whirlwind in the market and is being quickly accepted by users. LED light bar combines the tr
[Power Management]
Measurement of junction temperature of LED light strip bulbs
High-efficiency LED lighting power supply design
Standard electric lights are going through a revolution. In order to conserve energy and combat global warming, some states in the United States and other countries have begun to ban the use of inefficient incandescent light bulbs. Various new technologies are being used to replace incandescent bulbs, with compact
[Power Management]
High-efficiency LED lighting power supply design
Using common DC/DC chips to make LED constant current drive circuit
In the past month, I have read a lot of advertisement-style LED driver IC introductions, and I feel that there is nothing new, that is, the IC is not made into a real LED dedicated driver, and there is no special advantage. In fact, every DC/DC IC (whether step-up or step-down) can be connected to a constant current L
[Power Management]
Using common DC/DC chips to make LED constant current drive circuit
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号