IoT Based Electricity Energy Meter using ESP32 & Blynk
IoT Based Electricity Energy Meter - interface SCT-013 Current Sensor & ZMPT101B Voltage Sensor with ESP32 Wifi Module with Blynk Application
- Suitable forB.Tech/Diploma ESP32/IoT students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this project, we will learn how to make our own
IoT Based Electricity Energy Meter
using
ESP32
& monitor data on the
Blynk Application
. Earlier we built
IoT DC Energy Meter
and
GSM Prepaid Energy Meter
. With the current technology, you need to go to the
meter reading
room and take down readings. Thus monitoring and keeping track records of your
electricity consumption
is a tedious task. To automate this, we can use the Internet of Things. The Internet of Things saves time and money by automating
remote data collection
. Smart
Energy Meter
has received quite a lot of acclaim across the globe in recent years. So, why not to build our own
IoT Based Electricity Energy Meter
?
We need to select the
current sensor
as well as the
voltage sensor
so that the current & voltage can be measured and thus we can know about the power consumption & total power consumed. The best current sensor available in the market is SCT-013. This is
SCT-013 Non-Invasive AC Current Sensor
Split Core Type Clamp Meter Sensor which can be used to measure AC current up to
100 amperes
. Similarly, the best voltage sensor is the AC Voltage Sensor Module ZMPT101B. The
ZMPT101B AC Voltage Sensor
is the best where we need to measure the accurate AC voltage with a voltage transformer.
Using the
SCT-013 Current Sensor & ZMPT101B Voltage Sensor
, we can measure the all required parameters needed for Electricity Energy Meter. We will interface the SCT-013 Current Sensor & ZMPT101B Voltage Sensor with
ESP32 Wifi Module
& Send the data to Blynk Application. The
Blynk Application
Dashboard will display the
Voltage, Current, Power & total unit consumed in kWh
Bill of Materials
The list of components required for making
IoT Based Electricity Energy Meter
are given below. Most of the components can be ordered online from Amazon.
S.N.
Components
Quantity
1
ESP32 WiFi Module
1
Amazon
AliExpress
2
ZMPT101B AC Voltage Sensor Module
1
Amazon
AliExpress
3
SCT-013-030 Non-invasive AC Current Sensor
1
Amazon
AliExpress
4
16x2 LCD Display
1
Amazon
AliExpress
5
Potentiometer 10K
1
Amazon
AliExpress
6
Resistor 10K
2
Amazon
AliExpress
7
Resistor 100ohm
1
Amazon
AliExpress
8
Capacitor 10uF
1
Amazon
AliExpress
9
Connecting Wires
10
Amazon
AliExpress
10
Breadboard
1
Amazon
AliExpress
SCT-013 Current Sensor
The
SCT-013
is a Non-invasive AC Current Sensor Split Core Type Clamp Meter Sensor that can be used to measure
AC current
up to 100 amperes. Current transformers (CTs) are sensors are for measuring alternating current. They are particularly useful for measuring whole building electricity consumption. The SCT-013 current sensors can be clipped straight either to the
live
or
neutral wire
without having to do any high voltage electrical work.
Like any other transformer, a
current transformer
has a primary winding, a magnetic core, and a secondary winding. The secondary winding comprises many turns of fine wire housed within the casing of the transformer.
Specifications
1. Input Current:
0-30A AC
2. Output Signal:
DC 0-1 V
3. Non-linearity:
2-3 %
4. Build-in sampling resistance (RL):
62 Ω
5. Turn Ratio:
1800:1
6. Resistance Grade:
Grade B
7. Work Temperature:
-25 °C~+70 °C
8. Dielectric Strength (between shell and output):
1000 V AC / 1 min 5 mA
ZMPT101B AC Single Phase Voltage Sensor
The
ZMPT101B
AC Single Phase voltage sensor module is based on a
high precision ZMPT101B voltage Transformer
used to measure the accurate AC voltage with a voltage transformer. This is an ideal choice to measure the AC voltage using Arduino or ESP32.
The Modules can measure voltage within
250V AC voltage
& the corresponding analog output can be adjusted. The module is simple to use and comes with a
multi-turn trim potentiometer
for adjusting and calibrating the ADC output.
Specifications
1. Voltage up to
250 volts
can be measured
2. Lightweight with on-board micro-precision voltage transformer
3. High precision on-board op-amp circuit
4. Operating temperature :
40ºC ~ + 70ºC
5. Supply voltage
5 volts
to 30 volts
You can use ZMPT101B for
AC Voltage Monitoring
applications.
Circuit Diagram & Hardware Setup
Now let us see the
circuit diagram
of IoT Based Electricity Energy Meter using ESP32. The circuit has been designed using Fritzing software.
The connection diagram is simple. Both the Sensor, i.e. SCT-013 Current Sensor & ZMPT101B Voltage Sensor VCC is connected to
Vin
of ESP32 which is a
5V Supply
. The GND pin of both the modules is connected to the
GND
of ESP32. The output analog pin of the ZMPT101B Voltage Sensor is connected to
GPIO35
of ESP32. Similarly, the output analog pin of SCT-013 Current Sensor is connected to
GPIO34
of ESP32. You need a two resistor of
10K
& a single resistor of
100 ohms
connected along with a
10uF
Capacitor.
Apart from the circuit part, the AC wires where the current and voltage needs to measured are connected to the
input AC Terminal
of Voltage Sensor. Similarly, the
current sensor clip
doesn’t have any connection and a single live wire or neutral wire is inserted inside the clip part as shown in the above circuit.
The
16×2 LCD
used in this project is optional. There is no need to connect the LCD as we will be monitoring the ESP32/SCT-013 ZMPT101B/ Energy Meter Data on Blynk Application. In case you want to connect the LCD, you need so many connections. Connect the pin numbers
4, 6, 11, 12, 13, 14
of LCD to ESP32
D13, D12, D14, D27, D26, D25
pins. Also connect the LCD
1, 5, 16
Pin to GND &
2, 15
Pin to 5V VCC. Use a
10K Potentiometer
at Pin 3 of LCD to adjust the LCD Contrast.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on breadboard and you want PCB for the project, then here is the PCB for you. The PCB Board for the IoT Energy Meter is designed using
EasyEDA
online Circuit Schematics & PCB designing tool. The front side and back side of the PCB is given below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from
ALLPCB
at
1$
only.
Download Gerber File:
IoT Energy Meter PCB
You can use this Gerber file to order high quality PCB for this project. To do that visit the
ALLPCB
official website by clicking here:
https://www.allpcb.com/
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
Setting Up Blynk Application
Blynk
is an application that runs over
Android
and
IOS
devices to
control any IoT based application
using Smartphones. It allows you to create your Graphical user interface for IoT application. Here we will display the IoT Energy Meter Data on Blynk Application.
So download and install the
Blynk Application
from
Google Play Store
. IOS users can download from the
App Store
. Once the installation is completed, open the app & sign-up using your Email id and Password.
From the dashboard create a new project and select ESP32 & Wifi Connection.
Then drag & drop or add 4 widgets and assign the variable as per code and then email the authentication code.
You will get the authentication code in the mail. Copy this authentication code. This will be used in your code.
Required Library Installation
1. EmonLib Library
The Emonlib Library is used for
Electricity Energy Meter
. EmonLib is a Continuous Monitoring of Electricity Energy repeats, every
5 or 10s
, a sequence of voltage and current measurements. EemonLib continuously measures in the background the voltage and all the current input channels, calculates a
true average quantity
for each and then informs the sketch that the measurements are available and should be read and processed.
Download
EmonLib Library
2. Blynk Library
Blynk is the most popular
Internet of Things
platform for connecting an
In this project, we will learn how to make our own
IoT Based Electricity Energy Meter
using
ESP32
& monitor data on the
Blynk Application
. Earlier we built
IoT DC Energy Meter
and
GSM Prepaid Energy Meter
. With the current technology, you need to go to the
meter reading
room and take down readings. Thus monitoring and keeping track records of your
electricity consumption
is a tedious task. To automate this, we can use the Internet of Things. The Internet of Things saves time and money by automating
remote data collection
. Smart
Energy Meter
has received quite a lot of acclaim across the globe in recent years. So, why not to build our own
IoT Based Electricity Energy Meter
?
We need to select the
current sensor
as well as the
voltage sensor
so that the current & voltage can be measured and thus we can know about the power consumption & total power consumed. The best current sensor available in the market is SCT-013. This is
SCT-013 Non-Invasive AC Current Sensor
Split Core Type Clamp Meter Sensor which can be used to measure AC current up to
100 amperes
. Similarly, the best voltage sensor is the AC Voltage Sensor Module ZMPT101B. The
ZMPT101B AC Voltage Sensor
is the best where we need to measure the accurate AC voltage with a voltage transformer.
Using the
SCT-013 Current Sensor & ZMPT101B Voltage Sensor
, we can measure the all required parameters needed for Electricity Energy Meter. We will interface the SCT-013 Current Sensor & ZMPT101B Voltage Sensor with
ESP32 Wifi Module
& Send the data to Blynk Application. The
Blynk Application
Dashboard will display the
Voltage, Current, Power & total unit consumed in kWh
Bill of Materials
The list of components required for making
IoT Based Electricity Energy Meter
are given below. Most of the components can be ordered online from Amazon.
S.N.
Components
Quantity
1
ESP32 WiFi Module
1
Amazon
AliExpress
2
ZMPT101B AC Voltage Sensor Module
1
Amazon
AliExpress
3
SCT-013-030 Non-invasive AC Current Sensor
1
Amazon
AliExpress
4
16x2 LCD Display
1
Amazon
AliExpress
5
Potentiometer 10K
1
Amazon
AliExpress
6
Resistor 10K
2
Amazon
AliExpress
7
Resistor 100ohm
1
Amazon
AliExpress
8
Capacitor 10uF
1
Amazon
AliExpress
9
Connecting Wires
10
Amazon
AliExpress
10
Breadboard
1
Amazon
AliExpress
SCT-013 Current Sensor
The
SCT-013
is a Non-invasive AC Current Sensor Split Core Type Clamp Meter Sensor that can be used to measure
AC current
up to 100 amperes. Current transformers (CTs) are sensors are for measuring alternating current. They are particularly useful for measuring whole building electricity consumption. The SCT-013 current sensors can be clipped straight either to the
live
or
neutral wire
without having to do any high voltage electrical work.
Like any other transformer, a
current transformer
has a primary winding, a magnetic core, and a secondary winding. The secondary winding comprises many turns of fine wire housed within the casing of the transformer.
Specifications
1. Input Current:
0-30A AC
2. Output Signal:
DC 0-1 V
3. Non-linearity:
2-3 %
4. Build-in sampling resistance (RL):
62 Ω
5. Turn Ratio:
1800:1
6. Resistance Grade:
Grade B
7. Work Temperature:
-25 °C~+70 °C
8. Dielectric Strength (between shell and output):
1000 V AC / 1 min 5 mA
ZMPT101B AC Single Phase Voltage Sensor
The
ZMPT101B
AC Single Phase voltage sensor module is based on a
high precision ZMPT101B voltage Transformer
used to measure the accurate AC voltage with a voltage transformer. This is an ideal choice to measure the AC voltage using Arduino or ESP32.
The Modules can measure voltage within
250V AC voltage
& the corresponding analog output can be adjusted. The module is simple to use and comes with a
multi-turn trim potentiometer
for adjusting and calibrating the ADC output.
Specifications
1. Voltage up to
250 volts
can be measured
2. Lightweight with on-board micro-precision voltage transformer
3. High precision on-board op-amp circuit
4. Operating temperature :
40ºC ~ + 70ºC
5. Supply voltage
5 volts
to 30 volts
You can use ZMPT101B for
AC Voltage Monitoring
applications.
Circuit Diagram & Hardware Setup
Now let us see the
circuit diagram
of IoT Based Electricity Energy Meter using ESP32. The circuit has been designed using Fritzing software.
The connection diagram is simple. Both the Sensor, i.e. SCT-013 Current Sensor & ZMPT101B Voltage Sensor VCC is connected to
Vin
of ESP32 which is a
5V Supply
. The GND pin of both the modules is connected to the
GND
of ESP32. The output analog pin of the ZMPT101B Voltage Sensor is connected to
GPIO35
of ESP32. Similarly, the output analog pin of SCT-013 Current Sensor is connected to
GPIO34
of ESP32. You need a two resistor of
10K
& a single resistor of
100 ohms
connected along with a
10uF
Capacitor.
Apart from the circuit part, the AC wires where the current and voltage needs to measured are connected to the
input AC Terminal
of Voltage Sensor. Similarly, the
current sensor clip
doesn’t have any connection and a single live wire or neutral wire is inserted inside the clip part as shown in the above circuit.
The
16×2 LCD
used in this project is optional. There is no need to connect the LCD as we will be monitoring the ESP32/SCT-013 ZMPT101B/ Energy Meter Data on Blynk Application. In case you want to connect the LCD, you need so many connections. Connect the pin numbers
4, 6, 11, 12, 13, 14
of LCD to ESP32
D13, D12, D14, D27, D26, D25
pins. Also connect the LCD
1, 5, 16
Pin to GND &
2, 15
Pin to 5V VCC. Use a
10K Potentiometer
at Pin 3 of LCD to adjust the LCD Contrast.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on breadboard and you want PCB for the project, then here is the PCB for you. The PCB Board for the IoT Energy Meter is designed using
EasyEDA
online Circuit Schematics & PCB designing tool. The front side and back side of the PCB is given below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from
ALLPCB
at
1$
only.
Download Gerber File:
IoT Energy Meter PCB
You can use this Gerber file to order high quality PCB for this project. To do that visit the
ALLPCB
official website by clicking here:
https://www.allpcb.com/
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
Setting Up Blynk Application
Blynk
is an application that runs over
Android
and
IOS
devices to
control any IoT based application
using Smartphones. It allows you to create your Graphical user interface for IoT application. Here we will display the IoT Energy Meter Data on Blynk Application.
So download and install the
Blynk Application
from
Google Play Store
. IOS users can download from the
App Store
. Once the installation is completed, open the app & sign-up using your Email id and Password.
From the dashboard create a new project and select ESP32 & Wifi Connection.
Then drag & drop or add 4 widgets and assign the variable as per code and then email the authentication code.
You will get the authentication code in the mail. Copy this authentication code. This will be used in your code.
Required Library Installation
1. EmonLib Library
The Emonlib Library is used for
Electricity Energy Meter
. EmonLib is a Continuous Monitoring of Electricity Energy repeats, every
5 or 10s
, a sequence of voltage and current measurements. EemonLib continuously measures in the background the voltage and all the current input channels, calculates a
true average quantity
for each and then informs the sketch that the measurements are available and should be read and processed.
Download
EmonLib Library
2. Blynk Library
Blynk is the most popular
Internet of Things
platform for connecting an
Technologies used
Hardware components
- ESP32
- Arduino
Software & tools
- Blynk
- EasyEDA
- Fritzing
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.