Introduction
With the unprecedented prosperity of LED technology, LED badges have attracted much attention. LED badges, also known as LED work badges, are a novel LED patch dot matrix "business card" display screen that can display information such as name, gender, work department, etc. It can also display 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-cost 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 the display mode can be switched by pressing the button to start the self-test, and the display data can be easily updated through the USB interface.
1 Design requirements of electronic badges
Aiming at the actual needs of the market and from the perspective of use, the electronic badge designed in this paper is a small LED display screen that is light and beautiful. It 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 names and other prompt information, such as:
① Display function: It can display 3 Chinese characters or 5 characters, and includes 8 display modes including 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 respectively realize the adjustment of 4 levels of brightness and the switching of display items.
④ It has a power-on self-test function, which can be displayed in 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-40℃; the relative humidity is ≤80%; and the atmospheric pressure is 86-106 kPa.
The storage environment requirements are: ambient temperature between -20 and 55°C; relative humidity ≤ 93%; atmospheric pressure between 50 and 106 kPa.
2 Working principle of electronic badge
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, etc. The software part mainly includes the code writing of updating content display of main control interface and controlling dynamic display effect. By pressing the button, select the dynamic effect of display information (such as up and down movement, left and right movement, center division, snowflake and other different display effects), and change the movement speed or flashing. It transmits file information through USB interface.
3 Design of electronic badge
In early 2010, NXP launched the LPC1100 MCU series chips based on the ARM 32-bit Cortex-M0 core. Among them, the 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 the NXP LPC1112 chip based on the Cortex-M0 core, and the peripherals include LED dot matrix display, power circuit (which can be powered by a battery), keyboard, UART interface, and USB interface. The hardware circuit block diagram is shown in Figure 1.
[page]
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, and the actual test voltage is slightly less than 3.6 V. 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.
3.3 USB serial port conversion circuit
Laptops do not have serial ports due to space limitations and other reasons, which has caused trouble for 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 row and column selection 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.
[page]
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 reading dot matrix data sequences.
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 big data, the JTAG download program will fail, but the probability of SWD occurring 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 requires 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 the basic functions of LED display, control, and operation, and provides services for the interface display module.
Key processing module: controls the interface display by identifying and judging the keys.
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 that needs to be updated in the internal Flash of the MCU.
The main program flow chart is shown in Figure 5.
4 Result Analysis
Figure 6 shows the Chinese characters displayed on the LED badge. After debugging the whole machine, 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 functions.
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 Embedded Intelligent Video Surveillance System Based on ARM
Next article:Essential ARM emulator knowledge for embedded system design
Recommended ReadingLatest update time:2024-11-16 20:37
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!
- 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
- [Shanghai Hangxin ACM32F070 development board + touch function evaluation board evaluation] + use of GPIO port
- Today's live: TI uses DLP pico projection technology to design augmented reality smart glasses
- Laser driver circuit
- Looking for Windows XP SP3 ghost system!
- After the epidemic, will companies continue to work overtime like crazy?
- [RVB2601 Creative Application Development] CDK Development Environment Simple Application Experience Sharing
- Several comparisons: Analysis of the differences between 4G and 5G
- What are radio waves?
- How to embed OS in MSP430 series MCU
- BKP backup register