Arduino AC Voltage Protection & Monitoring System | Under, Normal & Over Voltage
Under, Normal, Over AC Voltage Protection & Monitoring System using Arduino Code, ZMPT101B voltage sensor, LCD Display
- Suitable forB.Tech/Diploma Arduino students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this project, we will make a Smart Arduino Based AC Voltage Protection & Monitoring System with Under & Over Voltage Protection features. We can use a ZMPT101B voltage sensor to measure the current Voltage status and display it on LCD Display.
Nowadays there are a lot of AC Mains voltage fluctuations due to interruption of heavy load, thunder & lightning, and switching impulses. This can easily damage the electronics/electrical parts and sometimes lead to fire accidents. Voltage irregularities are the major issues in industries that often damage sensitive electronic equipment. In most cases, MCB is used as a protection system but it would be better if we implement our own system which could be cheaper and more advanced. Moreover, the system should have user input for under-voltage and over-voltage protection.
Many devices are available in the market for AC Voltage Monitoring along with Under, Normal & Over Voltage Protection features. But they are expensive and can’t have user input. This project aims to sort out all those drawbacks and develop protection & monitoring for the electrical equipment from over and under AC voltages using Arduino as a controller at a low cost. So we can use the ZMPT101B voltage sensor & Arduino to measure AC Voltage and based on under & over voltage detection, the Relay can turn off the entire system.
Bill of Materials
The following components are needed for this project. You can purchase the products from the given link.
S.N.
Components
Quantity
Purchase Link
Arduino Nano
Amazon
AliExpress
16X2 LCD Display
Amazon
AliExpress
ZMPT101B Voltage Sensor
Amazon
AliExpress
5V Relay Module
Amazon
AliExpress
BC547 Transistor
Amazon
AliExpress
1N4007 Diode
Amazon
AliExpress
Resistor 10K
Amazon
AliExpress
Resistor 1K
Amazon
AliExpress
Resistor 220-ohm
Amazon
AliExpress
LED 5mm (Multicolor)
Amazon
AliExpress
What is Over Voltage & Under Voltage?
Overvoltages are the voltages that exceed the normal or rated values which cause insulation damage to electrical appliances leading to short circuits. To be more precise, it’s when a supply voltage of 10 percent and above the rated voltage occurs. The conditions may be hazardous. Depending on its duration, the overvoltage event can be transient—a voltage spike—or permanent, leading to a power surge.
Similarly, Undervoltage happens when the average voltage of equipment falls below the rated voltage amount. Frequent Undervoltage can result in a degradation in equipment performance and reliability.
Block Diagram: Arduino Over & Under AC Voltage Monitoring
Here is a simple block diagram of an AC Under Voltage Over Voltage Monitoring & Protection System with an Arduino Microcontroller.
In Asia and most parts of the world, the usual AC supply voltage is between 220-240V. There is a +2% tolerance for Voltage fluctuations. In case there is an increase above the tolerance voltage over voltage is detected. We have also set the under voltage as 190V in this circuit. And test with variations in under and over voltage, we have used 220V Fan AC Dimmer. You can make your own
AC Dimmer
by referring to our previous post.
In the above block diagram, 200V AC Mains is supplied directly to the
ZMPT101B
Voltage Sensor. In this project, the input voltage is varied using the Fan AC Dimmer instead of a direct 220V Power Supply. The output of the ZMPT101B is an Analog voltage that is below 5V and can be fed easily to the Arduino Analog pin. The Arduino Nano Board and Relay are powered via a 5V Power supply or a 5V DC Adapter. A Load can be connected across the output of the Relay.
We have used a 16×2 LCD Display for displaying the Voltage Value and also the under, normal and over-voltage conditions. Whenever the voltage goes beyond 220V, the over-voltage condition is achieved and Relay disconnects all the electrical appliances. The LCD will display overvoltage message. Similarly, if the voltage lies between 220V-190V the Relay turns ON as Normal Voltage is displayed on the LCD. In case the voltage further drops below 190V, the under voltage condition is achieved. The Relay will shut down the system and the LCD displays the Under Voltage message.
Tripping Time Calculation
The tripping time is to be calculated using the formula:
T= t/((V/Vs)-1)
Where,
T = Trip Time
t = Time Multiplier
V = Voltage at A0
Vs = Source Voltage
Circuit Diagram: Arduino Over & Under AC Voltage Monitoring
Using the block diagram from above, we can make a simple circuit diagram using Arduino and some active passive electronic components.
Connect the 16×2 LCD Pin 4, 6, 11, 12, 13, and 14 to Arduino D3, D4, D5, D6, D7, and D8 Pin. Use a 10K Potentiometer at Pin 3 of LCD to adjust LCD Contrast. Supply 5V to LCD Pin 2 & 15. Connect LCD Pin 1, 5 & 16 to GND of Arduino.
Connect the Green and Yellow LED to digital pins D11 and D12 of Arduino. The LED1 is for Power indication. In order to control the Relay, we are using a BC547 transistor as a Switch. The diode 1N4007 which is across the Relay is serving as reverse voltage protection. You can connect multiple loads across the output of Relay. The load may be the AC Bulbs or any home appliances operating at 220V.
The ZMPT101B is an analog sensor. Therefore connect the analog pin of the sensor to Arduino A0 Pin. You can power the ZMPT101B, Relay Module using the 5V Pin of Arduino. The ZMPT101B accepts the input AC Voltage of 220V or over in our case. To test the Arduino Over & Under AC Voltage Monitoring Protection Circuit, AC Fan Dimmer is the best option.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on a zero PCB and you want
PCB
for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for
AC Voltage Monitoring System
looks something like 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:
Over/Under Voltage Monitoring System
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.
You can assemble the components on the PCB Board.
ZMPT101B Voltage Sensor Calibration
Initially the ZMPT101B Voltage Sensor requires calibration as it doesn’t come pre-calibrated. First upload the following code to the Arduino Board.
void
setup
(
)
{
Serial
begin
(
9600
)
;
}
void
loop
(
)
{
Serial
println
(
analogRead
(
A0
)
)
;
delay
(
)
;
}
After uploading the code, open the Serial Plotter. If the Serial Plotter doesn’t show the sine wave, then rotate the potentiometer to calibrate the sensor. Once it shows a proper sine wave, you can assume it as a proper calibration.
Source Code/Program
The following is the code for Over and Under AC Voltage Protection system using Arduino. Copy the code and paste it on the Arduino editor. The select the Arduino Nano Board from Board Manager and also the right COM port. Then you can upload the code.
#include <Filters.h>
#include <LiquidCrystal.h>
const
int
rs
=
en
=
d4
=
d5
=
d6
=
d7
=
;
LiquidCrystal
lcd
(
rs
en
d4
d5
d6
d7
)
;
float
testFrequency
=
;
int
Sensor
=
;
int
relay
=
;
int
yellow
=
;
int
green
=
;
float
intercept
=
0.7
;
float
slope
=
0.04
In this project, we will make a Smart Arduino Based AC Voltage Protection & Monitoring System with Under & Over Voltage Protection features. We can use a ZMPT101B voltage sensor to measure the current Voltage status and display it on LCD Display.
Nowadays there are a lot of AC Mains voltage fluctuations due to interruption of heavy load, thunder & lightning, and switching impulses. This can easily damage the electronics/electrical parts and sometimes lead to fire accidents. Voltage irregularities are the major issues in industries that often damage sensitive electronic equipment. In most cases, MCB is used as a protection system but it would be better if we implement our own system which could be cheaper and more advanced. Moreover, the system should have user input for under-voltage and over-voltage protection.
Many devices are available in the market for AC Voltage Monitoring along with Under, Normal & Over Voltage Protection features. But they are expensive and can’t have user input. This project aims to sort out all those drawbacks and develop protection & monitoring for the electrical equipment from over and under AC voltages using Arduino as a controller at a low cost. So we can use the ZMPT101B voltage sensor & Arduino to measure AC Voltage and based on under & over voltage detection, the Relay can turn off the entire system.
Bill of Materials
The following components are needed for this project. You can purchase the products from the given link.
S.N.
Components
Quantity
Purchase Link
Arduino Nano
Amazon
AliExpress
16X2 LCD Display
Amazon
AliExpress
ZMPT101B Voltage Sensor
Amazon
AliExpress
5V Relay Module
Amazon
AliExpress
BC547 Transistor
Amazon
AliExpress
1N4007 Diode
Amazon
AliExpress
Resistor 10K
Amazon
AliExpress
Resistor 1K
Amazon
AliExpress
Resistor 220-ohm
Amazon
AliExpress
LED 5mm (Multicolor)
Amazon
AliExpress
What is Over Voltage & Under Voltage?
Overvoltages are the voltages that exceed the normal or rated values which cause insulation damage to electrical appliances leading to short circuits. To be more precise, it’s when a supply voltage of 10 percent and above the rated voltage occurs. The conditions may be hazardous. Depending on its duration, the overvoltage event can be transient—a voltage spike—or permanent, leading to a power surge.
Similarly, Undervoltage happens when the average voltage of equipment falls below the rated voltage amount. Frequent Undervoltage can result in a degradation in equipment performance and reliability.
Block Diagram: Arduino Over & Under AC Voltage Monitoring
Here is a simple block diagram of an AC Under Voltage Over Voltage Monitoring & Protection System with an Arduino Microcontroller.
In Asia and most parts of the world, the usual AC supply voltage is between 220-240V. There is a +2% tolerance for Voltage fluctuations. In case there is an increase above the tolerance voltage over voltage is detected. We have also set the under voltage as 190V in this circuit. And test with variations in under and over voltage, we have used 220V Fan AC Dimmer. You can make your own
AC Dimmer
by referring to our previous post.
In the above block diagram, 200V AC Mains is supplied directly to the
ZMPT101B
Voltage Sensor. In this project, the input voltage is varied using the Fan AC Dimmer instead of a direct 220V Power Supply. The output of the ZMPT101B is an Analog voltage that is below 5V and can be fed easily to the Arduino Analog pin. The Arduino Nano Board and Relay are powered via a 5V Power supply or a 5V DC Adapter. A Load can be connected across the output of the Relay.
We have used a 16×2 LCD Display for displaying the Voltage Value and also the under, normal and over-voltage conditions. Whenever the voltage goes beyond 220V, the over-voltage condition is achieved and Relay disconnects all the electrical appliances. The LCD will display overvoltage message. Similarly, if the voltage lies between 220V-190V the Relay turns ON as Normal Voltage is displayed on the LCD. In case the voltage further drops below 190V, the under voltage condition is achieved. The Relay will shut down the system and the LCD displays the Under Voltage message.
Tripping Time Calculation
The tripping time is to be calculated using the formula:
T= t/((V/Vs)-1)
Where,
T = Trip Time
t = Time Multiplier
V = Voltage at A0
Vs = Source Voltage
Circuit Diagram: Arduino Over & Under AC Voltage Monitoring
Using the block diagram from above, we can make a simple circuit diagram using Arduino and some active passive electronic components.
Connect the 16×2 LCD Pin 4, 6, 11, 12, 13, and 14 to Arduino D3, D4, D5, D6, D7, and D8 Pin. Use a 10K Potentiometer at Pin 3 of LCD to adjust LCD Contrast. Supply 5V to LCD Pin 2 & 15. Connect LCD Pin 1, 5 & 16 to GND of Arduino.
Connect the Green and Yellow LED to digital pins D11 and D12 of Arduino. The LED1 is for Power indication. In order to control the Relay, we are using a BC547 transistor as a Switch. The diode 1N4007 which is across the Relay is serving as reverse voltage protection. You can connect multiple loads across the output of Relay. The load may be the AC Bulbs or any home appliances operating at 220V.
The ZMPT101B is an analog sensor. Therefore connect the analog pin of the sensor to Arduino A0 Pin. You can power the ZMPT101B, Relay Module using the 5V Pin of Arduino. The ZMPT101B accepts the input AC Voltage of 220V or over in our case. To test the Arduino Over & Under AC Voltage Monitoring Protection Circuit, AC Fan Dimmer is the best option.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on a zero PCB and you want
PCB
for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for
AC Voltage Monitoring System
looks something like 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:
Over/Under Voltage Monitoring System
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.
You can assemble the components on the PCB Board.
ZMPT101B Voltage Sensor Calibration
Initially the ZMPT101B Voltage Sensor requires calibration as it doesn’t come pre-calibrated. First upload the following code to the Arduino Board.
void
setup
(
)
{
Serial
begin
(
9600
)
;
}
void
loop
(
)
{
Serial
println
(
analogRead
(
A0
)
)
;
delay
(
)
;
}
After uploading the code, open the Serial Plotter. If the Serial Plotter doesn’t show the sine wave, then rotate the potentiometer to calibrate the sensor. Once it shows a proper sine wave, you can assume it as a proper calibration.
Source Code/Program
The following is the code for Over and Under AC Voltage Protection system using Arduino. Copy the code and paste it on the Arduino editor. The select the Arduino Nano Board from Board Manager and also the right COM port. Then you can upload the code.
#include <Filters.h>
#include <LiquidCrystal.h>
const
int
rs
=
en
=
d4
=
d5
=
d6
=
d7
=
;
LiquidCrystal
lcd
(
rs
en
d4
d5
d6
d7
)
;
float
testFrequency
=
;
int
Sensor
=
;
int
relay
=
;
int
yellow
=
;
int
green
=
;
float
intercept
=
0.7
;
float
slope
=
0.04
Technologies used
Hardware components
- Arduino
- Relay
Software & tools
- EasyEDA
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.