Home Sign Up! Browse Community Submit All
Art
Craft
Food
Games
Green
Home
Kids
Life
Music
Offbeat
Outdoors
Pets
Photo
Ride
Science
Tech
Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) by moris_zen on November 10, 2009
Table of Contents
Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
Intro: Arduino True Battery Capacity Tester Tester (Li-Ion/NiMH/NiCD/Pb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Step 1: This is what you can get at the end...(just end...(just to get you interested) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Step 2: Lets start at the begining begining - Arduino Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
Step 3: Bread board Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
Step 4: FET with 2.2Ohm 2.2Ohm load load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
Step 5: The SW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Step 6: Auto Detect Battery tyoe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Step 7: Discharging... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Step 8: Discharge Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Step 9: My SW (free for anyone anyone to use) use) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Step 10: The schematics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Step 11: Please support my work by voting for me ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Intro: Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) If anyone saw my last instructable "Simple Li-Ion Battery Power Tester" they can now upgrade to a computerized hi-tech version that is capable of measuring almost any type of rechargeable or none rechargeable batteries (but it will drain one charge from them in the process). It can even connect to a PC and give you a full "Data-sheet" graph of the discharge and total capacity. Note that this is my first Arduino project (I am not counting my "blink LED").
Image Notes 1. Auto Detect Battery type by voltage
Step 1: This is what you can get at the end...(just to get you interested) This is the graph you can get fr om the text file sent to the PC during drain cycle.
Image Notes 1. Total capacity of a new 2000 mAh Bat was 1580mAH! 2. When voltage drops bellow 950mV (for NiCD/NiMH) the load is removed (via the FET) 3. Seconds 4. mV
Image Notes 1. Li-ION Battery graph
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Step 2: Lets start at the begining - Arduino I really wanted to get this Diecimila copy Arduino board bit it took me ~2 weeks to get it by mail so I just had to start fast with my own bread-board Arduino so I purchased an ATMEGA168 and thought I could get it running without any more components .. to my suprize it didn't work and I just had to get another shipment wit h a 16Mhz crystal and two 22pf caps .. then I got the next ...
Step 3: Bread board Arduino I basically took junk apart and added the components one by one ... most of the information can be found in the Arduino web page : http://arduino.cc/en/Main/ArduinoBoardDiecimila They realy have everything you need . It took me about a week t o get it up and running (bootloader / building an ISP cable and an RS232 cable ...) - you can read all about this in the site above .
Image Notes 1. connector to LCD 2. ATMEGA168 3. Max232 4. This led indicates you want to vote for me :-) Does anyone even read all these comments?
Step 4: FET with 2.2Ohm load it was fairly simple to add a FET with "on" resistance of ~8mOHM (no barly any power disipation on it ) and a 2.2 10W resistor . I connected two A/D pins from the Arduino to the resistor poles and subtracted the values to get the exact volatge drop on the resistor . Now I samples them every second and acumulated the current (I=DeltaV/R). I also added a buzzer to indicate when charging was over and stoped the discharge .
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Image Notes 1. This FET was removed from a TV set - it has 4mOhm on-resistance.cool! 2. 10W 2.2Ohm Resistor load
Step 5: The SW So I also connected and LCD (which I took apart from some other junk) and found the data-sheet on the net + a cool driver from the Arduino web page and started coding . Auto detecting battery type by the voltage .
Image Notes 1. Testing voltage to deterim battery type 2. RS232 connector 3. Reset 4. Power On 5. Load is active (discharging) 6. Ventilation holes for the 10W resistor
Step 6: Auto Detect Battery tyoe It will detect if it is NiMH/NiCD or Li-ION by the voltage range . And then start the discharge cycle.
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Image Notes 1. Auto Detect Battery type by voltage
Step 7: Discharging... The discharge can take anywhere from 30-120 minuets depending on batery capacity but at the end you get a true i ndication of battery capacity / quality . Do you want to use that battery for your air-plain receiver or not ? This is the diagram of the discharge circuit...
Image Notes 1. The discharge just started - the 1Ma will increase as time goes bye..
Step 8: Discharge Circuit very simple with the 2 A/D connected on the two sides of the r esistor / Vr=Vbat-Vfet.
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Image Notes 1. Connect to pin 19 of Atmega168 2. Battery to be tested 3. 10W load
Step 9: My SW (free for anyone to use) // include the library code: #include LiquidCrystal lcd(12, 11, 5, 4, 3, 2);// initialize the library with the numbers of the interface pins int sensorPin = 0; // select the input pin for the potentiometer (pin 23) int sensor2Pin = 2; // select the input pin for the potentiometer (pin 23) int ledPin = 13; // select the pin for the LED int SPKPin = 6; int sensorValue = 0; // variable to store the value coming from the sensor int sensor2Value = 0; // variable to store the value coming from the sensor float LiMinThreshold = 2700; // Lithium Minimal Voltage for load removal float LiMaxThreshold = 4200; // Lithium Max Voltage for load removal float NmhMinThreshold = 950; // NMH Minimal Voltage for load removal float NmhMaxThreshold = 1600; // NMH Max Voltage for load removal float SelectedMinThreshold = 5000; int i; int BatVoltage = 5000; int FetVoltage = 5000; long TotalCurrent = 0; boolean done = false; unsigned long PrevMillis ; unsigned long MillisPassed ; void CL2(){ lcd.setCursor(0, 1);// Second line first char lcd.print(" "); lcd.setCursor(0, 1);// Second line first char } void setup() { Serial.begin(9600);// start serial port to send data during run to the PC pinMode(ledPin, OUTPUT);//activation led and enable for FET pinMode(SPKPin, OUTPUT);//activation led and enable for FET lcd.begin(24, 2);// set up the LCD's number of rows and columns: lcd.print("Bat PWR Tester[Active]"); // Print a message to the LCD. lcd.setCursor(0, 1);// Second line first char lcd.print("Detecting Bat Type..."); // print voltage value delay(2000); lcd.setCursor(0, 1);// Second line first char lcd.print(" "); lcd.setCursor(0, 1);// Second line first char digitalWrite(ledPin, HIGH); // set the LED on sensorValue = analogRead(sensorPin); // read the value from the sensor: digitalWrite(ledPin, LOW); // set the LED off // Detecting battery type BatVoltage = sensorValue*4.887; if (BatVoltage > 4500){ lcd.print("Warning high-V! "); done = true;} else if (BatVoltage > LiMinThreshold){ lcd.print("Type:Li-Ion Bat "); SelectedMinThreshold = LiMinThreshold;}
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
else if (BatVoltage > NmhMinThreshold){ lcd.print("Type:NiMH/Cd Bat "); SelectedMinThreshold = NmhMinThreshold;} else{ lcd.print("Unknown Bat V<1 "); done = true;} lcd.print("V="); lcd.print(sensorValue*4.887); // print voltage value Serial.print("DT[ms]"); Serial.print("\t"); Serial.print("Bat[mV]"); Serial.print("\t"); Serial.print("Fet[mV]"); Serial.println(""); delay(3000); CL2(); PrevMillis = millis(); } void loop() { if (BatVoltage > SelectedMinThreshold && !done) { digitalWrite(ledPin, HIGH); // set the LED on sensorValue = analogRead(sensorPin); // read the value from the sensor: sensor2Value = analogRead(sensor2Pin); // read the value from the FET: FetVoltage = (sensor2Value*4.887); BatVoltage = (sensorValue*4.887); CL2(); lcd.print("V="); lcd.print(BatVoltage); // print voltage value lcd.print("mV"); //lcd.print(FetVoltage); // print voltage value TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/2.2/3.6; lcd.print(" I="); lcd.print(TotalCurrent/1000); lcd.print("mAH "); delay(1000); MillisPassed = millis()- PrevMillis; PrevMillis = millis(); Serial.print(int(MillisPassed)); Serial.print("\t"); // prints a tab Serial.print(BatVoltage); Serial.print("\t"); // prints a tab Serial.print(FetVoltage); Serial.println(""); // prints a tab CL2(); } else { done=true; digitalWrite(ledPin, LOW); // set the LED off - stop loading lcd.setCursor(0, 0);// First line first char lcd.print("Bat Power Tester [DONE] "); // Print a message to the LCD. CL2();//clear line 2 sensorValue = analogRead(sensorPin); // read the value from the sensor: BatVoltage = (sensorValue*4.887); lcd.setCursor(0, 1);// Second line first char lcd.print("V="); lcd.print(BatVoltage); // print voltage value lcd.print("mV I="); lcd.print(TotalCurrent/1000); lcd.print("mAH "); for (int i=0; i<100 ; i++){ digitalWrite(SPKPin, HIGH); delay(1); digitalWrite(SPKPin, LOW); delay(1); } delay(1000); } }
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Step 10: The schematics ... All the schematics for arduino can be f ound on the Arduino web page (step 2). you can Also find how to connect standard LCDs on the same site so no need to copy i t all here.
Step 11: Please support my work by voting for me ! All and all prototype Breadboard and then moving it to a box and soldering it all together took me two weeks (night work 3-4 hours a day) Thanks you for reading and feel free contacting me with any questions / remarks . I am now an Arduino expert (naa I am not - 2 weeks XP ) But I have many new project I would like to do .
Related Instructables
Rechargeable Battery Capacity Tester by BrianH
SAFE Recharging of Exotic Batteries, NiMH, LiPO and complex battery packs or multiple cells. by erckgillis
NiCd - NiMH PC Based Smart Charger Discharger by hosam_eldin
Homemade Cordless Drill Battery Charger by yeltrow
Extend Life... (of notebook batteries) by denanderen
Increase battery life for electronics by Plasmana
Comments 35 comments Add Comment
blast09 says:
Mar 16, 2011. 10:53 AM REPLY
Sorry but I miss something...It seems to me there's a typo in PPT diagram. Pin "fetVoltage[plus]" on discharge circuit is left floating around. Could you confirm this? Thanks for great work anyway.
paulryanmini says:
Mar 10, 2011. 1:16 PM REPLY hi all fixed the code after a long night. i can get the setup to start up and the lcd turns on. it will then pick up what type of battery is connected and will measure the voltage and current of the battery, but the led wont illuminate which leads me to believe the mosfet is not switching on. im using a irf540a with a rds on of .052 ohms. any ideas? Ive been using a 1.3v 1200mah AA rechargeable battery nimh. any ideas? thanks
paulryanmini says: hi i copied the code above directly into ardunio 0022 program. i have the duemilanove clone. it comes up with the following errors: dunkbat.cpp:3:10: error: #include expects "FILENAME" or dunkbat:3: error: 'LiquidCrystal' does not name a t ype dunkbat.cpp: In function 'void CL2()': dunkbat:23: error: 'lcd' was not declared in this scope dunkbat.cpp: In function 'void setup()': dunkbat:31: error: 'lcd' was not declared in this scope dunkbat.cpp: In function 'void loop()': dunkbat:76: error: 'lcd' was not declared in this scope dunkbat:99: error: 'lcd' was not declared in this scope
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Mar 9, 2011. 11:31 AM REPLY
any ideas im a complete noob thanks paul
paulryanmini says:
Mar 2, 2011. 10:30 AM REPLY
thanks very much. im building it as part of a assignment for power electronics. i will then alter it to work with 36v 14ah lithium polymer batteries somehow :-) if you have any ideas that would be great
slvr00gt says:
Jan 9, 2011. 2:10 PM REPLY
Here is more detailed diagram of the same thing
slvr00gt says:
Mar 2, 2011. 6:47 AM REPLY
Adding better quality diagram
BatteryDischargeTester.ppt63 KB
paulryanmini says:
Mar 2, 2011. 4:35 AM REPLY
hi its a fantastic circuit and ive started to build it. have you by any chance got a higher resolution of the diagram above i cant zoom in enough? thanks
moris_zen says:
Mar 2, 2011. 10:50 AM REPLY
I see some one made a diagram - great work
slvr00gt says:
Mar 2, 2011. 6:49 AM REPLY Just added powerpoint file above.... My diagram j peg was originally high quality, but this forum compressed it into nothing. So I added original ppt file
arnefl says:
Feb 25, 2011. 7:43 AM REPLY
Sure I do :-)
slvr00gt says:
Jan 9, 2011. 2:13 PM REPLY Here is my change to the code. Change adjusts the voltage when the test stops. It also prints out capacity over time to the serial port. and changes input pin numbers to what I end up using $ diff my.cpp orig.cpp 7,8c8,9 < int ledPin = 8; // select the pin for the LED < int SPKPin = 9; --> int ledPin = 13; // select the pin for the LED > int SPKPin = 6; 18c19 < int FetVoltage = 0; --> int FetVoltage = 5000; 66,67d66 < Serial.print("\t"); < Serial.print("Capacity[mAH]"); 75c74 < if ( (BatVoltage-FetVoltage) > SelectedMinThreshold && !done) { --> if (BatVoltage > SelectedMinThreshold && !done) { 86c85 < TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/10/3.6; --> TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/2.2/3.6; 98,99d96 < Serial.print("\t"); // prints a tab < Serial.print(TotalCurrent/1000);
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
slvr00gt says:
Jan 6, 2011. 11:58 PM REPLY In the code you have following if- statement, where you check whether or not battery has reached the minimum., but in the check, you don't factor FetVoltage. Should this statement: "if (BatVoltage > SelectedMinThreshold && !done) {" be replaced with this: "if ( (BatVoltage-FetVoltage) > SelectedMinThreshold && !done) {" Thanks for the great instructable. I just finished building your design!
moris_zen says:
Jan 7, 2011. 8:27 AM REPLY It makes me happy people do actually use my designs . It has been a while a go and I dont remember exactly but as far as I do I connected two points on the battery as the voltage on the Bat is the difference between them (or was that over the resistor) . Pls check if the voltage is not clearly just over the battery - If I got it wrong then there may have been a mistake yet the voltage drop over a good FET (< 40mohm) could be neglected- o that may be the reason .
moris_zen says:
Jan 7, 2011. 8:31 AM REPLY
OK .. correction - the voltage on the top of the resistor is the battery voltage - it is correct .
slvr00gt says:
Jan 7, 2011. 9:44 AM REPLY Yes, the voltage drop over FET is negligible ( roughly 0.03V), but in your design it is measured and used in calculation: TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/2.2/3.6;
slvr00gt says:
Jan 7, 2011. 7:26 AM REPLY
My second question is how do you get drain data from microcontroller board to PC?
moris_zen says:
Jan 7, 2011. 8:30 AM REPLY I sent the info over RS232 . if you connect your PC (same channel I use to program it) ad open a terminal in the correct baud rate - you should see t he information just coming in . Copy paste into excel and make a graph f or it .
TheBlackBird says:
Oct 7, 2010. 9:12 AM REPLY Hello. I would like very much to build this, but can you please clarify some aspects. Do you use one or two connections to the arduino, because in the schematic you only draw one (on pin 19), and in the code you mention pin 23 "int sensorPin = 0; // select the input pin for the potentiometer (pin 23) int sensor2Pin = 2; // select the input pin for the potentiometer (pin 23)" and what is the potentiometer ? In short i don't understand what pin of the arduino i connect where. Thank you.
moris_zen says:
Oct 14, 2010. 5:09 PM REPLY
Hi , Sorry for the late response , I don't really remember so much but I tried to review the code . I used the ledpin as the output pin (all ground must be connected) . The ledpin activates the FET and thus t he load . There might be some mixup between the pins in the code and in the comments because I decided to make my own arduino (ot use the purchased board) and thus indicated the physical (chip) pin i n the comments (and I did a copy paste mistake in the two li nes of the sensors). In any case I used two pins for sensing the voltage across the resistor . the difference if the voltage drop on the load resistor and when you divide this by the resistance you get the current flow . I hope this helped .
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
TheBlackBird says:
Oct 14, 2010. 9:31 AM REPLY
Moris, it is great that you have made this instructable. But because you did it in a haste there are things uncleat. So preety please :) can you post some answers from time to time. Don't let us hang.
Euphorbium says:
Sep 1, 2010. 3:48 AM REPLY
BatVoltage = sensorValue*4.887; Where does this 4.887 comes from? Is it some constant?
Madrias357 says:
Aug 20, 2010. 1:31 PM REPLY
Yes, I read all of the little comments.
mathman47 says:
Feb 11, 2010. 4:01 AM REPLY Great job. Finally something useful for the Arduino. I can use as a ham radio operator with lots of batteries. Keep up the good work and post more when you get a new project. Oh, does the FET have a part number or any markings on it?
moris_zen says:
Apr 25, 2010. 1:02 PM REPLY It is all closed in a box now but I will give you a tip to how I select my components ... when I have old electronics I take a torch and burn the back side very well - then when all solder is solf I hit it many times on the other sides and the components just fall off . I colect and sotrt them (Just did it with an old TV set) . The when I need a FET or any other components I just search the net for the PNs on the components and take whatever is best suited . So back to your question - you can use almost any FET that can withstand the current (most will do t he job .. you need low impedance .. check out their DS from the net) good luck .
moris_zen says:
Feb 11, 2010. 11:30 AM REPLY The box is shut tight and I cant get to the PN of the FET but I just open old TVs and look around then search the PN on the net and see if they can meet the current .. here I really over did it :-)
guyfrom7up says:
Nov 10, 2009. 7:58 PM REPLY very nice and well done! This is an arduino project I actually like! It used a real schematic (thankyou! lol) and it was interfaced with a computer, which is one of the main convienient part of the arduino (otherwise i strongly suggest a plain microcontroller). I'm currently working on a "supermeter" which is pretty much like a multimeter with a whole bunch more functions. The current model i'm designing has about 40 functions and I'm adding some code (I'll be using an avr, not an arduino, even though they are both avr :P) so that it'll now test battery capacity. Great instructable, and 5 stars!
moris_zen says:
Apr 25, 2010. 12:59 PM REPLY
Thanks for the FB . I would love to see your instructable - pls post it when you are done. I was thinking of adding charging capability to it but after finding a micro controller multi charger for 35$ I decided to just buy it .... I don't think it tests for the actual capacity .. I should get it soon from Ebay
moris_zen says:
Nov 11, 2009. 1:11 PM REPLY Thanks . The schematics is real simple and is based on the original Arduino Delicima and then just a fet with a load .. tx rx from arduino to pc (you actualy only need tx) and you get a clear table for excel. post you project when you are done! good luck.
cipriti says:
Apr 25, 2010. 1:25 AM REPLY
I used a BUZ11 fet and it's not working. Any ideeas?
megapix says:
Jun 18, 2010. 5:45 PM REPLY Most likely reason would be connecting it wrong. Another possibility is that the threshold voltage for a BUZ11 (the voltage where it just starts to turn on) can be as high as 4 Volts. So it could be that the 5 Volt drive from the Arduino is not turning it fully on. When they measure the resistance in the data sheet they put 20 Volts on the gate (Vgs).
MattSum1 says:
Nov 17, 2009. 6:28 AM REPLY Can you provide some more info on the non processor electronics? In one step you mention "a FET with "on" resistance of ~8mOHM" in which I'm not sure what the ~ means. Then later you say "This FET was removed from a TV set - it has 4mOhm on-resistance.cool!" which is different. Any info on what different resistances does in this case would be very helpful. Also, besides the 2.2 ohm 10w, I see another resistor, a couple led's, a "reset" button, and of course the LCD. Can you maybe provide some info on the "non arduino" components & possibly a schematic showing the non arduino stuff?
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
moris_zen says:
Nov 18, 2009. 1:37 PM REPLY
I will try to answer the best I can - you have many questions . 1. The 4-8 mili Ohm is approximately the "on" resistance of the FET - use an N channel FET any kind you find (try Wikipedia for info on FETs if you don't know what they are .... basically it is an electronic switch with low resistance). 2. all Arduinos have a reset Switch used to restart the device / program it . if you are not familiar with Arduino - pls go to the web page I placed in the article . I can't pass 2 weeks of learning in a sentence - you must o the web page and r ead about it - what it does and how . 3. I just used a led to indicate when the FET is "ON" with a resistor in series so not to over load it (1K ohm will do the trick). 4. to connect an LCD you need to use the library in the Arduino (see SW include file) . you can find all the info and an example on the Arduino web page . I hope I helped - I know not completely but I can't copy all Arduino site here . I hope you understand.
amidar says:
Nov 12, 2009. 4:20 AM REPLY
Hello, just a simple question. :-) What for is division with 3.6 in this formula ? TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/2.2/3.6;
moris_zen says:
Nov 12, 2009. 1:26 PM REPLY Nice to see someone actualy read the code - way to go! 3.6 is 3600 seconds (an hour) 60x 60 - I put 3.6 due to removing 1000 from the (what do you call the upper part divisor divider .. whatever) :-)
amidar says: I figured that just about 10ps after i pressed "post comment" button ! :-) Anyway, here is one very instructive site releted to battery charging/recharging. I learned a lot especially from schematic part of the project. :-) www.avr-asm-tutorial.net/akkuload/en/index.html
http://www.instructables.com/id/Arduino-True-Battery-Capacity-Tester-Li-IonNiMH/
Nov 12, 2009. 3:29 PM REPLY