Abstract : This system includes a front-end processing network, a relay power-off control circuit, an electrical parameter measurement module, a microcontroller keyboard, and a display circuit. It can measure the RMS voltage, RMS current, active power, energy, power factor, and frequency of AC signals. Simultaneously, it performs real-time LCD display of various electrical parameters, high-current detection alarms, and low-energy alarms. The SPCE061A microcontroller is mainly used to control the LCD display of various electrical parameters, input set values via the keyboard, and control the on/off state of the relays. The system also includes extended functions such as voice broadcasting and harmonic power analysis.
Keywords : electrical parameters, measuring instrument, SPACE061A, CS5463
I. Introduction
The measurement of various electrical parameters is an important part of power system design, including parameters such as voltage, current, power, and electrical energy. This paper designs an electrical parameter measuring instrument with the Sunplus SPACE061A microcontroller [1] as the control core. By reading and writing the intelligent power measurement chip CS5463, the instrument can measure and display various parameters of the power in real time.
II. System Design
2.1 System Overall Design
This system mainly consists of SPCE061A microcontroller, power supply circuit, sampling network, relay switch module, true RMS measurement circuit, keyboard display and clock modules, etc. The system block diagram is shown in Figure 1.
Figure 1 System structure block diagram
2.2 RMS value conversion design
The CS5463 is an integrated power measurement chip that integrates two ΔΣ analog-to-digital converters (ADCs), high-speed power calculation functions, an energy-frequency converter, and various electrical parameter calculation chips. Figure 2 shows the structural circuit diagram of the CS5463.
Figure 2 Schematic diagram of the internal structure of CS5463
The grid voltage is converted into a small voltage signal by the voltage divider circuit and input to the voltage channel input pin of CS5463A. The grid current is converted into a small current signal by the current transformer and then input to the current channel input pin of the chip by the current sampling circuit. CS5463A performs digital processing on the converted signal and calculates the measured grid voltage, current, power and other data. Then it communicates with the metering microprocessor through an SPI port to transmit the measured data to the metering microprocessor for processing, such as calculating the power factor angle and frequency; determining the direction of active and reactive power and whether the voltage is in reverse phase sequence; and performing number system conversion, etc. [2]. Figure 3 is the circuit connection diagram of CS5463.
Figure 3 shows the circuit connection diagram of CS5463.
2.3 Power Module
To meet the power requirements of each module in the system, we selected 7805 and 7905 to generate positive and negative 5V voltages to power CS5463 and SPCE061A respectively. The circuit diagram is shown in Figure 4.
Figure 45V power supply circuit schematic
2.4 Relay Switch Module
Solid State Relays (SSR) are contactless electronic switches that are assembled from discrete components, film fixed resistor networks and chips using a hybrid process to achieve electrical isolation and signal coupling between the control circuit (input circuit) and the load circuit (output circuit). The load switching function is achieved by solid-state devices, and there are no moving parts inside [3].
2.5 Clock Circuit
The DS1302 clock chip is used to record power in time-sharing mode. The DS1302 is a high-performance, low-power real-time clock circuit with RAM launched by DALLAS in the United States. It can keep track of year, month, day, day of the week, hour, minute and second, and has a leap year compensation function. The operating voltage is 2.5V to 5.5V. It uses a three-wire interface to communicate synchronously with the CPU and can transmit multiple bytes of clock signal or RAM data at one time in burst mode. The DS1302 has a 31×8 RAM register inside for temporary data storage[4]. Figure 5 is the wiring diagram of the DS1302.
Figure 5 DS1302 circuit schematic
2.6 Button Module
The buttons utilize the ZLG7289B chip. The ZLG7289B is an intelligent display driver chip designed by Guangzhou Zhouligong Microcontroller Development Co., Ltd., featuring an SPI serial interface that can simultaneously drive an 8-bit common-cathode seven-segment display or 64 independent LEDs. This chip can also connect to a keyboard matrix of up to 64 keys, enabling a single chip to perform all functions of LED display and keyboard interface.
The ZLG7289B contains an internal decoder that can directly accept BCD or hexadecimal codes, and supports both decoding modes simultaneously. It also features various control commands such as blanking, blinking, left shift, right shift, and segment addressing.
The ZLG7289B has a chip select signal that can easily realize a display with more than 8 bits or a keyboard interface with more than 64 keys. It is often used for input of various instruments and can easily expand the input function. Its typical application schematic diagram [5] is shown in Figure 6.
Figure 6. Typical application circuit schematic of ZLG7289B
2.7 LCD Display Module
The LCD uses the OCMJ4X8C dual-use LCD for both graphics and Chinese characters, which is small in size and lightweight. Its interface circuit is simple, allowing direct connection to a microcontroller and displaying rich content. It saves I/O ports while providing a user-friendly human-machine interface. This module transmits data serially through the host computer.
2.8 System Software Design
The software design primarily handles: human-machine interface setup, relay control and alarm functions, CS5463 data processing and LCD display, printer output control, and real-time clock chip control, enhancing the instrument's intelligence. The system software flowchart is shown in Figure 7, and the electrical parameter measurement flowchart is shown in Figure 8.
III. Principle Analysis and Calculation
Figure 9 CS5463 Internal Data Measurement Flowchart
Figure 9 shows the internal data measurement flowchart of CS5463. According to the formula in the CS5463 chip manual [2] :
IV. Error Analysis and Solutions
1. Error Analysis:
(1) The accuracy of the measured value is affected by the error between the reference power supply line voltage and line current inside the chip relative to the power supply.
(2) The power grid signal fluctuates significantly, and the transformer ratio is inaccurate, affecting the electrical parameters.
Precision.
(3) Voltage and current transformers and other sensors/filters/protection devices added to the front end of the voltage/current sensor network often introduce phase delay, which disrupts the phase relationship of the measured voltage and current signals and affects the accuracy of parameters [6] .
2. Solutions:
(1) Before the system runs, it is first verified to obtain the zero point offset, full scale offset and temperature drift, etc. The measurement parameters are corrected by using the calibration register inside the CS5463.
(2) By filtering the input at the front end, the influence of harmonics is reduced, and the filtering channel inside the integrated chip is opened to improve the anti-interference capability.
(3) The phase compensation coefficient is obtained through the preliminary verification and then input into the integrated chip for compensation.
V. Summary
This system uses a high-performance integrated power measurement chip as its core, and the SPCE061A microcontroller handles control and provides a user-friendly human-machine interface, enhancing the system's practicality. The CS5463 offers high-precision measurement performance and integrates comprehensive measurement functions such as RMS value, active power, frequency, and power factor. Furthermore, the SPCE061A microcontroller expands the system with voice broadcasting and printer output capabilities.
About the author:
Fu Wei (1986.9-) Male, is a master's student at the School of Control Science and Engineering, Shandong University. His research interests include advanced computer control systems and image processing.
Dong Minya (June 1988 -) is a male master's student at the School of Control Science and Engineering, Shandong University. His research interests include systems engineering.
Zhang Liansheng (1985.12-) Male, is a master's student at the School of Control Science and Engineering, Shandong University. His research direction is advanced computer control systems.
Contact information: Fu Wei, 15194104985, [email protected]
Mailing Address: Room 102, School of Control Science and Engineering, Qianfoshan Campus, Shandong University, No. 17923 Jingshi Road, Jinan, Shandong Province, 250061, China