SHIVENDRA VATSA MISHRA
Published © GPL3+

Using Arduino Uno as Voltmeter

Measure the amount of energy or power or voltage left on your battery with couple of jumper wires and Arduino Uno.

BeginnerFull instructions provided1 hour1,665
Using Arduino Uno as Voltmeter

Things used in this project

Hardware components

DFRobot DF Robot Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
AA Batteries
AA Batteries
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

VOLTMETER.ino

C/C++
const float referenceVolts = 5.0; 
const int batteryPin = 0;

void setup()
{
Serial.begin(9600);
}

void loop()
{
int val = analogRead(batteryPin);
float volts = (val/1023) * referenceVolts;
Serial.println(volts);
}

Credits

SHIVENDRA VATSA MISHRA
5 projects • 17 followers
Parsuing B.Tech from SRM Institute Of Science And Technology in Electrical And Electronics Engineering.
Contact

Comments

Please log in or sign up to comment.