Arduino Project Hub

Voltmeter Using Arduino © GPL3+

If you can't find a voltmeter at home or anywhere else, then this hack is for you!

  • 2,740 views
  • 8 comments
  • 44 respects

Components and supplies

Apps and online services

About this project

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 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 depends on how you implement the project.

Formula 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.

eg.

if one has resistor of resistance say R ohm and other is R' ohm, then just one need 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.

Schematics

Schematics
Circuit2 u3aqwbxfqs

Code

VoltmeterC/C++
Code for the project
int analogInput = 1;
float Vout = 0.00;
float Vin = 0.00;
float R1 = 100000.00; // resistance of R1 (100K) 
float R2 = 10000.00; // resistance of R2 (10K) 
int val = 0;
void setup(){
   pinMode(analogInput, INPUT); //assigning the input port
   Serial.begin(9600); //BaudRate
}
void loop(){
   
   val = analogRead(analogInput);//reads the analog input
   Vout = (val * 5.00) / 1024.00; // formula for calculating voltage out i.e. V+, here 5.00
   Vin = Vout / (R2/(R1+R2)); // formula for calculating voltage in i.e. GND
   if (Vin<0.09)//condition 
   {
     Vin=0.00;//statement to quash undesired reading !
  } 
Serial.print("\t Voltage of the given source = ");
Serial.print(Vin);
delay(1000); //for maintaining the speed of the output in serial moniter
}

Comments

Similar projects you might like

3D-Printed Prank Vibrating Cup

Project tutorial by Alex Wulff

  • 1,291 views
  • 2 comments
  • 14 respects

The Magic Display With Arduino - The Mind Reader

Project tutorial by LAGSILVA

  • 1,513 views
  • 2 comments
  • 6 respects

Very First Hands On Arduino - Voice Activated LED

Project tutorial by Liren Yeo

  • 771 views
  • 1 comment
  • 9 respects

Get Connected! WiFi Registration Using AP Mode!

Project tutorial by Brian Carbonette

  • 1,447 views
  • 0 comments
  • 16 respects

The Soldering Iron Controller for Hakko T12 Tips

Project tutorial by Alexander

  • 8,672 views
  • 4 comments
  • 26 respects

Prank Your Friends with Talking Darth Vader

Project tutorial by Chathuranga Liyanage

  • 322 views
  • 0 comments
  • 2 respects
Add projectSign up / Login