Design of street lamp monitoring communication terminal based on ARM7

Publisher:koimqerolulkLatest update time:2011-07-12 Keywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

For urban street lamp management departments, anti-theft and energy saving have always been a headache, requiring a lot of manpower, material and financial resources. Because there are a large number of street lamps and their geographical locations are scattered, it brings great difficulties to the staff. GPRS is General Packet Radio Service [1]. This wireless service is a new type of packet data transmission service opened on the existing GSM network. GPRS uses packet switching technology, which allows multiple users to share certain fixed channel resources. GPRS is particularly suitable for intermittent, sudden or frequent, small amount of data transmission, and is also suitable for occasional large amount of data transmission. It has the advantages of real-time online, volume-based billing, fast login, high-speed transmission, and easy switching. Therefore, the wireless communication system established by GPRS is a low-cost, easy to maintain and promote, unrestricted, highly reliable, stable, advanced, standardized and easy to expand system. It can be said that applying GPRS to the data transmission of street lamp monitoring system is the most ideal choice at present.

This system designs a terminal for street lamp monitoring communication system based on ARM7 processor and GPRS technology to realize remote wireless transmission of various field data. Combined with the host computer software, various data are transmitted to the centralized monitoring center in real time to realize unified monitoring and distributed management of street lamp operation. The system structure model diagram is shown in Figure 1.

GPRS street light monitoring communication system model diagram

Figure 1 GPRS street light monitoring communication system model

1 Introduction to main chips

1.1 LPC2106 chip[2]

The LPC2106 processor is Philips' ARM7TDMI-S processor. The chip has an ARM7TDMI-S CPU that supports real-time simulation and tracing, and is embedded with 128KB of high-speed Flash memory. It has ISP and IAP functions, a 128-bit memory interface, and a special acceleration system that allows 32-bit code to be executed at the highest clock cycle. In programs where code length plays a key role, the optional 16-bit Thumb mode can reduce more than 30% of the code at the lowest cost, and the CPU operating frequency can reach 60MHz; LPC2106 is very small, and it has two low-power modes: idle and power-down, which ensure that the system is used at low power consumption and is very energy-saving. It is an ideal choice in street light monitoring systems. Its internal RAM reaches 64K in size and provides interfaces such as I2C serial and SPI serial interfaces, allowing LPC2106 to be expanded in various ways in the GPRS system; its two timers, each with 4 capture/compare channels, are suitable for multi-channel data processing of street light control, the watchdog timer ensures the safety of the system, and the dual power supply technology ensures the reliability of the system.

1.2 P87LPC760 chip[3]

P87LPC760 is a 14-pin packaged single-chip microcomputer, suitable for many occasions requiring high integration and low cost, and can meet various performance requirements. It is a member of Philips' small package series. P87LPC760 provides high-speed and low-speed crystal oscillators and RC oscillation modes, programmable selection of a wide operating voltage range, programmable I/O port line output mode selection, optional Schmitt trigger input LED driver, output with internal watchdog timer, P87LPC760 uses accelerated 80C51 processor structure, and the instruction execution speed is twice that of the standard 80C51 MCU. It is used as a slave processor in the street light monitoring communication terminal.

2 Hardware System Structure

2.1 GPRS communication terminal hardware structure

The GPRS street light monitoring system terminal is installed at each data collection point of the street light, and is connected to the GPRS transparent data transmission terminal through the RS232 port and RS485 port. The data is sent to China Mobile's GPRS data network after being encapsulated by the protocol, and the data is transmitted to the street light monitoring center through the GPRS data network, realizing the real-time online connection between the street light terminal and the street light monitoring center system. The hardware structure of the GPRS communication terminal adopts the master-slave CPU design method, which improves the reliability and operation speed of the system. The main processor adopts Philips' ARM7TDMI-S processor LPC2106, which is mainly responsible for the encapsulation of the protocol and the realization of GPRS communication; the slave processor adopts Philips' P87LPC760, which is mainly responsible for the control of the ARM7 chip and GPRS module. The implementation structure diagram of the GPRS monitoring communication terminal is shown in Figure 2.

GPRS monitoring communication terminal structure diagram

Figure 2 GPRS monitoring communication terminal structure diagram

2.2 Implementation of monitoring communication hardware

In the street light monitoring communication terminal, the main processor is the LPC2106 processor based on the AMR7 core, which is the hardware core of the entire system. The connection structure diagram is shown in Figure 3. Its main function is to realize the communication protocol encapsulation and data transmission under GPRS. At the same time, it adopts AT commands suitable for GPRS, uses TCP/IP protocol to pack data into IP packets, accesses the wireless GPRS network through the GPRS interface, and applies Winsock controls to realize data reception and data exchange.

