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.
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.
The calculation formula and voltage coefficient of the voltage sampling circuit are shown in equations (1) and (2). The
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).
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.
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.
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.
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.
Previous article:Design of brushless DC motor control system based on LPC1766
Next article:Interface circuit and driver design of nRF2401 based on S3C2440
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Modbus RTU master-slave protocol made by dsp
- After 8 days, I finally added a mechanical hard drive to my laptop
- Evaluation Weekly Report 20220124: Yatli AT32F425 and Qinheng CH582 apply for online launch ~ National Technology and other evaluation reports updated
- Shouldn't we buy chips on Taobao?
- [ESP32-S2-Kaluga-1 Review] 3. Getting started with Ubuntu and updating under Ubuntu
- GD32L233C-START Development Board Study Notes (Part 3)
- EEWORLD University ---- "Embedded Artificial Intelligence" - Chinese Chatbot Development
- Can Software Radio Become Open Radio?
- Sincerely recruiting embedded software and hardware engineers
- The problem of sending 10 seconds of data through the network port