Design of multi-channel electronic parameter collection system based on ADE7878 and embedded technology

Publisher:LianaiLatest update time:2018-04-05 Source: eefocusKeywords:ADE7878 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    With the expansion of social electricity consumption, it is urgent to develop electricity detection and distribution in the direction of high precision, multi-function and intelligence by timely detecting electricity consumption information and realizing power distribution automation and management automation. When traditional equipment is used to monitor multiple power parameters, multiple power monitoring instruments are often used to distinguish and detect the main circuit and branch power parameters. The system is complex and the cost is high. Therefore, it is necessary to develop a multi-channel power detection system. To this end, the three-phase digital meter is a digital meter that integrates sampling, DSP , ARM and other technologies by using an embedded system to achieve complex rates, measurement and display of multiple parameters, rich interfaces and easy expansion. Based on the ADE7878 chip, a digital control power detection system is designed in this paper. It can measure 1 voltage, 4 currents, 4 powers and 1 electric energy. The detection accuracy can reach 1%. The system's hardware and software design is also given. The design has been applied in the development of related products. At the same time, this design method also lays the foundation for the development of related products.

    1 ADE7878 Introduction

    The ADE7878 is a high-precision, three-phase energy measurement IC. The ADE7878 is suitable for measuring active, reactive, and apparent power in various three-wire and four-wire two- and three-phase configurations, such as wye or triangle. Each phase has a system calibration function, namely, RMS offset correction, phase calibration, and gain calibration. The CF1, CF2, and CF3 logic outputs can provide a variety of power information: total/fundamental active/reactive power, total apparent power, or current RMS sum.

    The ADE7878 has waveform sampling registers that allow access to all ADC outputs. The device also provides power quality measurements, such as short-term low or high voltage detection, short-term high current changes, line voltage cycle measurement, and the angle between phase voltage and current. Two serial interfaces, SPI and I2C, can be used to communicate with the ADE7878, while a dedicated high-speed interface, the high-speed data acquisition (HSDC) port, can be used in conjunction with I2C to access ADC outputs and real-time power information. The device also has two interrupt request pins, /IRQ0 and /IRQ1, to indicate that an enabled interrupt event has occurred.

    2. Design of power detection system

    2.1 System Design Principles

    The entire detection system consists of LPC2132 control and data storage module, signal conditioning and acquisition module, multi-channel signal switching module and communication module. We use LPC2132 control chip to realize various functions of the power detection system. The AC voltage and current signals are output to the sampling range of ADE7878 through the signal conditioning circuit and the 4052 multi-channel signal switching circuit. ADE7 878 ​​converts the analog signal into digital quantity. The LPC2132 chip obtains the data of ADE7878 through the I2C communication interface. At the same time, LPC2132 switches the 4052 multi-channel switch in time to switch the current signal of each branch to the ADE7878 chip. The detection system is equipped with an EEPROM power-off storage unit, which can store the calibration parameters and electric energy data of ADE7878. The communication module can communicate with the computer through the RS485 communication interface and upload the collected data information. The implementation principle of the power detection system is shown in Figure 1.

a.JPG

    2.2 System Hardware Design

    The hardware system design is mainly divided into three parts: signal conditioning and acquisition module, multi-channel signal switching module, MCU control and data storage module and communication module.

    2.2.1 Signal conditioning and acquisition module

    Voltage sampling is achieved by resistor voltage division. A large resistor and a small resistor are connected in series to sample the voltage signal at both ends of the small resistor. In this way, the output terminal VA (VB, VC) outputs an analog voltage ranging from 0 to 500 mV. The analog voltage signal is input into ADE7878. The schematic diagram of the signal conditioning and acquisition circuit is shown in Figure 2.b.JPG


    The calculation formula and voltage coefficient of the voltage sampling circuit are shown in equations (1) and (2). The
    c.JPG
    current sampling sensor uses a current transformer . The primary side is directly the actual measurement circuit, and its secondary side outputs a current signal (the specific output current size depends on the needs). Therefore, current sampling is implemented by series resistance. Two resistors are connected in series to obtain an AC voltage signal ranging from 0 to 500 mV. The analog voltage signal is input into the current sampling circuit calculation and current coefficient calculation formula of ADE 7878 as shown in equations (3) and (4).
   d.JPG
    When collecting multi-channel electrical signal, it is necessary to switch the analog signal of 4052 to ADE7878 chip in time. In the actual circuit, due to the error of the selected resistor itself and the existence of input offset, temperature drift and other problems, the zero position and linear coefficient of the above calculation formula will have a slight deviation. The accurate coefficient and zero position can be obtained by calibration.