2.3 Implementation of monitoring communication control

The slave processor uses P87LPC760, whose main function is to control the data transmission and communication between LPC2106 processor and GPRS module; [page]

2.4 Implementation of monitoring communication interface

Since the monitoring communication terminal is a 3.3V system, and the UART1 of the core processor LPC2106 has a complete modem interface and uses TTL level, an 8-way RS232 conversion chip SP3238 is used for RS232 level conversion and serial communication. The SP3238 chip is a +3.0V and +5.5V RS232 converter . It has the characteristics of low power consumption, high data rate, enhanced ESD protection, etc. MAX3485 is an RS485 level converter, and these lines can be reserved for users to use for other functions.

2.5 Implementation of GPRS module

ZTE815 is mainly used to implement GPRS module, which is implemented by SIM card. Pins 1 and 4 of SIM card are connected to power supply, pin 2 is grounded, pin 3 is reset, connected to pin 41 of ZTE815; pin 5 is clock, connected to pin 45 of ZTE815; pin 6 is communication read and write I/O pin, connected to pin 43 of ZTE815.

LPC2106 connection structure diagram

Figure 3 LPC2106 connection structure diagram

3 Design of GPRS communication software

Software design is the core of this monitoring communication terminal, among which the communication module design is the main part of the entire terminal software design. The software design adopts ARM's ADS integrated development environment and uses C language for programming. It mainly controls the LPC2106 processor, realizes the protocol encapsulation and communication with the GPRS system. From the initialization serial communication module design to the communication process design with the GPRS terminal with SIM card, it is necessary to take into account various functional modules of the software, including parameter setting, automatic reception of data, request for data and signal judgment.

3.1 Communication command processing

Communication data processing is mainly for the data to be sent and the information received. By establishing AT commands in the ARM7 module, data transmission and reception are realized, and the analysis and control of AT commands are realized. The AT commands used in this system are: establish TCP/socket connection command "AT+ISTCP:"; send data command "AT+ISSND%:"; query data command "AT+ISRCV:"; query data link command "AT+ISST:"; module exit transmission mode command "AT+IMCM"; query module signal value command "AT+CSQ"; module return data transmission mode command "ATO"; DTU return control command mode command "AT+I"; close SOCKET command "AT+ISCLS:".

3.2 Introduction to the main functions of the system

Communication control is a relatively complex process. The main functions of this system are: (1) The received string is compared with the target pSrc string. The function is unsigned char Recive_GpCmp(const unsigned char *pSrc, unsigned char unNum), which is used to detect the received instruction; (2) The signal strength is extracted by the function unsigned char Achieve_IMFSrong(void), and the signal strength is 0~30; (3) The connection return value comparison function is unsigned char Achieve_Socket(void); (4) The SOCKET connection is established by the function void Connect_Socket(unsigned char *pIp). This function is responsible for sending the IP address and port number. The waiting time is one minute. In the data return value, I/000 indicates that the connection is successful, the handle number is 000, and I/ERROR indicates that the connection has timed out or failed; (5) The signal strength query function is void Check_IMFSrong(void), equal to 1 for querying signal strength status, equal to 0 for idle status, check signal strength, the maximum time is 3.2 seconds, the time interval is 6 minutes, and call this function in the main loop; (6) Query online status, call the function void Check_Gprs(void) every 1 second, set the online query time interval to 3 minutes, and confirm disconnection after two disconnections.

3.3 Implementation of data sending and receiving functions

Due to space limitations, it is not possible to describe each function in detail. The following mainly implements the data sending and receiving functions.

3.3.1 Implementation of receiving data function

void Receive_Data_Socket(void)

