Design of remote control LED billboard based on single chip computer programming

Publisher:喜茶我要七分糖Latest update time:2012-09-07 Source: 西北工业大学航海学院 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

LED billboards are a kind of information display terminal for the public, which has a wide range of civil and commercial values. However, most of the information displayed on LED billboards is solidified in the system in advance, which loses the real-time nature of the information and is particularly inconvenient for users to change the displayed content; a few LED billboards are directly connected to microcomputers and use microcomputers to transmit information. This system solves the problem of information refresh, but due to the wired connection, the randomness of the system placement is restricted, especially for advertising companies facing multiple regions and multiple customers, which brings many inconveniences to the real-time update and maintenance of the system.

This paper proposes a new solution to remotely control LED billboards through a handheld transmitter, which realizes flexible changes in billboard content and display mode, and is very convenient to use. This solution uses a PC as the host computer, and both the transmitter and receiver are based on a single-chip microcomputer, which has a high performance-price ratio.

1 System Solution

1.1 Wireless remote control method

In order to achieve the purpose of remote control, the information to be displayed and the control commands must be transmitted to the display terminal LED screen through wireless transmission.

Commonly used wireless transmission methods are: sound waves (ultrasound), light waves (infrared) and radio waves. Considering that radio wave transmission has the following advantages:

1) The transmission distance is much longer than the other two;

2) There are a wide variety of components available, with good performance and low prices;

3) The technology is more mature.

Therefore, this system uses radio wave transmission, that is, information is transmitted between the handheld transmitter and the receiver by radio waves.

The performance of high-frequency wireless transmission and receiving modules directly affects the remote control distance and communication quality. After multiple investigations and demonstrations, this system uses an integrated transmission and receiving module. Its main advantages are good frequency consistency and no debugging required.

1.2 Data encoding method

Source encoding and decoding are crucial in wireless communications, as they can improve the reliability and effectiveness of signal transmission.

The signal to be transmitted in this system is the dot matrix data of the image, which is characterized by a large amount of data. The quality of data transmission and reception is directly related to the correctness of the information displayed on the display terminal. Billboards are placed outdoors and have many interference sources. Therefore, in the design of this system, the reliability and anti-interference of encoding and decoding are the key to the success of the design.

This system starts with wireless communication theory, conducts in-depth research on coding and decoding technology and its impact on the system, and after repeated comparisons, finally selects a coding and decoding chip suitable for this system. This module also uses code division multiple access technology for data coding and decoding, and can provide up to 531441 (312) address codes, which can completely eliminate any code address conflicts and interference from unauthorized coded data.

1.3 Image dot extraction and movement algorithm

The extraction of image dot matrix is ​​to use the algorithm to calculate the offset address in the image source database, so as to extract the corresponding dot matrix data and generate new display data. The correctness of the extraction algorithm is directly related to the correctness of the displayed image.

Image movement uses an algorithm to calculate the offset address where the next frame of data should be superimposed in the display dot matrix database. The correctness of the movement algorithm is directly related to the synchronization and on-site effect of dynamic images or text and background, which is particularly important for color displays.

1.4 System Block Diagram

The whole system consists of three relatively independent subsystems, namely the host computer, handheld transmitter, receiver and display screen system. Its structural block diagram is shown in Figure 1.

Figure 1 System overall structure diagram

The task of the host computer is to complete the input and editing of display information, and then convert the display information into dot matrix data corresponding to the LED display screen through the dot matrix extraction and movement algorithm, and transfer the dot matrix data to the handheld transmitter through the serial port of the PC.

The function of the handheld transmitter is to encode and modulate the dot matrix data sent from the host computer and the commands received on the panel keyboard, and forward them to the outdoor user group in the code division multiple access communication mode. The display format of the display screen can also be set and debugged on site.

The receiver amplifies, shapes, demodulates and decodes the received high-frequency signal, and then outputs it in parallel to the microcontroller, which identifies and transfers the received data, changes the display mode and content in real time, and drives the LED display.

2 Hardware Configuration

The system hardware mainly consists of three parts, namely the host computer, handheld transmitter, receiver and display module.

2.1 Host computer

The host computer is directly selected as a general-purpose PC, which is mainly due to the fact that the PC has strong command processing capabilities, rich standard application software, and highly versatile interfaces. The PC-based programs have strong compatibility and portability, and are cost-effective.

Since the host computer system needs to complete the input, editing and animation effect design of display information (images and text), in addition to the central PC, it must also be equipped with corresponding input peripherals, such as scanners, cameras, keyboards, etc. The network (INTERNET) interface is also indispensable, so that remote downloading of information and network management of the advertising system can be realized.

