Introduction: AC Voltmeter Using Arduino
This is a simple circuit to ascertain the AC voltage using the Arduino UNO without any AC voltmeter!! ENJOY!!
Step 1: COMPONENTS REQUIRED
Read explanation for knowing each ones use...
1) Step-downTransformer (12V or 6V), i have used 6V one
2) Resistor (2P- 1K ohm as I used 6V Tx, for 12V its 1K and 4.7K )
4)Zener Diode (5V)
5)Capacitor (1uF preferably or else 10uF more time to discharge charge!!)
6) Adruino UNO or any obviously and some jumpers(2)
All this are the components that are required to draw the project into existence...
Step 2: Circuit Diagram and Explanation
Can you see that circuit?? OHHH... yes nothing in it
1)Step-down transformer(220V to 6V AC) but the arduino can't take AC voltage to read that also 6V
2)Lets get the 6V down to 5V operating voltage of Arduino so that it can measure or read, so voltage divider using 2 1k resistor so it comes to 3V AC(approximately)
3) To get a DC we have used a diode as a half wave rectifier
4)Now 5V DC has to be maintained not more than that so we have used a capacitor to stabilize the voltage and a zenver diode as voltage regulator that keeps 5V at terminals always!!
So, now the circuit part is done now we will take out jumpers from terminals shown in circuit diagram(i.e. across zener diode) and put the jumpers(+) to A0 analog pin of Arduino and (-) to GND of Arduino.
If you dont know the anode and cathode of diode refer to internet its easy! silver side cathode(1N4007) AND black side cathode(zener diode).
Step 3: Arduino and Code!
Arduino's pin A0 and Gnd as been used to analyse the coming voltage with respect to AC mains...
5V input at A0 pin refers to 1023 bit value of arduino...
So, 220V AC (r.m.s.)= 311V(peak) corresponds to 1023bit
1bit correspond to = 311/1023 , Thus we have taken, b=analogRead(A0) and ac voltage=a=(b*311/1023)
Now the voltage that we get is peak voltage to get r.m.s. we divided peak/sqrt(2).
BUT, if we just say serial print Arduino will continuously plot voltage so we have made a program to show output only if the input changes.
Thanks for reading this small but useful project if you dont have ac voltmeter near you.
I will come up with IoT projects from the next one.
Code: Github link to ino file