Battery Tester the Other One, Not ShellSpinner's One.

This is a quick guide to testing a battery.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Too Blurry? Let Me Check...

Step 2: Better? No? Hold On...

Step 3: There We Go.

this is how you set up the arduino

Step 4: And Here Is a Digital View

Parts list

3 led

330 ohm resistors

arduino uno r3


programming software


wires for arduino

Step 5: And Here Is the Code

#define newLED 2 // green LED 'new'

#define okLED 4 // yellow LED 'ok'

#define oldLED 6 // red LED 'old'

float analogValue = 0;

float voltage = 0;

int ledDelay = 2000;

void setup(){

pinMode(newLED, OUTPUT);

pinMode(okLED, OUTPUT);

pinMode(oldLED, OUTPUT);


void loop(){ function(); }

void function(){ analogValue = analogRead(0);

voltage = 0.0048*analogValue;

if(voltage >= 1.6){

digitalWrite(newLED, HIGH);


digitalWrite(newLED, LOW);

} else if(voltage <1.6 && voltage > 1.4){

digitalWrite(okLED, HIGH);


digitalWrite(okLED, LOW);

} else if(voltage <= 1.4){

digitalWrite(oldLED, HIGH);


digitalWrite(oldLED, LOW);

} }

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions


    3 years ago

    Great Instructable , Clear (Not Pics :)) Concise and to the point .

    I Like

    I Made :)

    Keep it up


    3 years ago

    Glad you got the blurry pictures figured out! :)