9 » IC Electronic information » Category: G

IC Electronic information

GPRS-based communications and uC / OS-ii network of Energy Meter

In Electronic Infomation Category: G | on April 27,2011

Abstract: In order to achieve the purpose of the wireless remote meter reading using the GPRS communication technology, and LP3470M5X-2.93 datasheet and uC / OS-ii multitasking embedded operating systems modular design method, design the network based on GPRS communication meter. One communication module and LP3470M5X-2.93 price and related hardware peripherals from the ARM microprocessor components, to achieve GPRS communication, RS 232 serial communication, RS 485 serial communication and LP3470M5X-2.93 suppliers and infrared communications, and other means of communication; system software with the hardware driver layer, the operating system layer, application interface layer and application layer four-story structure, communication between tasks achieved by the application interface layer to receive and distribute messages, with each task independently, without direct coupling characteristics.

As technology advances, meter reading meter reading from the field of artificial changes to the remote automatic meter reading, meter reading technology currently used for a variety, such as the RS 485 bus, such as infrared and power line carrier, the meter reading technology is relatively mature, but the application has its own limitations, such as the RS 485 bus wiring and the meter needs to increase investment, and the transmission distance can not exceed 1 200 m, infrared require manual on-site meter reading meter reading, meter reading due to electromagnetic power line carrier interference of the transmission distance is limited. GPRS communication technology is mature, wide network coverage can be permanently online, according to traffic billing, low cost, and from distance and space, makes the application ideal for meter reading industry.

1 GPRS network meter

GPRS network GPRS communication technology meter and the meter is a combination of technology, he three-phase multifunction energy meter and GPRS communication module, form a wireless network communication capacity of electricity metering devices. GPRS network meter from the base table and GPRS wireless communication module of two parts.

1. 1 base table

Ordinary three-phase base table can achieve the basic functions of multi-function meter, without access to the case of GPRS communication module does not affect its function as a normal use of meter. Its real-time exchange of analog sampling, processing and storage, to achieve energy metering, demand measurement, multi-rate, load profile calculation and storage, data freeze, event recording, multi-rate, etc., that enable users to pre-order power control, load control, remote control. With RS 485 communication interface, infrared communication interface, GPRS communication module interface to read and copy data in the set; base table also has a local LCD display, support for local patrol and key display function significantly.

1. 2 GPRS communication module

GPRS communication module is a GPRS network meter data upload key nodes, as a network, an independent energy meter module, without prejudice to the case of the base metering, meter reading systems to meet user requirements and transmission protocol, to achieve reliable data transmission. GPRS communication module downstream communication with the base table to meet the DT / L645 multifunction energy meter communication protocol, the uplink communication with the main station to meet the "power users of electricity information collection system communication protocol" (Q / GDW 376. 1-2009) standard.

Described in this GPRS communication module focuses on software and hardware design.

2 GPRS communication module hardware

2. 1 system diagram

GPRS wireless communication module of the system block diagram shown in Figure 1. System, including: ARM microprocessor (LPC2138), GPRS modules, FLASH, and ferroelectric memory, infrared transceiver, RS 232 serial debug interface, RS 485 communication interface, JT AG simulation interface, LED indication and power conversion.

Figure 1 GPRS network meter system diagram

2. 2 module features

2. 2. 1 microprocessor

Based on ARM7TDMI?? S core 32-bit microprocessor LPC2138, 512 KB of its embedded high-speed FLASH memory and 32 KB of RAM, has a rich peripheral resources, such as: two 32-bit timer ( with capture, compare channels); two 10-bit 8-channel ADC; 1 10-bit DA C; PWM channel; 47 Road GPIO; 9 edge or level sensitive external interrupt; an independent power supply and clock RTC; more serial interface (UART, I2 C, SPI, SSP); containing vector interrupt controller can be configured to interrupt priority and vector addresses; chip Boot loader, can be achieved in systems / In-Application Programming (ISP / IAP), can be achieved through the on-chip PLL 60 MH zs CPU operating frequency, with idle and power-down 2 low-power mode and wake-up via external interrupt.

2. 2. 2 GPRS module

Produced by the Shenzhen Science and Technology M580z well-module, its internal integration of the T CP / IP protocol stack, with two communication links, all the way TT L standard serial communication ports, to streamline the AT instruction set, through the AT command parameter settings to achieve the module and data transmission. M580 TT L with the CPU through a serial port connection level.