The composition of the host computer system is shown in Figure 2.

Figure 2: Configuration diagram of the host computer system

2.2 Handheld Transmitter

The transmitter consists of a single-chip microcomputer, a keyboard, an encoder, a transmitter, a serial communication interface and a UPS power supply system. Its structural block diagram is shown in Figure 3.

Figure 3 Transmitter structure diagram [page]

The function of the single-chip microcomputer is to temporarily store the image dot matrix transmitted from the PC or the image dot matrix in its own EPROM in the transmission buffer RAM, and then send it serially to the encoder according to the command of the keyboard.

The microcontroller used is ATMEL's 89S52, which has a fast computing speed, stable performance and low price.

The keyboard is used to set the image movement speed, display mode and communication protocol for transmission.

The encoder is one of the key components of this system and determines the reliability of communication. Its function is to receive the data from the microcontroller, encode it according to the set format, and then output it serially to the transmitter. After comparison, we chose a dedicated chip for code division multiple access serial encoding. The main features of this chip are CMOS technology, low power consumption, very high noise immunity (multi-frame synchronization), up to 12-bit 3-state address pins (up to 312 address codes can be provided), up to 6-bit data pins, a wide range of operating voltages, a single resistor oscillator, and the output form can be set to latch or transient.

The function of the transmitter is to modulate the coded digital signal onto a high-frequency carrier, and then transmit it after power amplification. It determines the wireless remote control distance of the handheld transmitter. This system uses an integrated module for modulation, driving and transmission. The module uses a surface acoustic wave resonator for frequency stabilization, SMT resin packaging, good frequency consistency, and no debugging. It is particularly suitable for multi-transmission and multi-reception wireless remote control and data transmission systems. However, the frequency stability and consistency of general LC oscillators are poor. Even if high-quality fine-tuning capacitors are used, it is difficult to ensure that the adjusted frequency point will not shift due to temperature changes and vibrations.

The UPS power supply is used to ensure that the data in the transmitting buffer RAM is not lost when the handheld transmitter is working outdoors. Because the amount of image dot matrix data that needs to be temporarily stored in the transmitting buffer is very large, if ultra-large capacity non-volatile memory such as E2PROM, FLASH and FRAM is used, it will not only be costly but also difficult to purchase, so the system uses ordinary RAM as the buffer register.

2.3 Receiver and Display Module

The receiver and display module consists of a receiver, a decoder, a single-chip microcomputer, a display driver, an LED screen and a power supply system. Its structural block diagram is shown in Figure 4.

Figure 4 Receiver structure diagram

The receiver demodulates the received high-frequency signal into a digital coded signal after amplification and shaping. We have selected the integrated receiving and demodulation module corresponding to the transmitting module. This series of modules adopts superheterodyne and secondary frequency conversion technology, and integrates all RF receiving, mixing, filtering, data demodulation, and amplification and shaping circuits in the module. The functions are highly integrated, eliminating the instability of RF frequency debugging and super-regenerative receiving circuits, and have the characteristics of high reliability, stable frequency, and no need to debug the receiving frequency.

The decoder decodes the digital coded signal and then outputs it in parallel to the single chip microcomputer. We use a dedicated chip for code division multiple access serial decoding corresponding to the encoding.

The single-chip microcomputer is responsible for the identification, storage and display mode conversion of received data. The single-chip microcomputer uses ATMEL's 89S52, which has good versatility and high cost performance.

The display module is used to display advertising information. The module includes an LED display screen and a display driver board, has its own display buffer, and drives the LED display screen in a dynamic scanning mode, with the characteristics of low power consumption and high brightness.

There are no special requirements for the power supply of the receiving display system, but a considerable margin must be left and attention must be paid to ventilation and heat dissipation, because many fires caused by LED billboards are caused by the power supply system.

3 Software Structure

The software of this system is mainly composed of three modules, namely the host computer master control program, the transmitter master control program and the receiver master control program.

3.1 Host computer control program

The host computer master control program actually includes the display information generation program, the display dot matrix conversion program and the serial port communication program, and is the most complex part of the three main control programs.

The display information generation program completes the input, editing and animation effect design of display images and texts. The program first combines the master control program under the DOS platform with the underlying communication software, and completes the user's multi-parameter input of source files, INTERNET interfaces and other input devices through serial and parallel communication ports. On this basis, the master control software is designed using Visual C++ language, animations are generated, and visual control of the entire host computer system is realized through interfaces and dialog boxes.

