- Know Ascenten
- Leverage our Expertise
- Tech Notes
- Contact Us
Utilities all over the world utilize smart meters for residential, commercial and industrial purposes. Smart meters lower operational and capital expenses, support new services for customers and improve operational control. However, since the type of smart meter varies according to the regulatory requirements of each region, it is prudent to develop some common building blocks in the firmware for any required modifications.
The emphasis of this article is on these basic elements required in the meter’s software design. In order to address this, it is very important to consider the essentials in its hardware and how different elements are interfaced with MCU, which executes the embedded software.
The MCU executes the software residing in its program memory to serve all required energy meter tasks by interacting with other peripherals such as ADC/metering ASIC, EEPROM, display, communication interface, I/Os, RTC, timers and interrupts. The HAL comprises the software which boots the hardware by initializing the MCU (including its on-chip peripherals) along with other mentioned external interfaced hardware.
It comprises an Analog-Front-End, sampler of analog signals and signal processor.
Analog-Front-End (AFE) attenuates high current and voltage to sufficiently small voltage values so that they can be measured by the ADCs. Afterwards, the ADC samples voltage and current signals and converts them to digital form. AFE provides amplification based on the ADC resolution and required class accuracy.
The MCU retrieves the digital data for signal processing and derives final parameters such as energy, power, RMS, power factor, frequency etc. In electricity metering, for this stage, several methods can be used:
The meter should have a permanent storage like EEPROM or NVRAM to keep the configuration and energy measurement intact even after the power cycle. This memory may be either an on-chip peripheral or an external interface through SPI/I2C. It stores measurement parameters such as kWh, kVARh and kVAh along with various device configuration parameters, calibration co-efficient and alarm/event log with timestamps.
In the metering domain, utility or distribution companies may have different billing rates based on the timings, demand, load etc. This makes the RTC, also known as the Real Time Clock, an essential part of the meters as it provides a time stamp when an alarm or event occurs in the meter.
As the RTC should have a battery backup, a dynamic power switch can be used to switch from the VCC (generated from a main power line) domain to the VBAT (battery power) domain. When the VCC voltage is restored, the power is switched back to VCC. This dynamic power switch can be triggered by firmware or by hardware. Switching delay needs to be taken care of in order to avoid RTC reset.
The prevailing meter designs employ two types of measuring elements to measure active power in both the forward and return path of current. This enables the meter to detect, indicate and continue to measure reliably even when it is subjected to the external attempts of tampering. Events like neutral missing, magnetic, case open, etc. can also be registered and stored in the meter’s permanent memory.
Prepayment is one of the mandatory requirements in the meter designs today. Thus the software should be tuned to its corresponding configuration.
The meter software should be capable of handling the following factors in order to provide a suitable user interface:
One of the most critical aspects of smart meters is their ability to communicate with the base stations and other interfaces. DLMS/COSEM, Modbus and other proprietary protocols are utilized to standardize the communication. The following functions should be fulfilled in any meter communication software:
Communication security must be implemented in all data communication between utility server and meters. Encryption/crypto algorithm and authentication information are the key security elements.
The meters should have various configuration parameters such as meter ratings (nominal voltage & base current), CT & PT ratio, topology (single phase or polyphase), pulses/kWh for pulse output and input, communication, calibration etc. These parameters can be updated by using front-panel push buttons and the communication link.
Calibration of the meter firmware is done by modifying nominal voltage and base current, externally applied voltage and current from any standard supply source. The resultant co-efficient are stored in the EEPROM.
In some meters, the front panel has an LED indicator which represents the consumed energy (kWh) through the configured pulses/kWh. By reading these LED pulses, one can calibrate the meter by configuring its constants locally.
Utilities and meter manufacturers are directing the development of an Advanced Metering Infrastructure that is based on new communications, encryption and semiconductor solutions. The AMI would greatly contribute to improve the reliability, security and cost-effectiveness of smart meters.