Introduction
With the unprecedented prosperity of LED technology, LED badges have attracted much attention. LED badges, also known as LED work badges, are novel LED patch dot matrix "business card" display screens that can display information such as name, gender, work department, etc., as well as text and preset graphics at different speeds and different action modes. It can be hung around the neck or clipped on clothes as a proof and promotion of personal and corporate identity in public places. LED badges can display both Chinese and English. For those occasions where the amount of information to be displayed is not large, the resolution is not very high, and the manufacturing cost is low, it is more suitable to use a small-screen LED dot matrix display. Most power sources use lithium batteries, which have the advantages of long service life, high energy, light weight, and strong adaptability to high and low temperatures.
At present, the dot matrix display system of most LED badges comes with a font library, and the display effect is mainly driven by hardware scanning. This method is relatively simple, but the display can only be carried out according to the pre-designed hardware and cannot be changed at will. Therefore, the display mode is single, the display content cannot be changed at will, and the large size is not suitable for carrying. In addition, an 8-bit single-chip microcomputer can also be used as the core control chip to realize the display of characters, numbers, Chinese characters and simple graphics. However, due to the high power consumption and large size of the 8-bit single-chip microcomputer, as well as the low computing speed and communication rate, the actual display effect will have a more obvious flickering feeling. In order to overcome the above shortcomings, the electronic badge designed in this paper adopts the low-power, small-size, high-performance, low-price LPC1112 based on the Cortex-M0 core as the main control chip. The 12×36 LED dot matrix screen can realize 8 kinds of dynamic display, and can be powered on and self-checked by switching the display mode by pressing the button, and the display data can be easily updated through the USB interface.
1 Requirements for the design of electronic badges
In view of the actual needs of the market, from the perspective of use, the electronic badge designed in this paper is a small LED display screen that is light and beautiful, can be hung on the chest, and can display Chinese characters or characters.
1.1 Functional description
The electronic badge is hung on the chest and is mainly used to display the name and other prompt information, such as:
① Display function: It can display 3 Chinese characters or 5 characters, and includes 8 display modes: left shift, right shift, up shift, down shift, center split, snowflake, fixed, and animation, with a marquee and flashing function.
② The upper computer can update the display data of the lower computer through the USB port, and the display will be normal after the update is completed.
③ The two buttons can respectively adjust the 4-level brightness and switch the display items.
④ It has a power-on self-test function, which can display the full screen when powered on, and detect whether the LED dot matrix has bad pixels.
1.2 Operating environment description
The working environment requirements are that the ambient temperature is 5 to 40℃; the relative humidity is ≤80%; and the atmospheric pressure is 86 to 106 kPa.
The storage environment requirements are that the ambient temperature is -20 to 55℃; the relative humidity is ≤93%; and the atmospheric pressure is 50 to 106 kPa.
2 Working principle of electronic badges
The electronic badge mainly includes hardware circuit design and software design. The hardware circuit part includes LPC1112 main control chip, LED dot matrix display circuit, display driver circuit, USB interface circuit and SWD debugging circuit. The software part mainly includes the code writing for updating the content display of the main control interface and controlling the dynamic display effect. By pressing the button, you can select the dynamic effect of the displayed information (such as up and down movement, left and right movement, center division, snowflakes and other different display effects), as well as change the movement speed or flashing. It transmits file information through the USB interface.
3 Electronic badge design scheme
In early 2010, NXP launched the LPC1100 MCU series chip based on the ARM 32-bit Cortex-M0 core. Among them, LPC1112 has excellent performance, is easy to use, and has low power consumption. It achieves the performance of a 32-bit processor at the price of an 8-bit processor. The main control chip of this system uses NXP's LPC1112 chip based on the Cortex-M0 core. The peripherals include LED dot matrix display screen, power supply circuit (which can be powered by a battery), keyboard, UART interface and USB interface. The hardware circuit block diagram is shown in Figure 1.
3.1 Core control chip
The main control chip LPC1112 used in this system has 33 pins, an operating frequency of up to 50 MHz, an operating voltage of 3.3 V, and has three energy-saving modes.
Since the LPC1112 chip has extremely low power consumption, it can be powered by a lithium battery and can work continuously for 8 to 10 hours. It is also very small (7 mm×7 mm×0.85 mm), which is very suitable for badge applications. It is simple and convenient to use. The lithium battery can be charged through the USB interface, and the display content and mode in the electronic badge can also be updated.
3.2 Power supply system
The operating voltage of the LPC1112 chip is 3.3 V, so the power supply circuit output needs to be designed to be 3.3 V. In order to minimize costs, 1N4148 can be used to reduce the voltage. 1N4148 is a small high-speed switching diode that switches relatively quickly. The power supply circuit diagram is shown in Figure 2. The voltage at point a is 5 V, and the voltage drop of 1N4148 is 0.7 V. The ideal voltage at point b is 4.3 V. The actual voltage is slightly less than 4.3 V, which is the power supply for 74HC595.
74HC595 is an 8-bit serial input and parallel output shift register, which can convert serial data into parallel data and output it to the LED dot matrix screen. 74HC595 has a cascade output terminal Q7, which can be connected to the data input terminal of the next 74HC595. In this way, it is very convenient to realize the cascade of multiple 74HC595 chips, which greatly saves the I/O pin resources of LPC1112. LPC1112 only needs 4 I/O pins: clock, data, magnesium storage and chip select to achieve communication.
The power supply circuit is then stepped down by 0.7 V through a 1N4148. The ideal voltage at point c is 3.6 V. The actual test voltage is slightly less than 3.6 V, and the output is used to power LPC1112. This system is powered by lithium batteries when working, and it can also be charged. Charging can be achieved through the USB interface. [page]
3.3 USB serial port conversion circuit
Laptops do not have serial ports due to space limitations and other reasons, which has brought distress to some people who need serial port communication functions. To solve this problem, this article uses the PL2303HX chip to solve the problem of no serial port for customers. PL2303HX is a highly integrated RS232-USB interface converter produced by Prolific, which can provide a solution for convenient connection between an RS232 full-duplex asynchronous serial communication device and a USB functional interface.
PL2303HX uses a 28-pin SMD SOIC package, an operating frequency of 12 MHz, and complies with the USB1.1 communication protocol. It can directly convert USB signals into serial port signals, with a wide baud rate range, supporting 5, 6, 7, 8, and 16 data bits.
When the badge needs to update the display content, it can be connected to the USB port of the computer through a miniUSB interface cable. After installing the driver, a virtual serial port will appear on the computer, and the host computer software can download data through this serial port. PL2303HX converts USB data into serial port data and connects it to the UART interface of LPC1114 for data interaction. The USB-serial port conversion circuit is shown in Figure 3.
3.4 12×36 LED dot matrix display circuit The
LED dot matrix display circuit consists of a dot matrix screen composed of 12×36 LEDs and a row and column drive circuit. Due to the large number of LEDs, it takes a lot of power to light up the entire LED screen, and a drive circuit is required to drive the LED rows and columns to display. In order to achieve low power consumption, the rows and columns are driven by 74HC595 chips, and the selection of the rows and columns is controlled by LPC1112. Figure 4 is a display drive circuit. 74HC595 is a CMOS shift register with open drain output, and the output port is a controllable three-state output terminal. The power supply voltage of 74HC595 in the circuit is 4.2 V, Q0~Q7 are three-state outputs, Q7' is serial output, and Ds is serial port input. The signal is output from the Q7' pin of 74HC595A to the Ds pin of 74HC595B.
Whether displaying characters or Chinese characters, the display function is achieved by controlling the on and off of the corresponding diodes. In the display effect part, the line-by-line scanning method is used to achieve a fixed display effect. The dynamic display method is achieved by using different scanning methods of the display screen, such as up and down movement, left and right movement, flashing, etc. Different display effects are achieved by using different scanning methods and the order of reading dot matrix data.
3.5 SWD debugging interface
Compared with the traditional debugging method, the SWD debugging method has the following advantages: First, the SWD mode is more reliable than JTAG in high-speed mode. In the case of large data, the JTAG download program will fail, but the probability of SWD happening will be much smaller; second, the SWD mode occupies fewer GPIO pins; third, the SWD mode circuit is small in size.
The hardware interface of SWD debugging only needs 5 pins: VDD (power), SWDIO (data), SWCLK (clock), RESET (reset) and GND (ground).
3.6 Software design function module
The software function module is introduced as follows:
LED display module: provides basic functions of LED display, control, and operation, and provides services for the interface display module.
Key processing module: through the recognition and judgment of keys, it is used to control the interface display.
IAP read and write Flash module: provides basic operations of reading, writing and erasing the internal Flash of the MCU.
74HC595A driver module: provides writing of 74HC595A data and scanning of the LED matrix.
USB data update module: interacts with the host computer software, cooperates with IAP to read and write Flash data, and stores the data to be updated in the internal Flash of the MCU.
The main program flow chart is shown in Figure 5.
4 Results Analysis
Figure 6 shows the Chinese characters displayed on the LED badge. Through the whole machine debugging, the LED display runs reliably and stably. The display status includes 8 display modes: left shift, right shift, up shift, down shift, center split, snowflake, fixed, and animation, with a marquee and flashing function.
At the same time, it also has a power-on self-test function, and the LED dot matrix has been tested to have no bad pixels.
Previous article:Design of CAN bus automobile instrument based on SAEJ1939 protocol
Next article:Application of DDS Technology in High Frequency Quartz Crystal Test System
Recommended ReadingLatest update time:2024-11-17 01:29
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- [RISC-V MCU CH32V103 Review] - 7: PWM is not simple either
- What you should know about LoRa frequency hopping spread spectrum communication principle
- The difference between pressure sensor and pressure transmitter
- GD32e231c_START development board, no response after template program is executed,
- 2A switch step-down 3-cell/4-cell lithium battery charge management IC VAS5176
- [Flower carving hands-on] Interesting and fun music visualization series of small projects (03) --- RGB rhythmic lights
- Have you ever used a domestic DAC chip?
- Raspberry Pi 2 Model B Review - by freebsder
- Are there any experienced teachers in the motor control field?
- [RVB2601 Creative Application Development] RVB2601 Get Weather Widget