As people's electricity management methods are gradually improving towards being more intelligent, efficient and networked. In this paper, the high-performance Ethernet control chip W5100 is used in combination with network technology, and the dedicated power metering chip CS5460A is used to study the remote transmission of electrical parameters. By embedding W5100 into Ethernet, remote data transmission can be achieved, and the current, voltage and power values collected by CS5460A can be effectively transmitted to the PC, thus completing the power metering and charging management well.
1 System overall design
The design uses Cirrus Logic's dedicated energy metering chip CS5460A, WIZnet's Ethernet controller W5100, ST's STM32F103V as CPU, LCD display, network transformer 911105A, RJ45 interface, etc. The system block diagram is shown in Figure 1.
Figure 1 System Block Diagram
2 System Hardware Design
2.1 W5100 and CS5460A
W5100 is a multifunctional single-chip network interface chip with an integrated 10/100 Ethernet controller. It is mainly used in highly integrated, highly stable, low-cost embedded systems, and can achieve Internet connection without an operating system. W5100 integrates a full hardware TCP/IP protocol stack that has been verified by many years of practice, and also integrates 16 kB of memory for data transmission.
CS5460A is a highly integrated △∑ analog-to-digital converter (ADC) that includes two △∑ analog-to-digital converters (ADC), power calculation function, energy to frequency converter, high-speed energy calculation function and a serial interface. It can accurately measure instantaneous voltage, current and calculate active energy, reactive power, instantaneous power, IRMS, VRMS, and is used to develop single-phase, 2-wire and 3-wire meters . To facilitate signal transmission with external controllers, CS5460A integrates a simple three-wire pass-through interface, which is compatible with SPITM.
2.2 Front-end conditioning circuit design
The conditioning circuit composed of a mutual inductor and a precision resistor network is used to convert the voltage and current into small voltage and current signals that the chip can accept. This solution is simple in design and high in precision. It also isolates the chip from the power grid, ensuring the safety of the chip. The hardware circuit is shown in Figure 2.
Figure 2 Front-end conditioning circuit
2.3 Data measurement and collection
2.3.1 Current and voltage measurement
The CS5460A can measure voltage using a voltage transformer or a relatively large voltage-dividing resistor, and measure current using a relatively low-cost current transformer or shunt.
CS5460A has a power calculation engine and a dual-channel ADC for energy-to-pulse conversion. The voltage channel input pin VIN± has a voltage signal wave input at both ends, which is amplified by a 10-fold gain amplifier and then digitized by 2nd△∑ modulation. At the same time, a voltage signal wave is input at both ends of the current channel input pin IIN±. To adapt to different levels of input voltage, the current channel integrates a gain programmable amplifier (PGA) so that the input level range can be selected as ±250 m VRMS or ±50 m VRMS. It is digitized by a 4th△∑ modulator. The sampling rate of the two modulators is MCLK/8.
Both channels offer a selectable high pass filter added to the signal path to remove DC content from the current and voltage signals prior to VRMS/IRMS active power.
The digital filter input word is based on DC offset adjustment and gain calibration. The instantaneous voltage and current measured after calibration are valid. The RMS value is calculated using the most recent N grid instantaneous voltage/current sampling values, which can be read from the IRMS and VRMS registers.
2.3.2 Power Measurement
From the basic definition of electric power, we know that electric power is equal to the product of voltage and current.
P=I×U (2)
In the formula, P is electric power; I is current; U is voltage.
At present, there are two methods for measuring electric power: pointer-type power meter measurement method and analog multiplier measurement method.
Pointer measurement method is simple to measure, has low frequency response, low accuracy, and the price of power meter with low power factor is high. Analog multiplier measurement method: It uses a dedicated integrated chip for measurement, which has high accuracy but the price of the whole meter is high. From the definition of electric power, we can know that the power consumed by the circuit represented by analog quantity is
In the formula, u and i are instantaneous values respectively; T is the accumulation time. In order for the voltage and current signals to be received by the STM32 system, they must be sampled. The expression of electric power expressed as a discrete quantity is:
Among them, △t is the sampling interval; N is the total number of sampling times; uk and ik are the sampling values of a certain instantaneous voltage and current. The sampled value must be quantized, that is, converted into a digital signal before it can be received by the computer. The process of sampling and quantization is the process of A/D conversion.
In addition, the instantaneous voltage/current sampling data is multiplied to obtain the instantaneous power. The N instantaneous powers are averaged to calculate the active power value to drive the electric energy pulse output. [page]
inspecting power
S=VRMS×IRMS (5)
After measuring and calculating the data, the obtained IRMS, VRMS, instantaneous values of current, voltage or electric energy are written into different data registers respectively, waiting to be read by the main controller STM32.
3. Software Design of Communication Interface
The software design of the host computer is written using LabVIEW's DataSocket technology. DataSocket can easily realize data exchange between test interrupts and field instruments, while meeting the requirements of time execution and security. The system software flow chart is shown in Figure 3.
Figure 3 System software flow chart
3.1 The client receives data sent by the server
The client receives the data sent by the server, namely DataSocket, and the application flowchart of reading the data stored in the internal register of W5100 is shown in Figure 4.
Figure 4 Design of receiving data loop
The data is uploaded by the server W5100, read by the DataSocket Read control and then sent to the remote control panel. The data type is first described on the DataSocket Read side, or the data type is converted by the variant value data conversion node Variant ToData, and displayed on the PC. The displayed value is consistent with the collected data sent by the server, achieving the purpose of the remote monitoring test system. At the same time, a write measurement file (Write LabVIEWMeasurement File Express VI) is used to save the data for easy access and viewing. In the block diagram, the "connection in" input is the URL saved by W5100, and the value display control displays the measured electrical parameters. The flowchart of the program for displaying and saving historical data is shown in Figure 5.
Figure 5 Reading data program flowchart
3.2 The client transmits data to the server
The core of the write module is DataSocket Write.vi, which needs to specify the URL address before working. Each time the VI receives data from the previous step, it forms a data packet and sends it to the destination address. The historical data read and saved through DataSocket Read can be written to the server through DataSocket Write, and the server reads the remote control signal from the server through DataSocket Read, and then implements different control functions according to the control signal function, displays and saves it. The program flowchart is shown in Figure 6.
Figure 6 Design of the data transmission loop
4 Implementation process and design results
The specific implementation process is as follows: the front-end circuit conditioning module converts the input large voltage signal into a small voltage signal that CS5460A can accept, and inputs it in the form of differential mode voltage or current. CS5460A transmits the instantaneous voltage, instantaneous current and instantaneous power input by the sampling circuit to the main controller STM32F103 through the SPI serial port. The voltage or current signal is input through the rich peripheral interface of STM32F103 or through the external DataBus, and then the STM32 processor is used to pre-process the transmitted current or voltage data, and then the data is passed to the W5100 chip through the SPI interface to complete the network protocol processing, and finally the signal is transmitted to the PC through the network connection port, thereby realizing remote human-computer interaction.
5 Conclusion
The main controller is the microprocessor STM32F103VET6 based on ARM Cortex-M3. The power measurement chip CS5460A is used to accurately measure the power. The Ethernet technology is used to monitor the power, thus realizing the remote transmission of electrical parameters. Remote electrical parameter measurement technology is one of the development directions in the field of measurement and control. The emergence of various new technologies, new devices, new theories and the rapid development of computer networks will promote the development and application of remote electrical parameter measurement technology.
Previous article:Design of home security alarm system based on wireless sensor network
Next article:Design and Simulation Analysis of ARM Parallel Bus Based on FPGA
Recommended ReadingLatest update time:2024-11-16 22:46
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
- [Red Envelope Ask] Linux kernel outputs garbled code after entering the serial console
- How to calculate the temperature rise of MOS tube and LDO in the most reasonable way
- Review summary: Experience the fresh goods of live broadcast ~ ST60 short-distance, non-contact connector
- Maxim has a letter, received the evaluation board
- How to calibrate a vector network analyzer?
- [Chuanglong Technology Allwinner A40i Development Board] Building a development environment and Qt development experience based on virtual machine images
- Get the relevant information required by SensorTile.box contestants (including official training and moderator evaluation)
- stratix iiiFPGA development board
- FPGA design pin allocation points.pdf
- msp430 buttons to control LED lights in real time