Smart Energy Meter using Arduino

The specific feature of Arduino smart energy meter is their ability to communicate the meter data to the supplier and consumer. Due to large network coverage, low cost and with negligible maintenance, availability, sending the data through SMS (GSM) is a useful and handy tool. Arduino based Smart energy meter also records data locally, prevent tempering and overloading.

Arduino Based Single Phase Smart Energy Meter

An Arduino based smart metering system comprising of a smart energy meter and a mobile phone acting as a central server receiving all the data sent by the energy meter. Other features of smart energy meter using Arduino are:

  • Meter measures, record and integrate the energy consumption of the load connected
  • It transmits the reading of voltage, current, power factor and kiloWatts to utility and customer through GSM Sim900D module and Arduino.
  • if customer is using the load above maximum demand limit, It turns the load off.
  • It turns the load off, if customer tries to tamper the meter or tries to illegal activities with meter.
  • It saves all the values in an SD card, related to energy, power factor, tampering information and load management.

Block Diagram for Arduino based Smart Energy Meter

The block diagram of project is in figure below:

Block diagram of smart energy meter

Schematic Simulation

The schematic simulation of proposed smart energy meter project has been implemented on Proteus Software because it supports Arduino microcontroller.

Complete simulation model of Arduino based smart energy meter.

Arduino Software

Before starting the coding, following libraries are included in Arduino IDE.

  • EMON Library
  • RTC Library
  • Liquid Crystal Library

EMON Library

This Arduino library is for measuring Current and Power Factor values accurately.

RTC Library

This library is for Real Time Clock Module DS3231 which handles current date and time. It is necessary for energy calculations.

Liquid Crystal Library

Arduino LCD library is for displaying the results on LCD. This library supports the commands which are useful in displaying results on LCD.

Main Components

The project of single phase Arduino based smart energy meter uses following main components:

Schematic Simulation of Smart Energy Meter

The simulation of Smart Energy Meter consists of following parts.

  • Voltage Measurement Circuit
  • Current Measurement Circuit
  • Load Management Circuit


There are two main measurement blocks. One is voltage measurement block and the other is the current measurement block.

Voltage Measurement Block

In voltage measurement, main power supply is connected to the primary of a 230-4.5 V step down transformer. while secondary of the transformer is connected to a voltage divider circuit which consists of a two resistors of values 100k and 10k which divides the secondary voltage of the transformer into a ratio of 10:1. (circuit diagram is after current measurement block)

The value of voltage across the low value resistor is taken to be fed to the analog pin of the Arduino but this AC signal contains both the positive and negative values. As Arduino can read only the positive values, so to convert the negative values of the incoming signal into positive values, a DC voltage shift is given to the incoming signal.

How to feed AC to Arduino?

For this purpose, a 5V DC is supplied to the voltage divider circuit consisting of two 470k resistors dividing the voltage equally. This DC shift is added to the incoming voltage level so that the negative portion of the signal may be converted into positive. The voltage that has been now converted into the compatible range of the Arduino is given to the analog pin of Arduino.

Current Measurement Block

When measuring current by CT we see some fluctuations in the output. For this reason and to overcome it we used current sensor. It simply connects in series with the load and its output signal pin is fed directly to the Arduino mega. It gives accurate values of current.

AC Voltage and current measurement simulation diagram


The values of voltage and current are processed by the Arduino such that the relative time difference is measured between the voltage and current waveform. By considering the voltage waveform as the reference and the amount of the angle or time by which the current waveform lags behind the voltage waveforms. Which is calculated by detecting the zero crossing of the voltage and current waveforms.

Power Factor Measurements

The time period of sine wave is 20msec for 50Hz system. The maximum time difference that can exist is 5 msec, so time difference gives us the information about power factor.  For a resistive load, the power factor is one because there is no time difference between the two waves. The real power of the load is equal to the product of root mean square values of voltage and current with power factor of the load.

Displaying Output on LCD:

The voltages, current and real power consumed, power factor, energy, billing information are displayed on the 20 x 4 LCD. The LCD is connected to the Arduino. The energy is measured by multiplying the real power consumed by the load with the time. All the values are constantly stored in the SD card. The snap action switch has been used for tampering alert if unauthorized person tries to open the meter casing. SD Card also records this tampering information.

GSM Module for Communication:

The GSM module is connected to the Arduino through the serial communication pins. TX and RX of the module with the pins 9 and 10 of the Arduino. The 5V supply to the GSM module is separately provided by the Arduino.

AT Commands in Sim900D GSM module

The GSM module do its operation through AT commands. These commands are basically the instructions that are used for controlling and communicating with the GSM/GPRS modem. Each AT command has a specific purpose and function. Some of the SMS related AT commands are:

  • send SMS message: AT + CMGS:
  • send SMS message from storage: AT + CMSS:
  • list all the SMS messages: AT + CMGL:
  • read SMS messages: AT + CMGR:

AT in the start of the line only informs about the GSM modem about the beginning of the next command line. For example, the real command in the line “AT + CMGR” is “+CMGR”. Thus, by executing these commands messages are sent to the number that has been saved in the code.

You can read details about use of SIM900D in this article

Experimental Setup

Simulation Results

In Proteus simulation file, after uploading the Arduino code results can be seen on LCD. It shows the Voltage, Current, Power, Energy, Billing and Power Factor. Load Management circuit enables that when the virtual load exceeds its limit Arduino send the signal to relay to operate and trip the load and LED begins to glow indicating that load is off.

Hardware Implementation of Arduino Smart Energy Meter

The final hardware results we got are same as software schematic diagram simulation results and expectations. During the implementation of proposed Smart Energy Meter, we tested the meter functionality by connected it with dummy loads including resistive and inductive.

Hardware of smart energy meter

Working with R-L load

The figure shows the power factor of 0.69 with mixed load of 3.84A resistive and inductive. In next step, the inductive load further increases the power factor decreases.

current rating of active and reactive load with power factor on display of Arduino smart energy meter.

Results and Discussion

LCD Results

The LCD displays different parameters such as Voltage, Current, Power, Energy and Power Factor on its screen. Arduino based Smart energy meter also provides load management and protection against tempering.

With Load Turned ON

When there is load, LCD displays all the parameters which include Voltage, Current, Power Factor, Power and Energy as in figure below:

Load management in smart energy meter

When consumer load exceeds the maximum demand, meter sheds the load and alert message is on the LCD as in the figure below.

overload message display on LCD by load management in smart energy meter

Protection against Tampering

If meter casing is being lifted, tampering alert message is displayed on LCD and sent to the consumer and service provider.

GSM Result of Arduino Smart Energy Meter

GSM sends the energy and billing information after fixed interval. We have set the time interval of 3 minutes. During normal operating condition information about total energy and billing is send to mobile phone via SMS. So, When consumer load exceeds the maximum demand an alert message is send to mobile phone to limit their load. When someone tries to pull the meter casing, meter turns the load OFF and alert message is send to consumer. GSM messages received on mobile are:

messages sent to consumer by GSM module SIM900D through arduino.

SD-card File Result of Smart Energy Meter

SD Card output file from smart energy meter

Complete code for Arduino Smart Energy Meter

Here is the basic sketch of working smart energy meter with all the parameters discussed above. For education purposes only. You can learn this code and explore your own world.

Complete code for smart energy meter.

Give us feedback by commenting or contact us.
Also read some of most related article to Arduino smart energy meter.

You can also learn about AC/DC current and voltage measurements through different techniques. Follow the link and explore projects from experienced engineer.
For Complete final year projects (FYP), Click here.

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.