2. 2. 3 Memory

The uplink communication with the main station should meet the electric power user information collection system communication protocol! Need to store the statute requires a class of data (real-time data), two types of data (curve data, statistical data) and three types of data (events), in particular, curve data stored in large data requirements, so using large capacity FLA SH Type II and III memory to store data.

The ferroelectric memory can be unlimited rewritable, so the need to store frequently updated real-time data and setting parameters. Memory and MPU interface is SPI interface.

2. 2. 4 serial interface and JTAG emulation port

Use RS 232 serial port, infrared communication port enables the module parameters of the local setting and maintenance. Where, RS 232 serial port enables the monitoring of the GPRS module status through RS 485 serial port can be read to satisfy power users copy information collection system communication protocol electricity! Data; JTAG emulation port emulation on ARM processor and process programming.

2. 2. 5 LED indication

LED lights to indicate power status of the module, the module landed status, network status and security communications power status.

2. 2. 6-phase power meter

Three-phase electric energy meter and the voltage and current to achieve such data collection and calculation. It MPU through a serial port connection, communication protocol to meet the DT / L645 protocol, the module time copy table data reading phase, including electricity, demand, voltage, current and other real-time data, read and copy data conversion and storage to meet the master station module to access requirements.

3 Software Design

3. 1 general framework

Software design is based on uC / OS-ii multitasking embedded operating systems design, the overall structure shown in Figure 2.

overall architecture diagram of Figure 2

System software includes: the main task, the task uplink and downlink tasks, analog serial tasks, event handling tasks and control tasks.

3. 1. 1 main task

Achieve global variable initialization, initialize the hardware environment, semaphores and message queues build, create and start other tasks, keyboard scanning, the system time and time processing, the reset processing functions.

3. 1. 2 upstream task

Task to achieve uplink GPRS communications link establishment, maintenance and data exchange with the main station, including the link maintenance, data transceiver, protocol analysis and other functions.

3. 1. 3 down tasks

Timing data base table to achieve the copy reading, data processing, data storage, data forwarding functions.

3. 1. 4 analog port management tasks

Because the system must be implemented upstream communications port, downlink communication port, RS 485 communication port, RS 232 communications port and infrared communications port serial communication port 5, while the LPC2138 and has only two serial ports, serial port must be on expansion. Here, using software to simulate serial communication, in order to achieve the serial port expansion. Serial port management tasks to build a simulation, specialized management downlink analog meter serial, infrared communication simulation and debugging of analog serial port.

3. 1. 5 event handling tasks

Event handling various types of task processing system events occur, including event logging, event reporting and so on.

3. 1. 6 control tasks

Control task to perform some control operations, including pre-order power control, electronic security control, alarm control.

3. 1. 7 communication between tasks

Tasks and task data transmission between the sending and receiving messages through to achieve, the message structure is:

Messaging function is defined as:

3. 2 software modules process

Software is modular in design, each task contains different modules, the system contains more modules, the main task of this module is only given the task in the upstream flow and the GPRS link maintenance module flow chart.

3. 2. 1 main task flow

Main task program flow shown in Figure 3.

main program flow chart in Figure 3

3. 2. 2 GPRS link maintenance process

Upstream link maintenance module tasks, including: GPRS network logon, link status detection and heart maintenance. Which, GPRS network logon process flow shown in Figure 4. In the GPRS communication link is established, if no data transmission time, the GPRS network connection will be disconnected, it must be made in a certain time interval of a heartbeat frame to the main station, confirmed that the master link state after the normal response. GPRS modules of different brands in different AT command set, so the programmer must be familiar with GPRS module before the instruction set, to achieve the establishment and maintenance of the link.

flow chart of Figure 4 GPRS link maintenance

4 Concluding Remarks

Introduced the GPRS network the function and power meter module GPRS wireless communications hardware and software design, it is a GPRS network meter development project summary. System software ported? ? C / OS?? Embedded operating system, multi-task design, to improve the systems real-time, remote wireless meter reading of positive significance to the design of the products have been successfully applied in the State Grid Corporation, and stable operation with good results .

LP3470M5X-2.93 datasheetLP3470M5X-2.93 suppliersLP3470M5X-2.93 Price

All right © 2010-2016 Certificate