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

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

This is a quick guide to testing a battery.

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

Picture of Too Blurry? Let Me Check...

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

Picture of Better? No? Hold On...

Step 3: There We Go.

Picture of There We Go.

this is how you set up the arduino

Step 4: And Here Is a Digital View

Picture of And Here Is a Digital View

Parts list

3 led

330 ohm resistors

arduino uno r3

battery

programming software

breadboard

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);

delay(ledDelay);

digitalWrite(newLED, LOW);

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

digitalWrite(okLED, HIGH);

delay(ledDelay);

digitalWrite(okLED, LOW);

} else if(voltage <= 1.4){

digitalWrite(oldLED, HIGH);

delay(ledDelay);

digitalWrite(oldLED, LOW);

} }

Comments

NattyT (author)2016-01-31

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

I Like

I Made :)

Keep it up

wold630 (author)2016-01-29

Glad you got the blurry pictures figured out! :)

About This Instructable

368views

7favorites

License:

More by raceH:Arduino Temp Machine Battery tester the other one, not ShellSpinner's one.
Add instructable to: