Single chip microcomputer realizes flexible and innovative electric meter design

Publisher:电子科技爱好者Latest update time:2012-06-25 Source: OFweek Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, the number of fixed-function energy meter integrated circuits ( ICs ) on the market has increased, making it increasingly difficult to remain competitive in energy meter design. Many analog front-end (AFE) energy metering ICs use delta-sigma ADCs and a ROM-based fixed-function state machine to calculate the power output. These ICs cannot be modified or used for functions other than energy measurement .

Digital computation blocks such as active power, apparent power, and RMS current and voltage all have fixed functions, run at fixed frequencies, and have fixed output accuracy. While these devices perform their fixed functions well, this approach does not provide enough flexibility for designers.

Figure 1a Typical ROM-based meter design

Figure 1b: Eliminating the line between energy metering ICs and flash MCUs

Previously, IC manufacturers only offered ROM-based energy metering ICs as open-source solutions to perform these functions; now, they offer solutions in the form of delta-sigma configurable flash designs. This article presents a complete meter design example that uses approximately 7 KB of program words to implement a complete three-phase meter IC. The design is interrupt driven and uses only 50% of the interrupt processing time (the system's power frequency is 60 Hz, with 128 samples per cycle). Of the 130 μs time window, approximately 65 μs is used for all three phases of calculations, including calibration of offset voltages, gain, and phase voltages, as well as LSB adjustment. The power output registers for high-precision meter designs require up to 48 bits, so performing this math on a low-cost 8-bit microcontroller (MCU) is not trivial. This flash solution offers great flexibility and many advantages over ROM-based meter ICs, which will be described in this article.

ROM-based meter designs rely on external memory for meter calibration and intelligent loading of state machines, a costly two-stage approach. The third stage of the signal flow must load calibration constants into the fixed-function energy metering IC. By combining the computational capabilities in a ROM-based AFE with a central flash-based MCU, one of these stages can be eliminated. The meter calibration algorithm and constants can all be included in a single stage, which helps reduce IC count and system cost.

Electricity meter accuracy requires reliable analog performance

Before making design decisions about calculations and meter calibration, designers must ensure that the analog design is reliable. The system's analog and ADC performance will ultimately limit the overall accuracy of the meter. Driven by design trends, shunt currents and signals are getting smaller and smaller, so energy measurement ICs with lower ADC noise and higher resolution will be more in line with market needs. To develop IEC-compliant meters (including 0.5 and 0.1 class meters), a 16-bit dual-channel ADC with low noise, negligible crosstalk and excellent linearity will be a solid starting point.

Microchip Technology's MCP3909 energy metering IC is a delta-sigma device designed specifically for energy metering applications that meet the above criteria, and it includes flexible digital blocks and communication paths. The IC's two onboard 16-bit analog-to-digital converters have a signal-to-noise-distortion ratio (SINAD) of 82 dB, supporting dynamic range measurements far exceeding IEC requirements. The IC's onboard PGA (gain up to 32 V/V) supports signal size and measurement error accuracy as shown below. In addition, the device allows designers to control the ADC and multiplier outputs, as well as the filter inputs.

Figure 2 Flexible communications support high-precision, modular meter design

The device can be used with an MCU or as a standalone metering solution. In some cases, a two-chip solution is not completely required for an energy meter design. In these cases, it is sufficient to keep the power calculation function in the meter IC. Fixed-function DSP blocks that perform active power calculations and generate pulse outputs to drive mechanical counters have been very successful in the industry. This pulse output calculation block has become the industry standard and is included in the MCP3909 IC. Millions of meters use this single-chip solution, which only requires a single-point calibration. This type of design can be used in both discrete and MCU-based meters, and this flexibility can greatly help meter manufacturers in device certification and testing .

Additionally, having a single meter IC suitable for multiple meter designs can benefit meter designers and manufacturers, and ultimately utilities seeking reliable solutions. The dual functionality of the MCP3909 device makes it very flexible and suitable for a wide range of meter designs.

Dual-function energy metering IC

This design concept is implemented through dual-function pins that allow designers to directly access the delta-sigma ADC and multiplier outputs. This approach brings great flexibility to the interaction between the energy metering IC and the flash MCU. With direct access to the voltage, current, and power ADC outputs, the digital calculation function can now be transferred to the flash MCU, which can be used as a calculation engine and central processor at the same time.

Design Example: Three-Phase Electricity Meter Design

Figure 3 shows a three-phase electricity meter reference design example that uses Microchip’s MCP3909 and PIC18F series high-end 8-bit microcontrollers (MCP3909-3PH18F-RD1). This example combines a directly accessible delta-sigma energy metering IC with a low-cost Flash meter calculation engine, saving component cost and simplifying meter calibration and design. Configuration registers, power and energy registers, and RMS current and voltage registers are located on the Flash MCU. All registers are accessible through a serial interface , just as they are in a standard ROM-based metering IC.

Figure 3 Energy output and calibration registers in flash memory

A unique feature of this design is that after the meter is calibrated, the serially accessible registers contain values ​​in precise units of power. The decimal value of the register represents the decimal value of the amount of power. Registers up to 48 bits wide are available for power and 64 bits wide are available for energy. For example, registers with names ending in "W" correspond to the measured watts. Registers ending in "VA" contain the volt-ampere value for a given phase - "I" for the measured RMS current and "V" for the measured RMS voltage.

The concept of LSB correction allows designers to set the resolution of registers through automatic calibration software. The registers represent the LSB amount of power (kW), voltage (Volts), current (Amps), and energy (KWh). For example, a value of 1234 in a given output register represents 1234 Watts or 1.234 kW. This can greatly simplify the design of meter firmware when interfacing with other meter systems, modules, or output displays (such as LCD ).

The decimal point location, and therefore the resolution of the power quantity, is determined by the value entered into the meter design portion of the calibration software for this design. During the step of automating the meter calibration process through the software, the correct LSB correction factor is calculated to ensure that the least significant bit represents the least significant digit of a given quantity.

The meter design dialog in the software allows the user to enter specific meter parameters. For any given production batch of meters, customization can be done at production time to increase the ADC range for RMS or active power calculations. Other meter constants, such as no-load threshold limits, can also be easily changed at meter production time through the software/flash interface.

USB meter data reading/calibration

For advanced meter designs, the correction factors required for the meter are not only calculated externally at the time of manufacture, but also during calibration by software and calibration equipment. Communicating with the meter calibration software via USB is more practical because many PCs today no longer have the RS-232 serial ports that were once common. RS-232 only supports communication with one device connected to the bus at a time . When performing meter calibration, it is common to control the calibration voltage and current of 10 to 50 meters. Using RS-232, it is not possible to communicate with multiple meters from a single PC controlling the calibration.

USB monitoring and calibration software for electricity meters offers several advantages over traditional serial and parallel software solutions. These advantages include increased connectivity, wider communication bandwidth, and the ability to power multiple meters. In addition, using USB allows for rapid data collection from multiple meters.

Figure 4 shows the meter calibration and data reading using the Flash PIC18F and MCP3909 energy metering IC examples described earlier using Microchip's free USB meter software. For both solutions, the software interfaces support RS-232/485 and USB.

Figure 4 MCP3909 three-phase meter calibration software

This open source USB software has several advantageous features, including the ability to store and read the meter calibration status. The flash MCU contains some calibration status registers, which are used by the software to mark whether some specific power quantities have been calibrated. The phase calibration status is marked with a $ icon, as shown in Figure 4. This type of calibration can only be used for flash-based meter calculation engines and cannot be performed by ROM-based meter ICs. In addition, the system also keeps track of which phase is selected as the standard phase for phase-to-phase gain matching during calibration.

To help prevent meter tampering, an important aspect to consider when adopting this approach is code security and encryption. In addition to preventing tampering, it may be necessary to protect the intellectual property (IP) of the meter design. After modification for specific customer needs, if the meter calculation engine contains IP that the meter manufacturer wants to protect from the end customer, there are some options for implementing code security.

There is a level of security that locks the memory algorithms, prohibiting the reading of the contents of some memory areas through the serial port. Setting read and write locks on some areas of the MCU memory prevents other code sections (such as RS-485 or USB sections) from accessing protected areas, such as those where calibration and correction factors are saved. In addition, standard encryption algorithms are provided, such as the Advanced Encryption Standard (AES) and the Micro Encryption Algorithm 2 (XTEA).

Secure collaborative utility Instrumentation Design

Protecting intellectual property in collaborative utility metering system designs is also a common challenge, as customization of the meter calculation engine creates additional IP in the design. In utility meters, the meter design house, software IP vendor, sensor module , and OEM may each have their own IP, and the final meter may contain two or three embedded MCUs, each with different metering functions and IP specific to different companies. Using multiple devices with different IPs increases costs for the end customer and the utility company.

It is possible to combine multiple IP regions into a single device, while independently protecting each code region and integrating the solution into a single 16-bit MCU or digital signal controller (DSC). This collaborative approach to combining IP on a single device protects the IP of all parties and provides a lower cost end product.

New Options for Electricity Meter Design

Today, there is a wide selection of flash MCUs and analog products, which provide many exciting new approaches to meter design. In recent years, small-footprint flash MCUs with only 6 pins and a price of less than $0.40 have emerged, which has opened up new possibilities for low-cost single-phase meter calibration. In addition, the use of modular AFE computing modules can also easily develop higher-end 16-bit and 32-bit meters; these modules work together to achieve simplified calibration techniques and faster meter production. The high-precision, flexible AFE using delta-sigma ADC technology, combined with the intelligence of flash MCUs, has opened up new avenues for innovative single-phase and three-phase meter designs.

Reference address:Single chip microcomputer realizes flexible and innovative electric meter design

Previous article:The main reasons and solutions for inverter overload
Next article:Calculation method of power consumption of switch tube and rectifier tube

Latest Power Management Articles
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号