Arduino can do a lot of things. This tutorial is about making Arduino voltmeter. Yes, it is possible and more testing equipment can be created using Arduino. First, shall we learn how to make a Volt Meter?
How it is worked?
The theory behind the voltmeter is the same method used for Voltage divider with resistors. As you aware, Anolog pins can read 0 to 1024 and the pin voltage is 5. Based on that we are going to start the coding.
Voltage divider theory is as follows;
We can apply this method in Arduino as well.
If we in 10 volts the output will be ( 10 (Vs) x 10, 000 (R2) /(10, 000 (R2) + 10, 0000 (R1)) = 1 volt( 0.909v) (Vo)
As I said before, Arduino can read analog data from 0 to 1024 and the max voltage is 5v.
Then the Arduino will multiply this value by 1024 to identify the analog value (0.909 x 1024) = 930.816 and this value will be divided by 5v to get the voltage (930.816 /5) = 186.16
Now concern well. If you are aware of Arduino codes, You already know who to get the analog value of an Arduino pin. Suppose the A0 pin, then,
floatvalue=analogRead(A0);
If you type like this, you will receive the value 186.16.Now,This is the math part. If you know the reading as 186.16, then how to find the voltage. Simple, reverse the formula.
This is the way of calculating voltage with Arduino. Just reversing the formulas accordingly.
Now you can see the value in Arduino Serial Monitor or any output displays. The boring part is over :-). You can find the circuit diagram below.If you want to build the project permanently,
Make sure to check the wiring before giving the power or testing. You can download the following code and upload to the Arduino.
Comments