The display dot matrix conversion program converts the generated display information into dot matrix data corresponding to the LED display screen through dot matrix extraction and movement algorithms. For color display screens, the RGB three primary color data of the image information needs to be sampled separately, stored in blocks, and forwarded sequentially; for continuous animated images, the offset needs to be calculated frame by frame. The key is that the background image and the animated text must be synchronized. This part of the software is written in the TURBOC3.0 environment.

The serial communication program is relatively simple and is attached to the dot matrix conversion program.

Due to limited space and technical reasons, here we only take the PC Chinese character extraction and sending program as an example to describe its principle and structure.

Assume that the terminal display screen displays a 16×16 Chinese character dot matrix. Therefore, in order to display advertising information on the terminal, the dot matrix data of the Chinese characters contained in the information must be transmitted to the terminal. In TURBOC3.0, when a Chinese character is assigned to a variable, the area code of the Chinese character is actually assigned to the variable. By using UltraEdit-32 to observe the DOS Chinese character library file chs16.fon in binary form, it is found that Chinese characters are stored in the form of dot matrix. Each Chinese character is a 16×16 dot matrix, where the stroke passes is "1", and the rest is "0". In this way, from top to bottom and from left to right, a Chinese character is composed of 256 dots, that is, 32 bytes. Chinese characters are arranged in the Chinese character library in the order of area code, with area code as row and bit code as column, and one area has 94 bits. In this way, the offset address of a Chinese character in the Chinese character library is (area code × 94 + bit code) × 32. The 32-byte Chinese character dot matrix is ​​sent to the transmitter via the serial port of the PC. The process is shown in Figure 5.

Figure 5 PC software flow chart

[page]

3.2 Transmitter master control program

The function of the transmitter master control software is to receive the image dot matrix sent by the host PC through the serial port, read the keyboard command, and send the operation command or display data to the encoder serially.

The software of this part is written in the KeilC51 environment. It can directly translate C language into assembly language, generate binary code and write it into the microcontroller, which makes the writing efficiency higher.

The program works by interrupt mode. After booting, it waits for the trigger of serial port and INT0. When the serial port is triggered, it indicates that the PC has image dot matrix data transmitted, and the microcontroller immediately receives the dot matrix data and stores it in RAM; when INT0 is triggered, it indicates that the keyboard is in action, and the key value is immediately received to determine the type of command, and the image dot matrix data or operation command is sent to the receiver. Its functional flow is shown in Figure 6.

Figure 6 Transmitter master control program flow

3.3 Receiver main control program

The function of this part of the software is to complete the recognition, storage, transformation and display drive of the received data, and can realize the self-test of the local machine and display the solidified image. When the decoding chip of the receiving device has output, the single-chip microcomputer interrupts the current display, receives the flag word, and then judges the content of this flag word to determine whether the image dot matrix or the operation control command will be received. If it is dot matrix data, it will be continuously received and stored in a display buffer database and displayed in the current mode. If it is a command, the display mode will be changed immediately.

The key is to achieve real-time movement of the image up, down, left, and right. The specific implementation method is as follows:

1) Move the image up and down Assign the previous row of data in an image dot matrix to the corresponding next row in BUF[16][4] until the image is completely moved; then move the dot matrix of the next image. The process of moving up is similar.

2) Shift the image left and right Shift each row of data of an image to the left (using the shift instruction of C language), store the shifted dot matrix in BUF, and then display it. The process of right shift is similar.

The functional flow of the receiver master control program is shown in Figure 7.

Figure 7 Receiver master control program flow

4 Performance Testing

The system function and parameter test results are as follows:

1) Image input function: scanner, camera, digital camera, image source file;

2) Text input function: keyboard, WORD/TEXT source file;

3) Animation design function: text or graphics move and scale relative to the background;

4) Transmitter setting function: receiver serial number, image movement command, self-test command, transmission command;

5) Receiver self-check function: Display blue lawn background and "Welcome" moving characters;

6) Transmitter standby time ≥120h;

7) Transmitter remote control distance ≥250m;

8) Transmitter buffer space 8MByte;

9) LED display screen 320×640DIP;

10) The power consumption of the receiving and displaying system is ≤4kW.

5 Conclusion

The overall performance test and appraisal conclusions are as follows:

1) Remotely control the LED billboard through a handheld transmitter. The solution is novel, practical, and has high market promotion value;

2) Scientific hardware configuration, stable performance and high cost performance;

3) The software has a reasonable structure, powerful functions and is easy to use.

Reference address:Design of remote control LED billboard based on single chip computer programming

Previous article:Read in independent keys and light up the corresponding LEDs
Next article:Communication design of video intercom access control system based on single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号