2.2.2 Design of MCU control system
    In order to improve the reliability of the acquisition system, the LPC2132 chip based on the 32-bit ARM7 core is selected as the main processor and the external reset circuit is used to achieve reliable reset. In this way, a small, inexpensive processor core can achieve high instruction throughput and real-time interrupt response. The schematic diagram of the MCU control system circuit is shown in Figure 3.

e.JPG

    In order to reset the system correctly, a dedicated reset chip CAT1025 is used in this system. CAT1025 integrates a system power monitoring circuit. When the system voltage is higher than the set voltage, the system is started after a delay of 200 ms, which makes the reset time of the system at power-on longer than the reset time required by the LPC2132 chip, so that the system can be reset normally.

    2.2.3 Design of multi-channel signal switching module

    This system uses an electric energy chip to collect 4-way current, power or single-way current, power, and electric energy data. The key to realizing multi-way current detection is to switch each current signal through CD4052/CC4052 to access the ADE7878 chip.

    CD4052/CC4052 is a differential 4-channel digitally controlled analog switch with two binary control inputs A and B and an INH input, with low on-resistance and very low off-leakage current. These switch circuits have extremely low static power consumption over the entire power supply range, regardless of the logic state of the control signal. A two-bit binary input signal selects one of the four pairs of channels and can connect the input to the output. Its typical application principle is shown in Figure 4.

f.JPG

    When collecting multiple currents, LPC2132 controls the signal of each branch to access the sampling pin of ADE7878 through the control terminal of CD4052. Since the ADE7878 chip has the DSP algorithm principle inside, there is a problem of data establishment time. Therefore, the access time of detecting the current signal of each branch should not be too short, otherwise the correct data will not be calculated and the data error will be large. In order to prevent the interference of CD4052 control signal line, the control signal line is connected to the pull-up resistor, which has little impact on the switching process and works reliably.

    2.2.4 Design of communication module

    The serial communication interface of the LPC2132 chip uses TTL level, so it cannot directly communicate with the standard serial communication interface of a PC. A conversion circuit from TTL level to RS485 protocol level signal must be designed.

    MAX485 is a chip that converts TTL level to RS485 level. The RS485 bus standard uses balanced transmission and differential reception for data communication, and uses the voltage difference between signal lines A and B to transmit data. It is a two-wire signal transmission method. The RS-485 bus is very convenient for multi-point interconnection, which can save many signal lines. RS-485 can be used to interconnect to form a distributed system, allowing up to 32 drivers and 32 receivers to be connected in parallel, but only one driver is allowed to work on the same signal line at the same time.

    2.3 System software design

    In this system, the microcontroller program consists of three modules, namely the initialization module, the serial port communication module and the ADE7878 communication and control module.

    After the system is reset, the microcontroller first initializes the parameters (such as the serial communication baud rate). It also reads the ADE7878 calibration parameters and stored power parameters from the EEPROM chip, and writes the calibration parameters into the ADE7878 chip to achieve accurate detection of power parameters. Then, at fixed intervals, the 4052 switch circuit is operated in a timely manner to switch and collect power data from each channel, and the power parameters collected by the ADE7878 are read, and the power parameters are stored in the EEPROM chip in a timely manner, and the watchdog is cleared in a timely manner. If a correct communication event occurs, the collected power data is uploaded via the RS485 communication interface. The program control flow is shown in Figure 5.g.JPG

    3 Conclusion

    The circuit used in this system can realize the collection of multi-channel power data with one power metering chip, and the accuracy can reach 1% within the rated sampling range of each power data. The circuit is simple, flexible in application, high in accuracy and low in cost. All technical indicators of the system have met the design requirements, the system is reliable, and has been put into use with high use value, which is of reference significance for the development of process monitoring, data collection and other systems.


Keywords:ADE7878 Reference address:Design of multi-channel electronic parameter collection system based on ADE7878 and embedded technology

Previous article:Design of brushless DC motor control system based on LPC1766
Next article:Interface circuit and driver design of nRF2401 based on S3C2440

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号