LED display screens based on mobile data use the GSM/GPRS/CDMA/PHS network, which has the widest coverage and is the most stable. They can update the content of LED display screens in real time and conveniently through short messages in any place with mobile network coverage, effectively solving the trouble of updating LED display screen data and the difficulty of being unable to monitor, and reducing the workload of management departments. With the development of mobile communication technology and the further promotion of the application scope of LED display screens, this kind of LED display screen based on mobile data has great application value.
As an information display device, LED electronic display screens are mainly used to play advertisements, news, notifications, weather forecasts, time, stock information, flight information, ticket information, etc. They are increasingly used in bus stops, traffic intersections, buses, ticket halls, business halls, waiting halls, securities companies, airports, sports, meteorology, traffic control and other places, and have broad application prospects.
However, traditional LED display screens use wired communication to transmit data, which is severely restricted by geography and wiring. If a large number of LED display screens are working at the same time, it becomes very troublesome to transmit updated data for the LED display screens, and in the absence of other additional control devices, the management department of the LED display screen cannot monitor the actual operation of the LED display screen.
1 System composition and principle
This mobile data-based LED display screen system consists of four parts: GSM wireless transceiver module, MCU (single-chip microcomputer), LED drive circuit, and LED display screen. The principle block diagram is shown in Figure 1.
The control center of the system is MCU (single-chip microcomputer). This design uses the AT89C51 chip of ATMEL Company. It controls the GSM wireless module to send and receive mobile data through the serial port, and controls the LED drive circuit and display screen to display the content to be displayed in an appropriate way. The GSM wireless transceiver module uses Siemens' TC35i, equipped with a common SIM card on the market. It is responsible for receiving the display content sent by the legal user through the mobile network, and transmitting the status data of the LED display screen back to the user through the mobile network. The LED drive circuit and display screen are basically the same as the traditional method [1, 2]. It uses an LED unit board with a "16 PIN 08 interface" and can be spliced into the required screen size.
When using it, the user only needs to edit the content that he wants to display on the LED screen in the SMS format on the mobile phone or computer, and then send it to the number corresponding to the SIM card inserted in the TC35i module like a normal SMS. After the TC35i module with SIM card receives the sent SMS, it first checks whether the sender of the SMS is a legal user. If the user is not a legitimate user, TC35i discards the message; if the user is a legitimate user, it takes out the content to be displayed and controls the LED screen to display the information in the required manner. At the same time, TC35i can send the status data of the LED screen to the legitimate user in the form of a text message. In this way, the two-way real-time transmission of display content and status data is achieved using the mobile communication network.
Considering the simplicity, this article uses a 32×64 dot matrix LED unit board to display 16×16 dot matrix Chinese characters as an example to illustrate the system principle. As for larger LED screens, just cascade multiple similar LED unit boards in sequence through the "16 PIN 08 interface".
2 Hardware Implementation
2.1 Hardware interface circuit between TC35i module and MCU
The transmission and reception of mobile data in this system are all carried out by the TC35i module. The TC35i module integrates RF circuit and baseband processing, and can work in two frequency bands: GSM 900 MHz and DCS 1 800 MHz. It uses RS232 serial port to connect to MCU (single-chip microcomputer). Its RS232 data interface complies with GSM07.05 and GSM07.07 specifications and uses standard AT command set. The module is connected to the antenna through a 50 Ω antenna connector, and also realizes the connection of power supply and SIM card holder through a 40-pin ZIF connector, as well as the bidirectional transmission of commands, data, voice signals and control signals [3].
Figure 2 shows the key parts of the MCU and TC35i interface.
It should be noted that after the system is powered on, in order for TC35i to enter the working state, a low pulse with a delay of more than 100 ms must be added to the IGT pin, and the level drop duration cannot exceed 1 ms. After startup, IGT should maintain a high level (3.3 V). When driving IGT, the TC35i power supply voltage cannot be lower than 3.3 V, otherwise TC35i cannot be activated. In addition, the SIMPRES pin of the ZIF connector is used to detect whether the SIM card is properly inserted. If the connection is correct, the SIMPRES pin outputs a high level, otherwise it is a low level.
2.2 Microcontroller and LED display driver circuit
Since only the internal code of Chinese characters is obtained through mobile network short messages, and the LED screen display requires the dot matrix information of Chinese characters, the GB2312 Chinese character dot matrix font library must be stored in this system. In addition, a large amount of display data needs to be stored when the LED screen is displayed, so 64 KB of RAM (62256) and 512 KB of Flash memory (29F040) are expanded on the periphery of the single-chip microcomputer AT89C51. Among them, 29F040 stores the dot matrix font library (HZK16, ASC16) and the Unicode to GB2312 code table, and 62256 is used as display cache. After receiving the short message, the single-chip microcomputer first converts the information to be displayed into GB2312 code, and then reads the corresponding dot matrix information from 29F040 and stores it in 62256 when displaying.
The P1 port of the single-chip computer is used to control the display of the LED screen, where P1.0~P1.3 pins output 4-bit row selection signals A, B, C, D respectively, ABCD changes from 0000 to 1111, and scans 1~16 rows of dots line by line, and displays the display data in sequence; P1.4 pin outputs the shift clock signal SHCLK, so that the display data can enter the LED unit board in sequence; P1.5 pin outputs the latch signal STB, so that the display data can be output stably; P1.6 pin outputs the display data R1 of the upper 16 rows of the LED unit board, and P1.7 pin outputs the display data R2 of the lower 16 rows of the LED unit board.
When the 32×64 dot matrix LED unit board is used to display 16-dot matrix Chinese characters, it can display 2 rows, 4 Chinese characters per row. Its composition circuit is shown in Figure 3. The row drive circuit uses 2 74HC138 chips, and the column drive circuits of the upper and lower 16 rows use 8 74HC595 chips. The specific display adopts the dynamic scanning mode. The 4-bit row selection signals A, B, C, and D output by the single-chip microcomputer are decoded by two 74HCl38s and then scan the 1st to 16th rows and 17th to 32nd rows of the LED unit board row by row. The display data R1 of the upper 16 rows and the display data R2 of the lower 16 rows are respectively input into their respective 74HC595s under the action of the same shift clock signal SHCLK, and finally stably output at the parallel output end of the 74HC595 under the action of the common latch signal STB.
When actually making LED unit boards, 4953 chips are often added to the row scan lines output by the 74HCl38 chip to increase the driving capability.
3 Programming
3.1 Short message sending and receiving control
The microcontroller controls the TC35i module through AT commands to initialize and send and receive short messages. There are three modes for controlling short messages: Block mode, PDU mode and Text mode. The Text mode does not support Chinese, and the use of Block mode requires the mobile phone manufacturer to provide driver support. This system uses the PDU mode to receive and send short messages.
After the system is powered on, the TC35i is initialized first. The contents mainly include:
(1) Setting the short message center number AT+CSCA=“+8613800250500”
(2) Setting the short message format AT+CMGF=0
(3) Setting the location where the short message is stored AT+CPMS=“SM”
(4) Setting the SMS arrival notification AT+CNMI=1,1,0,0,1
During system operation, the microcontroller controls the TC35i module to receive or send short messages through AT commands. The command formats are as follows:
(1) Read short message command AT+CMGR=INDEX
(2) Send short message command AT+CMGS=<length><CR>.
(3) Delete short message command AT+CMGD=INDEX
(4) SIM card status query command AT^SCKS.
The received and sent short messages are processed by the microcontroller in the form of PDU string data. The PDU string consists of numbers "0" to "9" and letters "A" to "F" and is a hexadecimal number or a BCD decimal number. The PDU string contains not only the displayable message itself, but also a lot of other information, such as the SMS service center number, target number, reply number, encoding method and service time. The structure of the sent and received PDU strings is not exactly the same. The following two examples illustrate the structure and arrangement of the PDU string.
Example 1: Receiving. The SMSC number is +8613800-250500
, the other party's number is 13851872468, and the message content is "Hello!". The PDU string read by the MCU from the TC35 module is - 08 91 68 31 08 20 05 05 F0 84 0D 91 68 31 58 81 27 64 F8 00 08 30 30 21 80 63 54 80 06 4F 60 59 7D 00 21.
Example 2: Send. The SMSC number is +8613800-250500
, the other party's number is 13851872468, and the message content is "Hello!". The PDU string sent by the microcontroller to the TC35 module is - 08 91 68 31 08 20 05 05 F0 11 00 0D 91 68 31 58 81 27 64 F8 00 08 00 06 4F 60 59 7D 00 21.
3.2 LED display control program
The dynamic scanning function of LED is realized by using the timer 0 interrupt of the single chip microcomputer. The initial value of timer 0 is set to meet the interrupt of more than 1,000 times per second. Each interrupt scan displays a line, so that each line is scanned at least 60 times per second. According to the visual persistence effect of the human eye, a more ideal display effect is achieved.
Timer 0 interrupt service program:
void int0(void) interrupt 1
{
TR0=0; //Turn off timer T1
TL0=0x80; //Set the lower 8 bits of the initial value
TH0=0xff; //Set the upper 8 bits of the initial value
TR0=1; //Turn on timer T1
if(i<16) //i is the scanned line number, with a value of 0~15,
//Scan 1~16 lines in sequence
{
P1_5=0; //Turn off HC595 latch
while(z<8) //z is the number of the 8 HC595s above and below from
left to right, with a value of 0~7.
//Each HC595 goes through 8 cycles,
//realizes 8-bit data serial/parallel conversion
{ a=disp[i*2+k];//Get the 8-bit display data a of the upper 16 lines
b=disp[i*2+k+128]; //Get the 8-bit
//display data b
of the lower 16 lines
if(z%2!=0) k+=32-1;
else k++;
while(j<8) //Loop 8 times,
move a to the upper HC595 through P1.6 //pin,
//move b
to the lower HC595
through P1.7 pin
{
P1_4=0; //Pull P1.4 line low,
//generate shift pulse SHCLK
if((a&au)>0) //Fake serial port P1.6, output
the display data a of
the upper 16 lines
P1_6=1;
else
P1_6=0;
if((b&au)>0) //Fake serial port P1.7, output the next 16 lines
of //display data b
P1_7=1;
else
P1_7=0;
P1_4=1; //Set P1.4 port line high to generate shift
//pulse SHCLK
au=au<<1;
j++;
}
j=0;
au=0x01;
z++;
}
k=0;
z=0;
}
P1=(P1&0xf0)|i; //Generate 4-bit
//row scan signal ABCD
through P1.0~P1.3
P1_5=1; //Open 595 latch
i++;
if(i==16) i=0;
}
4 PROTEUS simulation implementation
This design uses a combination of Keil μVision2 and Proteus software to implement system software design and hardware simulation debugging.
Proteus software can simulate a variety of commonly used single-chip microcomputers including the 51 series and their peripheral circuits (such as LCD, RAM, ROM, keyboard, motor, LED, etc.), and is currently the best tool for simulating single-chip microcomputer peripheral devices. When simulating, you only need to draw the peripheral control and LED display drive circuits of the single-chip microcomputer in the Proteus software, then set the crystal oscillator frequency in the properties of the single-chip microcomputer chip, save the .HEX file generated by the source program written in Keil C51 to the chip, and then you can simulate and debug [4,5]. If there are hardware problems during the simulation process, they can be directly modified in Proteus ISIS, and if there are software problems, they can be directly modified in Keil μVision2. Satisfactory results can be obtained through the joint debugging of Keil and Proteus, avoiding the direct production of physical objects at the beginning, thereby shortening the system development cycle and reducing the development and debugging costs.
There is no GSM module TC35i in the Proteus software, but the serial port simulation function provided by Proteus can be used to realize the simulation debugging of the communication between the single-chip microcomputer and the TC35i module. The specific circuit is shown in Figure 4. The serial port (P3.0, P3.1 pins) of the single-chip microcomputer is connected to the TC35i module through the serial interface device COMPIM (the TC35i module is not drawn in the figure). First, use the virtual serial port software VSPDXP (Virtual Serial Port Driver XP) on the simulation host to set up two interconnected virtual serial ports COM3 and COM4, then start the "Serial Port Debugging Assistant" software, set the serial port to COM4, and select the baud rate to 4 800 b/s, then set the serial port of the COMPIM device in the Proteus simulation circuit to COM3, and also select the baud rate to 4 800 b/s. It must be noted that the baud rate setting values in COM3 and COM4 must be the same as the baud rate setting values in the microcontroller software. Here, they are all set to 4 800 b/s. Finally, run the Proteus simulation. At this time, you can use the "Serial Port Debug Assistant" software to simulate the data format output by TC35i to send data to the microcontroller. For example, under normal circumstances, if you send a hexadecimal data string "08 91 68 31 08 20 05 05 F0 84 0D 91 68 31 58 81 27 64 F8 00 08 30 30 21 80 63 54 80 06 4F 60 59 7D 00 21" from the "Serial Port Debug Assistant", the LED screen in the simulation circuit will display "Hello!". The AT command string sent by the microcontroller to the TC35i module will be displayed in real time in the receiving window of the "Serial Port Debug Assistant". If it is incorrect, you can use virtual instruments and charts such as the virtual serial port terminal in the Proteus software to perform code-level tracking and debugging.
After slightly modifying the successfully simulated circuit, the actual circuit was produced, and the program was solidified into the actual microcontroller chip. The actual running results obtained were completely consistent with the simulation results of Proteus.
The LED display screen based on mobile data uses the mobile communication network to update the content of the LED display screen in real time, avoiding the trouble of laying lines or building dedicated wireless transceivers in the original system, effectively reducing the system cost, and providing a new idea for the design of LED display screens far away from office places, especially outdoor. At the same time, in the process of developing this system, the powerful functions of the embedded system hardware and software design simulation platform Proteus software were fully utilized to carry out system virtual development, and actual production was carried out after success, which greatly improved the development efficiency and reduced the development cost, which has practical significance for the development of microcontrollers and embedded systems.
Previous article:Analysis of key technical indicators of LED tunnel lights
Next article:Simple identification of LED dead lights and solutions
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- How to monitor battery voltage with Arduino
- Image Algorithm Transplantation to DSP and Its Optimization Steps
- To advance in technology to a certain level, you just need to read more datasheets!
- Prize-winning live broadcast: Keysight’s Metaverse Test Series Seminar: Challenges in VR/AR Digital Interface Testing in Progress!
- 51 STM32 reference study manuals, one-click download without points!
- Microwave and RF Applications
- With the advent of 5G, what should we pay attention to when designing mobile phone antennas?
- 220V motor control board, discharges very slowly after power failure, and can still shock people after a long time
- [ESP32-S2-Kaluga-1 Review] 3. Physical buttons?