{

unsigned char buf[20],i;

Check_IMFSrong();

if(ucGPRSMode&&ucGprsLink)

{

for(i=0;i

buf[i]=pGPRSCMD[2][i];

buf[i++]=0x0d;

ucGPRSMode="1"; //Receive data [page]

UART1_SendStr(buf,i);

}

}

3.3.2 Implementation of sending data function

Void Send_Data_Socket()

{

unsigned char i,j,tmp,buf[20];

unsigned short usYn,usTmp,usLen;

if(Len==0)return;

for (i =0;i

{

buf[i] = pGPRSCMD[1][i];

}

i--;

buf[i++] = ':';

for (j=0;j<3;j++)

buf[i++]=szGprsHandle[j]; //data handle number

buf[i++] = ',';

usTmp =10000;

usYn="0";

usLen="Len";

for(j=0;j<5;j++) //Send length

{

tmp="usLen/usTmp";

usLen="usLen"%usTmp;

if(usYn)

{

buf[i++]=tmp+'0';

}

[page]

else

{

if(tmp)

{

usYn="1";

buf[i++]=tmp+'0';

}

}

usTmp/=10;

}

buf[i++] = ':';

UART1_SendStr(buf,i); //Send data header

UART1_SendStr(Data,Len); //Send data

}

4 Conclusion

The GPRS network remote data communication method based on the ARM7 core and the embedded design of the master-slave processor are adopted. The idea is novel and the program algorithm is efficient, which solves the communication problem of the remote monitoring terminal. The wireless mode is adopted, and the security of data transmission is greatly improved, and no wiring is required, and there is almost no regional restriction. The system has been successfully put into actual street light management and economically solved the problem of urban street light control management. If the system is properly modified, it can be used in environmental monitoring, hydrological monitoring, civil air defense, urban traffic control and other fields, and has a good reference value.

The author's innovations: (1) The system uses ARM chips, dual CPU design, and has the characteristics of high data processing speed, stability and reliability; (2) The chips used in the system are cost-effective, can be easily expanded, and can be connected to the GPRS communication system. (3) The software design is efficient and has achieved good results in urban street light management. It won the third prize of Wuzhou Science and Technology Progress in 2006. The economic benefits generated by the project are as high as 800,000 yuan/year. The data is provided by the Wuzhou Street Light Management Office and calculated based on the savings in electricity, manpower, and management costs.

Keywords:ARM7 Reference address:Design of street lamp monitoring communication terminal based on ARM7

Previous article:Implementation and application of a reconfigurable FPGA configuration method based on ARM
Next article:Research on Remote Video Monitoring System Based on ARM Platform

Recommended ReadingLatest update time:2024-11-16 20:37

Design of SoC Voice Processing System Based on ARM7 TDMI
introduction With the rapid development of microelectronics and computer technology, many embedded application systems have emerged. Among them, various speech processing systems have been continuously developed and widely used in various industries, such as voice station announcers, automatic interpretatio
[Microcontroller]
Design of SoC Voice Processing System Based on ARM7 TDMI
arm7 Litian Electronics lpc2148 GPIO 2 single-channel LED control experiment
Note: This development board of Litian Electronics is different from Zhou Ligong's LPC2131. On Zhou Ligong's development board, you can use a jumper stick to choose whether to use the 595 driver. When Zhou Ligong conducted the GPIO output experiment - single-channel LED control experiment in his textbook, he directly
[Microcontroller]
arm7 Litian Electronics lpc2148 GPIO 2 single-channel LED control experiment
Programming Technology of ARM7 9-bit Serial Port Multi-computer Communication
1 Master-slave multi-machine communication The so-called master-slave multi-machine system means that among several ARMs (or single-chip microcomputers), one is the master and the rest are slaves. The slaves must obey the scheduling and control of the master. Its topological structure is shown in Figure 1.
[Microcontroller]
Bootloader Code Design of ARM7TDMI-S in Embedded System
introduction The chip's Bootloader code (i.e., startup code) is a section of code that is executed before the chip enters the operating system after it is reset. It mainly provides a basic operating environment for running the operating system, such as initializing the CPU stack and initializing the memory
[Microcontroller]
Bootloader Code Design of ARM7TDMI-S in Embedded System
Implementation of OLED display application system design based on ARM7 microprocessor LPC2138
With its powerful functions, extremely low power consumption, and smaller packages, ARM processors are widely used in small systems such as access control, wireless meter reading, and intelligent temperature control. In these systems, the human-computer interaction interface is generally completed by LCD, but Usually
[Microcontroller]
Implementation of OLED display application system design based on ARM7 microprocessor LPC2138
Chinese LCD Display Technology Based on ARM7 Microprocessor
1 Introduction Liquid crystal display (LCD) is a low-power, small-size, radiation-free display device that has been widely used in various embedded electronic products in recent years. LCD can be divided into three types: segment type, character type and dot matrix type. Among them, segment type LCD and
[Microcontroller]
Design and implementation of embedded game system based on ARM7
1. Introduction Due to the special working environment of coal mine production, the production process is more dangerous and unsafe than the general industry. With the continuous increase in coal mining, safety issues have become increasingly serious, and various major accidents are often reported in the media.
[Microcontroller]
Design and implementation of embedded game system based on ARM7
Examples of USB interface and CAN bus based on ARM7 processor
In order to better combine the versatility of USB with the professionalism of CAN, and access the CAN professional network through the USB interface of the computer to achieve the convenience of system control and the efficiency of application, this article describes an example of realizing the USB interface and CAN
[Microcontroller]
Examples of USB interface and CAN bus based on ARM7 processor
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号