This project is about the simple hack of voltmeter by Arduino. The main reason behind making this is from my personal experience, when I was performing one experiment in the lab, I could not find a voltmeter so I made this hack to fulfill my requirement and also I think it will help others too.
Good project for beginners which uses basic concepts, yet a power full tool.
While running the code, you can find the output on the serial monitor.
Here, serial monitor will display the output i.e. Voltage.
We can also use different displays like LED Display for getting the output on it, instead of serial monitor. Finally, it depends on how you implement the project.
Calculating VoltageFormula for calculating voltage:
Vout = (Val * 5.0) / 1024.00;
Here in these formula Val is the value that is read by Arduino as analog input, which is further multiplied by the voltage that is been supplied by Arduino and thus to get the Vout it is divided by the cycle of time that is covered after every bit to get the value.
Vin = Vout / (R2/R1+R2)
By this formula we can find the Vin that will be around 0, which indirectly means we are creating ground.
NOTE: Here there is no restriction on using the specified amount of resistors, one can vary it according to the availability of the resistors.
Final AdviceIf one has resistor of resistance say R ohm and other is R' ohm, then just one needs to change the const in the code.
Warning: Make sure that you don't mess with the anode and cathode part during testing, it may damage Arduino Board.
Comments