Introduction: Arduino AC Voltmeter

About: hIOTron is an IoT Based company that offers IoT Platforms, IoT Solutions, IoT Training.

We are going to create an AC Voltage Measuring Device using Arduino, which will estimate the voltage of Alternating Current.


Hardware Components

Power Management IC, Transformer

1N4007 Diode

Capacitor 1 µF

Zener Single Diode, 5.1 V

Arduino UNO & Genuino UNO

Resistor 10 k, 4.75 k ohm

Software Components

Arduino IDE

Step 1: About the Project

Circuit Diagram

Do connections as shown in the above circuit diagram.

Working of Project

1. Step down voltage is obtained on the l.v side of the transformer which is fit to utilize across normal power rating resistors.

2. Then we receive specific voltage value across the 4.7k resistor.

3. Arduino utilizes this voltage as input from pin A0 in the form of analog values between 0 to 1023. 0 is considered as 0 volt and 1023 being 5v.

4. Arduino then changes this analog value into corresponding mains a.c. voltage by a formula. n=(311/1023)*m volts or n=(m*.304177).

Classroom IoT Training will help you to build such an End-to-End IoT Solutionsfor various applications.

Step 2: Run a Program

int m;// initialise variable m

float n;//initialise variable n

void setup()


pinMode(A0,INPUT); // set pin a0 as input pin

Serial.begin(9600);// begin serial communication between arduino and pc


void loop()


m=analogRead(A0);// read analog values from pin A0 across capacitor

n=(m* .304177);// converts analog value(x) into input ac supply value using this formula ( explained in woeking section)

Serial.print(" analaog input " ) ; // specify name to the corresponding value to be printed

Serial.print(m) ; // print input analog value on serial monitor

Serial.print(" ac voltage ") ; // specify name to the corresponding value to be printed

Serial.print(n) ; // prints the ac value on Serial monitor Serial.println();