Arduino AC voltage Monitoring “Over voltage, Normal voltage and Under-voltage

(Last Updated On: May 29, 2019)

voltage Monitoring

Description:

This tutorial is about the AC voltage monitoring and Protection against Overvoltage and Under voltage. This is part 1 and we will be displaying the voltage on a 16×2 LCD. While in part 2 we will design a SCADA application for monitoring voltage, frequency, load, and disconnection. I will be using the same circuit in part2 as well. In this, we will cover:

  1. Voltage sensor calculation for monitoring voltages up to 310 volts.
  2. Complete circuit diagram explanation.
  3. Programming and finally
  4. Testing

For the Step by Step explanation watch video Tutorial Click Here”.



The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
Voltage sensor 0-25v: best offer https://amzn.to/2PcMGXY
16×2 lcd: https://amzn.to/2FcXuUS
Potentiometer: https://amzn.to/2JSLbfg
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330 ohm resistors pack: https://amzn.to/2NtlAeh
5v 2A adaptor: https://amzn.to/2GsNfcw
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

This project is basically based on my previous two tutorials.

This tutorials covers the basics of 16×2 lcd and I have explained everything from soldering to interfacing, so I will be using the same lcd connections. You should watch this tutorial for the best understanding.



While in this tutorial I explained everything about the voltage sensor and how to modify this sensor for monitoring higher voltages. You should watch this tutorial.

As explained in my previous tutorial, this voltage sensor simply consists of two resistors connected in series. the maximum input voltage of this voltage sensor is 25volts. So for 25v we get exactly 5 volts.

voltage Monitoring

Vin = 25v

R1 = 30k ohm

r2 = 7.5k ohm

We can find out the Output voltage, by using the voltage divider formula which is

Vout = ( r2  x  vin ) / ( r1 + r2)

vout = (7.5 x 1000 x 25)  /  (30k + 7.5k)

vout  = 187500 / 37500

vout = 5 Volts



voltage Monitoring

If we increase the input voltage the output voltage will also increase above 5v which can damage the analog pin of the controller. So for this we need to add another resistor in series. Let’s say we want to monitor voltages up to 310 volts.  Let’s first of all find the current of the voltage sensor.

Using v = ir

v = IR we can find the current

I =  V / R

I = 25 / ( 30k + 7.5K)

I = 25 / 37.5K

I = .000666 amps

I = 666 micro amps.

Now lets calculate the value of the resistor, which can be used in series with this voltage sensor to monitor 310volts.

Vx = 310 which is the input voltage

Rx = (Vx – 25 ) / 666 micro amps

Rx = 310 – 25 / 666 micro amps

Rx = .427 x 1000000

Rx = 428k ohm

Using this value of the resistor we can monitor voltages up to 310 volts.


Circuit Diagram:

voltage Monitoring

Ac voltage is fed to the bridge rectifier through a fan regulator. This fan regulator will be used for varying the ac voltage, to check if we can successfully detect the over voltage, normal voltage and under-voltage. This is a full wave bridge rectifier. The +ve leg of the bridge rectifier is connected with the vcc of the voltage sensor through a 428K ohm resistor, this is the resistor that we just calculated and the ground of the bridge rectifier is connected with the ground of the voltage sensor. A 10uf capacitor is connected with the voltage sensor to get stable values. The s pin of the sensor is connected with the A1 pin of the arduno and – pin is connected with the ground.



As you can see ground is connected with pin number 1, 5 and pin number 16…5v from arduino is connected with pin number 2 and pin number 15…the middle pin of the variable resistor or potentiometer is connected with pin number 3 of the lcd, using this potentiometer we can control the lcd contrast.…while the other two pins are connected with the ground and 5v. Pin’s 4 to 7 of the arduino are connected with pins D7 to D4 of the lcd.

Pin number 8 of the Arduino is connected with the enable pin of the lcd….pin number 9 of the arduino is connected with the RS pin of lcd…

Interfacing:

For the interfacing watch video Tutorial given at the End.

Programming:

For the program explanation watch video tutorial given at the end.

Watch Video Tutorial:

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Close