Critical Building Blocks of Smart Meters

Enhancing Reliability, Security and Cost-Effectiveness of Smart Meters



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.


Basic Building Blocks Used in the Embedded Software of Metering Products:


Embedded Software Metering Product


Here is a brief description of each of these elements:


HAL (Hardware Abstraction Layer)

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.


Measurement and Processing

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:

  • AFE + External separate/multiplexed ADCs + MCU i.e. separate ADC for each channel or sigma-delta multiplexed multi-channel ADC with MCU. MCU polls each channel at a particular interval and processes it. In this process, it accumulates the products of voltage and current sample data and derives active power by dividing the accumulated value with the number of samples. It also multiplies the active power by time and gives the consumed active energy to derive the final parameters. Here, the digital data from ADCs is for current and voltage applied at each channel. Hence, the MCU applies a suitable signal processing algorithm to convert them into final parameters. This solution gives flexibility.
  • AFE + MCU with built-in multichannel ADCs and DSP i.e. MCU has inbuilt ADCs along with DSP functionality.
  • ASIC + MCU: There are many metrology specific Analog-Front-End chips available in the market. These chips can be connected with the MCU by using serial (SPI/I2C) interface. An ASIC provides a number of digital registers which represent energy, RMS and frequency values in terms of raw digital counts. Thereafter, the final parameters are derived by the MCU.
  • SoC: These are advanced all-encompassing solutions in chips that can address ADC + signal processing + MCU. For example, Maxim’s Zeus & 71M6541DT/FT and TI’s MSP430FE42x(A)/FE42x2 and MSP430F677x are complete SoCs for metrology, security and processing.


Storage Handling

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.


Time Keeping

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.


Alarm and Event Logging

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.


User Interface

The meter software should be capable of handling the following factors in order to provide a suitable user interface:


  • An LCD display (customized 7-segment) is used to read/review meter settings for billing and other configurations. It may consist of various screens such as load survey, diagnostics, measurement, tampering information, meter configuration, calibration etc.
  • Front panel push/scroll buttons are interfaced in order to navigate through different screens and configurations. The display navigation can also be put in an auto scroll mode.
  • Front panel LED indicators are used for indicating consumed energy, calibration, communication status etc.



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:

  • Enable meter data reading by directing commands to the meter
  • Configure the meters
  • Upgrade meter firmware in-field



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.


Current Trends

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.

About The Author

No Comments