Design of LED electronic badge using ARM processor LPC1112

Publisher:boyhxzLatest update time:2014-12-03 Source: 21icKeywords:LPC1112 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

e.JPG

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.

f.JPG


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.

a.JPG


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.

b.JPG

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.

c.JPG



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.

d.JPG


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.

Keywords:LPC1112 Reference address:Design of LED electronic badge using ARM processor LPC1112

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

How to use a multimeter to determine whether a light-emitting diode/LED is good or bad
In daily work and life, especially as a hardware engineer, we often encounter situations where we don’t know whether an LED is good or bad. In fact, it is very easy to judge, and a multimeter is enough. Here is a brief introduction. 1. First, turn the multimeter to the diode position. The position may be different f
[Test Measurement]
Design and implementation of a large-screen LED display system based on GPRS
LED display screen is a new type of information dissemination media that has developed rapidly in the world since the late 1980s. It is a large-scale display system that integrates microelectronics technology, optoelectronics technology, computer technology, and information processing technology. It has gradually be
[Microcontroller]
Design and implementation of a large-screen LED display system based on GPRS
LED driver design ideas
LED has become an unshakable backlight source in portable products. Even in the backlight source of large-size LCDs, LED has begun to challenge the mainstream position of CCFL (cold cathode fluorescent lamp); in the field of lighting, LED, as the most critical component of semiconductor lighting, is sought after by th
[Power Management]
12V-LED and distributed constant current technology
  introduction   In recent years, we advocate "constant voltage first, then constant current", which will be the mainstream of LED lighting market. After two years of development, it is strictly defined as "distributed constant current" technology. Although major companies and many experts and scholars are committed
[Power Management]
12V-LED and distributed constant current technology
How to implement the dimming function of white light LED
There are two ways to implement the dimming function: analog and PWM. When using analog dimming technology, simply reducing the current of the white light LED to half of the maximum value can reduce the screen brightness by 50%. The disadvantage of this method is that the color shift of the white light LED requ
[Power Management]
Design of wireless LED lighting drive system
LED light sources have developed rapidly in the past decade and have been quickly applied to terminal markets such as automobiles, buildings, medical treatment, and landscape lighting. LED lighting has become more reliable and efficient than traditional lighting, and has become increasingly popular in the market. Howe
[Power Management]
Design of wireless LED lighting drive system
16*16LED dot matrix display controlled by 89c51
#include AT89x51.H tZqy \_G   unsigned int zimo,xx=0; //zimo is the character counter, xx is the number of characters when the screen is split. /. 2 I   unsigned char yid,h; //yid is the movement counter, h is the line counter t182 &gpd`   unsigned char code hanzi ; //Chinese character font J rm 9,7/   unsigned char
[Microcontroller]
Advantages of LED in navigation lights
Navigation mark light is a type of traffic light installed on certain navigation marks to ensure the safe navigation of ships at night. It emits a specified light color and flashing frequency at night to achieve the specified illumination angle and visibility distance. There are four types of navigation marks: fixed
[Power Management]
Advantages of LED in navigation lights
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号