Design of a ten-circuit intelligent power distribution monitoring unit based on ARM microprocessor

Publisher:NexusDreamLatest update time:2011-06-17 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction
Distribution automation technology is developing rapidly towards digitalization, intelligence, networking and multi-function. This paper takes the microcontroller LPC2132 chip containing ARM7TDMI-STM CPU as the main controller of the system, and focuses on the collection and data communication of power system data signals and power system status monitoring. It studies and designs a terminal control unit with intelligent power distribution and can monitor ten user circuits at the same time. It has the function of measuring power parameters such as active power, reactive power, energy, voltage, current, power factor, etc. in each circuit.


1 Principle of measurement of power parameters
A symmetrical three-phase power supply is usually composed of three sinusoidal voltage sources with the same frequency, equal amplitude and initial phase angle of 1200 connected in a certain way. The three-phase signals can be called A, B, and C phases in turn, denoted as uA, uB, and uC. Their instantaneous expressions are as follows:


In an AC circuit, the cosine of the phase difference between voltage and current is called the power factor. Numerically, the power factor is the ratio of active power to apparent power, that is:


The power factor reflects the proportion of reactive power in the output power. Improving the power factor of electrical appliances generally has two meanings. One is to reduce the power loss on the transmission line; the other is to give full play to the potential of power equipment (such as generators, transformers, etc.). Therefore, improving the power factor has a positive effect on improving the utilization rate of power equipment, improving power supply quality, and saving electricity.


2 Hardware Design
2.1 Overall Structure
In order to avoid interference of strong electric signals on weak electric signals, this system uses three layers of circuit boards in the overall structure, namely: the signal acquisition circuit board at the bottom, the signal processing circuit board at the middle layer, and the LCD display circuit board at the top layer. Many large and heavy components are arranged on the bottom board, which is conducive to the stability of the entire unit; the main function of the middle layer is to process the signal transmitted from the signal acquisition layer, so this layer is also the main control circuit board of this design; the upper layer mainly realizes the display function, and displays the measurement parameters transmitted from the middle layer in real time. The overall structure of the entire monitoring unit is shown in Figure 1.

2.2 Selection of microcontroller
This system uses LPC2132 as the microcontroller, which is a 32/16-bit ARM7TD-MI-STM CPU microcontroller that supports real-time simulation and embedded tracing, and has 64/128/256/512KB of embedded high-speed Flash memory. LPC2132 has multiple 32-bit timers, 1 (LPC2132) 10-bit 8-channel ADC, 10-bit DAC, PWM channels and up to 47 GPIOs, as well as 9 edge or level-triggered external interrupts. The schematic diagram of the LPC2132 external interface in the system is shown in Figure 2. [page]

2.3 Functions and features of AIT7022B
ATT7022B is a high-precision multifunctional anti-electricity theft fundamental wave three-phase electric energy dedicated metering chip produced by Actions. It can be used to measure the fundamental wave, harmonic and full-wave active power, reactive power, apparent power, active energy, reactive energy, power factor, phase angle parameters, etc. of each phase and combined phase, which can fully meet the needs of three-phase multifunctional electric energy meter with multiple tariff rates. The internal functional structure of AT7022B is shown in Figure 3. Among them, V1P/V1N, V3P/V3N, V5P/V5N are the positive and negative analog input pins of the current channels of phases A, B and C respectively, and V2P/V2N, V4P/V4N, V6P/V6N are the positive and negative analog input pins of the voltage channels of phases A, B and C respectively. V7P/V7N is the positive and negative analog input pin of the seventh ADC. CF1, CF2, CF3, and CF4 are active energy pulse output, reactive energy pulse output, fundamental wave active energy pulse output, and fundamental wave reactive energy pulse output respectively. DIN is the SPI serial data input port, DOUT is the SPI serial data output port, CS is the SPI chip select signal, and SCLK is the SPI serial clock input port. [page]

As can be seen from Figure 3, the internal structure of ATT7022B can be roughly divided into several parts, including A/D analog-to-digital conversion module, digital signal processing module (DSP), SPI communication interface module, pulse generation module, etc. ATT7022B provides an SPI interface to facilitate the transmission of metering parameters and calibration parameters with external controllers. All metering parameters can be read through the SPI interface. Its internal voltage monitoring circuit can ensure normal operation when power is on and off. Its application circuit is shown in Figure 4. [page]

2.4 RS485 bus interface
The RS485 serial communication interface technology used in the communication between the intelligent terminal and the host computer in this design is developed from RS232 and RS422 technologies. The maximum transmission distance of the RS-485 standard is about 1219 meters, and the maximum transmission rate is 10Mbps. RS-485 can achieve the longest cable length capability at a rate of 20kbps. The SN65HVDl2 chip used in this intelligent terminal design can be directly embedded in the actual RS-485 application circuit. The standard serial port of its microprocessor can be directly connected to the R pin of the SN65HVDl2 chip through RXD. Directly connect the D pin of the SP485R chip through TXD, and the specific circuit is shown in Figure 5. [page]

3 Software Design
3.1 Modbus Communication Protocol
The communication between this monitoring terminal and the host computer adopts the Modbus communication protocol. This protocol is a universal language used in electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via a network (such as Ethernet). The protocol also supports traditional RS232, RS422 and RS485 interfaces. The traditional Modbus protocol is divided into ASCII mode and RTU mode. Considering the efficiency and safety of the power distribution system, the RTU mode is used here. When using the RTU mode, the message transmission must start with a pause interval of at least 3.5 characters. And after the last transmitted character, a pause of at least 3.5 characters should be used to mark the end of the message. A new message can start after this pause. The entire message frame must be transmitted as a continuous stream. If there is a pause time of more than 1.5 characters before the frame is completed, the receiving device will refresh the incomplete message and assume that the next byte is the address field of a new message. Similarly, if a new message starts within 3.5 characters of the previous message, the receiving device will consider it as a continuation of the previous message, which will result in an error. However, this error can be discovered using CRC checking. The typical RTU message frame is shown in Table 1.

3.2 Software Design
This design uses C language to write the operating software on the Keil C platform to complete the mutual communication between the host computer (PC) and the terminal. The system software mainly includes the main program, initialization program, ATT7022B reset program, SPI communication program, data acquisition program, data transmission program, and interrupt program. Figure 6 shows the main flow of the software program.

The host computer in the system communicates with the system through the RS485 serial port, and its function chip ATT7022B also uses the serial mode to exchange data with the system control core LPC2132. Figure 7 shows the software design structure of this system.

4 Conclusion
Digital and networked power monitoring is an inevitable trend of industrial remote monitoring and monitoring, and is also the best choice for industrial remote monitoring. In the future, efficient, fast, accurate and safe power remote control monitoring system, that is, intelligent power monitoring system, will still be the main object of our research. This paper takes LPC2132 microprocessor as the core, and gives the hardware circuit of the power monitoring unit that measures active, reactive, apparent power, bidirectional active and four-quadrant reactive power, LCD display, and backup automatic transfer function. The next stage of work will be to configure functional software for the system and debug the system so that the system can run safely and effectively in on-site production.

Reference address:Design of a ten-circuit intelligent power distribution monitoring unit based on ARM microprocessor

Previous article:Tailoring and transplantation of embedded Linux kernel based on ARM
Next article:ARM Embedded PDA STR710

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号