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 )
3) Diode(1N4007)
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
21 Comments
4 years ago
Hello Sir,
I tried the above circuit with the same code but I did not get the output as expected and shown in the screenshot.Lot of fluctuations.I need your help.Kindly reply me when you are free
Reply 4 years ago
please recheck your circuit and the polarities of the diodes (zener as well). If you did run the same code then surely the problem lies in the circuit MOSTLY POLARITIES OF COMPONENTS.
Reply 4 years ago
Thank you for your reply Sir.Can you provide your contact number I ned to talk to you regarding a problem I am facing.Because I ned to explain my circuit problem.Please
Reply 4 years ago
you can contact me at abhrodeepc07@gmail.com but right now im unable to provide my number as its a corporate number. Thank you.
4 years ago on Step 3
I think the capacitor is too big. A quick voltage change (up to down) is not detected until the capacitor discharge itself.
Reply 4 years ago
Yes right just for voltage stability I used it but one can use lesser value one.
4 years ago
how 3V AC is converted to 5V DC by rectifier .....I know rectifier will convert AC to DC but how 3 v to 5v converted
Reply 4 years ago
I know AC is little bit confusing with max, rms and all that. Please try it you will be amazed to get 4.99V DC at the terminal.
Reply 4 years ago
I will suggest you to please read half wave rectifier, the dc voltage is not calculated like you are thinking. Please refer to the image i have attached in comment.
VDC = VMAX/π = 0.318VMAX =VRMS x 0.45
So what's our rms voltage around =6V now Calculate VDC...
Note: It's around 2.7V but due to inaccuracies it will go 3V as we dont get everything exact.
Question 4 years ago
We don't no house voltage what we can do ??
5 years ago
what is the current capacity of this voltmeter?
Reply 5 years ago
Hello, its a voltmeter so as described, it is made up of Arduino thus it can handle 5V i.e. 230V corresponding to 5V by the use of transformer, zener diode and capacitor. Lastly, a voltmeter is a galvanometer with high resistor in series so that negligible current flows through it. Thus this circuit is for 5V, can't say the current rating as current is not a factor here. Now don't go for 440V !! for household voltage and lower voltages its safe. No current actually goes from the circuit to arduino just the potential is measured.
Reply 4 years ago
+1
People ask the darnest things ;-)
Question 4 years ago on Step 3
I have a transformer that I want to repurpose, but its output is 16v AC.
What would be the sizes of the resistors I have to use to match it? Any
other change that I need to be aware of? Thanks in advance.
Answer 4 years ago
If the transformer got a center tapping you can get 8V AC that will be better, in case you don't have it do one thing. Use the same logic i.e. voltage divider. TO DIVIDE THE 16V TO approx. 5V AND 10V using 2-3k Ohm resistor. But as the power will be slightly more so recommend to use higher power resistors or else try once if it gets disrupted then try the recommended. BE SAFE THOUGH!! CAUTIOUS AS IT'S AC.
Question 5 years ago on Step 3
how many amperes does this circuit can handle?
Answer 5 years ago
Hello, its a voltmeter so as described, it is made up of Arduino thus it can handle 5V i.e. 230V corresponding to 5V by the use of transformer, zener diode and capacitor. Lastly, a voltmeter is a galvanometer with high resistor in series so that negligible current flows through it. Thus this circuit is for 5V, can't say the current rating as current is not a factor here. Now don't go for 440V !! for household voltage and lower voltages its safe. No current actually goes from the circuit to arduino just the potential is measured.
5 years ago on Introduction
Hey man nice work... I tried to do it... But the output is working only for some period of time ... After few hours the output put is not working values are not matching with the multimeter ...
Reply 5 years ago
May be the capacitor you are using is getting depleted, means it isn't storing charge as usual. So change it as well as the zener diode. Check it and let me know.
5 years ago
useful..!