Designing LED electronic badge using ARM LPC1112

Publisher:EtherealEssenceLatest update time:2013-01-12 Source: 电子设计工程 Keywords:ARM 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 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.

c.JPG

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.

Keywords:ARM Reference address:Designing LED electronic badge using ARM LPC1112

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

ARM assembly instruction set 4
Coprocessor cp15 operation instructions: mcr & mrc •mrc is used to read registers in CP15 •mcr is used to write registers in CP15   What is a coprocessor? •Another processing core inside the SoC that assists the main CPU in implementing certain functions and is called by the main CPU to perform certain tasks. •ARM is
[Microcontroller]
Dual ARM7 SoC Reference Design Implements Multi-Voltage AVS
The use of voltage scaling techniques in conjunction with frequency scaling techniques adds new principles to clock switching to ensure safe voltage levels for the new clock frequency. In addition, the voltage scaling function requires the creation of voltage domains within the SoC. This creates a voltage domain int
[Microcontroller]
Dual ARM7 SoC Reference Design Implements Multi-Voltage AVS
Design of wireless communication system circuit module based on ARM Cortex-M3
  In order to design a module that can realize SMS sending and receiving and wireless data transmission, this paper uses the mainstream product STM32 with ARM Cortex-M3 core as the main control chip and SIM900A of SIMCom as the communication chip. After consulting a large number of relevant literature and data manuals
[Microcontroller]
Design of wireless communication system circuit module based on ARM Cortex-M3
[ARM bare metal program][2] TQ2440, ADS1.2, JLINK to establish an integrated development environment
Introduction Fundamental Download the program to SDRAM (0x30000000) through JLINK and run it. Hardware Environment TQ2440 is connected to the computer via JLINK; NOR FLASH/NAND FLASH boot mode is optional. Software Environment It is recommended to use WIN XP system, and you can use vmware to install the virtual
[Microcontroller]
[ARM bare metal program][2] TQ2440, ADS1.2, JLINK to establish an integrated development environment
The relationship between 8051, AVR and ARM and their actual situation
A friend who is an enthusiast wants me to release video tutorials on AVR and ARM. I said that I can record videos on ARM, but there is no need to talk about AVR. This friend was puzzled when I said that AVR is unnecessary. Yes, there are still many enthusiast friends who have doubts. This is caused by the advertising a
[Microcontroller]
Design of Multi-Serial Port Expansion System Based on WINCE
With the development of science and technology, there are more and more intelligent and automated equipment, among which the development of computer network equipment and fieldbus is the most typical. In large-scale centralized control sites such as parking lot main control systems, multi-point temperature acquisition
[Microcontroller]
Design of Multi-Serial Port Expansion System Based on WINCE
【ARM bare board】Nand Flash programming
1. Read chip ID 1.1 Read chip ID timing Simplified into 4 steps: 1. Enable chip select 2. Write command 0x90 3. Write address 0x00 4. Read ID information /* Identify NAND FLASH */ void scan_nand_flash(void) {    int i;    //Save the array of read ID information    unsigned char id_info = {0};    nand_enable_cs()
[Microcontroller]
【ARM bare board】Nand Flash programming
Design of intelligent fire-fighting robot controller based on ARM9 embedded system
0 Introduction The controller is the main body of intelligent robots to process and control information, which directly determines the behavior and performance of the robot. In recent years, with the continuous advancement of high-performance microcontrollers and embedded system technologies, solutions have
[Microcontroller]
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号