Energy metering design based on C2000's built-in 12-bit ADC

Overview:
This application note describes a solution for implementing software energy metering based on the C2000 core and an on-chip 12-bit ADC. The C2000 is a 32-bit high-performance real-time microcontroller manufactured by Texas Instruments Semiconductor Co., Ltd., which is widely used in various real-time control fields such as motor drives, digital power supplies, and power control. Power and power calculations are often used in these applications. An input signal exists as a feedback control. Therefore, integrating the software energy metering algorithm into the C2000 platform is the key to realizing various real-time control SOC schemes. This paper introduces the specific method of implementing software measurement algorithm on C2000 and the usage method of TI's C2000-based software measurement library, and gives the test results.

1 C2000 Metering Library Introduction
1.1 Application Background The promotion and implementation of energy saving and environmental protection make most household appliances have the demand for energy consumption statistics. For this huge application market, the application advantages of C2000 chip in the home appliance motor power supply are compatible and expanded at the cost of minimum hardware cost. The energy consumption statistics function is the purpose of this design.
The C2000 chip focuses on motor power control and its excellent performance has been widely recognized in the industry. This design is based on the C2000 Piccolo series of chip-built software test platform, to achieve a software library to meet the smart home energy metering, using the minimum hardware cost to achieve a rich C2000 application field.
1.2 Introduction to Hardware Platform and Software Library This reference design hardware platform uses C2000 Piccolo Entry Line Control Pad, which is a set of low-cost C2000 development board provided by TI. Based on the circuit built by this platform, the development of measurement library can enable users to learn gradually. The C2000 develops and programs a set of energy consumption measurement software.
This reference design implements a single phase energy metering solution. The purpose of the reference design is to achieve a complete single-phase metering library. Enable users to quickly build their own single-phase metering solution based on this reference design. The code library provides active power, reactive power, apparent power, functional quantity and no function quantity. At the same time, it can also measure the loop current RMS, voltage RMS, power factor, frequency and other parameters to meet the needs of single-phase energy metering. The software supports digital calibration.

2 The second part of the measurement circuit and function description
2.1 When the metering code library calls the metering library, you only need to add all the files in the emeter directory to use the metering function. Among them, the file emeter-interface.h declares all external calling interfaces for the program to call to realize the function of reading and metering data.
The algorithm library default configuration ADC conversion rate is 3200 points / sec, conversion data is 12bit, data range 0-4096, to achieve single-phase measurement. The function adc_interrupt() implements the operation of the original converted data, and measurement_callback() is responsible for further processing the data preprocessed in adc_interrupt(). Therefore, you can call adc_interrupt(adc_raw[2]) in each interrupt of the ADC, or you can cache multiple points and then call this function. The function enters the parameter adc_raw as the signal input, adc_raw[0] is the voltage conversion data, adc_raw[1 ] is the current conversion data.
The implementation process of adc_interrupt(), measurement_callback() is shown in Figure 1:

Figure 1 Flow chart of the measurement software (please read the PDF document for details)

1000 Kw Coal Gas Generator

1000 Kw Coal Gas Generator,Coal Gas Engine,190 Series Coal Gas Generator,500Kw Coal Gas Generator

Jinan Guohua Green Power Equipment Co.,Ltd. , https://www.guohuagenerator.com

Posted on