DIY Mains frequency meter for 110/220Vac using Arduino

(Last Updated On: July 18, 2019)

mains frequency meter

Description:

Mains Frequency Meter– In this Tutorial, you will learn how to make your own 110/220Vac Mains Frequency Meter or a Power line frequency monitoring system using Arduino. This Mains Frequency Meter can also be used with a generator. This is the 3rd part of the SCADA application based grid station parameters monitoring system.


While the Part1 was based on the 110/220V AC voltage monitoring system.

mains frequency meter

In which I successfully monitored the Normal voltage, over-voltage, and under-voltage. If you want to learn how to make your own AC voltage monitoring system click on the Link Below:

AC Voltage Monitoring “Normal Voltage, Under-Voltage, and Overvoltage”:

https://www.electroniclinic.com/arduino-ac-voltage-monitoring-over-voltage-normal-voltage-and-under-voltage/

While in Part2 I designed the

Over load monitoring and Protection system using Arduino & ACS712 Current sensor:

mains frequency meter

https://www.electroniclinic.com/over-load-monitoring-and-protection-using-arduino-acs712-current-sensor/


 Voltage Monitoring and Load Monitoring are also related to the mains/Power lines, so that’s why I covered these parameters as well.

mains frequency meter

So far we can monitor the voltage and load on our SCADA application, if we increase the voltage above a pre-defined value It will provide automatic disconnection as you can see the led is turned off. Before it was on, and also the box was unchecked which you can see in the picture above.

mains frequency meter

 while during the normal voltage the led remains ON.  Now if I decrease the voltage below a certain pre-defined value, it will provide automatic disconnection and the led will be turned off, in the same way as it was done for the Over Voltage. At the end, we will connect a relay with pin number 13 so that in case of overvoltage or under voltage the supply can be disconnected to protect our appliances from any damage.


As I said, the 2nd part was based on the Load monitoring system.

mains frequency meter

As you can see currently the load status is normal as only one bulb is connected.if I connect another bulb the load will be increased.

mains frequency meter

Now you can see on the screen the load status is overload. The load value can be set in the programming as per your requirements. For the practical demonstration watch video given at the end of this Tutorial.


As you know today’s episode is about the Mains Frequency Meter or Power line frequency or Mains frequency Monitoring system. In this tutorial, we will cover

  1. Complete circuit explanation
  2. Soldering
  3. Programming and finally
  4. Testing

Let’s get started!

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
12v step-down transformer: https://amzn.to/2LeDtwH
16×2 LCD: https://amzn.to/2FcXuUS
Potentiometer: https://amzn.to/2JSLbfg
Bridge rectifier: https://amzn.to/2EfPEb8
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

Circuit Diagram of the Mains Frequency Meter:

mains frequency meter

This is the complete Circuit Diagram of the Power line frequency or Mains frequency monitoring system. This schematic is designed in cadsoft eagle9.1.0 version, if you want to learn how to make a schematic and PCB then watch my tutorial:

Schematic & PCB designing:

 

220v ac is connected with the primary side of the 12v step down transformer. The secondary side of the transformer is connected with the ac legs of the bridge rectifier, while the + and – legs of the rectifier are connected with the series resistors, these resistors are used to reduce the voltage.



mains frequency meter

as you can see for 12v we get 4volts which is perfect for the 2n2222 transistor, make sure you never exceed 6volts, as voltage greater than 6 volts can damage the base of 2n2222 NPN transistor, if you get voltage greater than 6 volts then use another resistor in series, it will further reduce the voltage. As you can see in the picture above for different input voltages we get different voltages from the voltage divider circuit.

As you can see in the circuit diagram the emitter of the 2n2222 NPN transistor is connected with the ground, while the collector of the 2n2222 NPN transistor is connected with a 10k resistor, this is a pull-up resistor. A wire from the collector is connected with Pin 2 of the Arduino.


As you can see the ground is connected with pin number 1, 5 and pin number 16 of the LCD. 5v from the 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. 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.

Soldering:

mains frequency meter

Fix the transformer on a Vero Board using Silicon or screws.

mains frequency meter

Insert the bridge rectifier into the Vero Board.

Now connect a 10k resistor with the +Ve leg of the bridge rectifier.

mains frequency meter

Then connect two more resistors in series, connect the last resistor with the ground leg of the bridge rectifier as per the circuit diagram which is already explained.

mains frequency meter

Now connect the secondary wires of the step-down transformer with the ac legs of the bridge rectifier.

mains frequency meter

Then insert the 2n2222 NPN transistor into the Vero Board, connect a 10k resistor with the collector of the 2n2222 transistor, connect emitter with the ground, and also connect a wire with the collector, which will be then connected with pin number 2 of the Arduino as explained the Circuit diagram.

mains frequency meter

so now you can see the soldering is completed. the black wire which is the ground wire will be connected with the Arduino’s ground, the green wire will be connected with pin number 2 and the red wire will be connected with the Arduino’s 5 volts. One last connection, connect the base of the 2n2222 transistor with the voltage divider circuit. For the LCD soldering watch the following video tutorial.



16×2 LCD Soldering:

Programming:


Watch Video Tutorial:

Other Version of the Mains Frequency Meter:


Nodemcu ESP8266 IOT Mains Frequency Meter:

Nodemcu ESP8266 IOT Power Lines Mains frequency monitoring 50Hz

 

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...

2 Comments

  1. Fahad Bhai i am Student of Electrical Engineering (6th semester) , I required Some ideas about my FYP I have to submit proposal on 27 AUG 2019.Please Suggest Some Latest Projects Ideas.I am very Confused and have very less knowledge but i want to do at my own.
    PLEASE

Leave a Reply

Close