loading

Step 3: Theory and operation

Theory and Operation

Li-Ion Batteries , when charged under no load have a Voltage of about 4.2 Volts , that quickly drops to about 3.9 Volts under load and slowly drops as the charge is used . a Li-Ion Battery cell is considered fully discharged then the under load Voltage get below 3.00 Volts.
So what i do it have the battery attached to one of the Adruino's Analog Input's , and read the No-load value. at the same time waiting for the start Button to be pressed. If the voltage input is above 3.00 volts when the Button is pressed the test will start. 
When the test starts  the Solid State relay is energized with switch the 4 ohm resistor to be a load directly across the battery. the Voltage is then read every half second and using ohm's Law current ,  I=V/R,  R= 4 ohms and V is read from the Analog input. Since this reading is taken every half second , we know there are 7200 1/2 seconds in an an hour , we just take the current  multiply it by 1/7200 of an hour and accumulate all those reading and until the Voltage  is below 3.00 volts , at that point the Relay is shut off and the grand total of how many maH of energy was released is displayed

<p>What is 7.2 mean?</p>
<p>Hi, there is any way to use this fantastic system to test the whole laptop battery instead the single cell?</p><p>Thanks</p>
<p>why pin out of relay is 3.5 V. not 5V. but pin button is 5V. when i using relay. relay is flashing, because this relay is logic 5V</p>
<p>Hi, been trying to make this with no sucess. Get all sqaures in the lcd. </p><p>I,m new to arduino and coding has not sunk in yet. Would be nice to have some info on how to get around this </p><p>thanks</p><p>o</p>
<p>The black squares mean the LCD was not initialized. In this case, it's a sign that it is mis-wired. On review, there appears to be an error in the schematic. </p><p>Pin 4 of the LCD (RS) should go to Pin 2 of the Arduino.</p><p>Pin 5 of the LCD should go to ground.</p><p>Pin 6 of the LCD (E) should go to pin 3 of the Arduino.</p><p>Double check your 4 data lines. They appear correct in the schematic.</p><p>The key is the &quot;LiquidCrystal(rs, enable, d4, d5, d6, d7) &quot; command. Review it and your wiring.</p><p>Let us know what you find.</p>
<p>Hello, i`m noob in to arduino,</p><p>I wana do this project, but i dont have this tipe of display, i have an SPI display 1.8 128*160, is it hard to change the program to display data on this display, Thank you!</p>
<p>You may have shorted two pins on the lcd, and double-check your variables in the code. This project is not too hard to make, it was my first arduino project (after blink :)</p><p>I suggest you use Fritzing to draw your shematics. Much easier to breadboard.</p><p>Look at the arduino website, and read, read, read.</p>
I made a more polished verison of this same thing for doing way more batteries.<br><br>instructables.com/id/Automatic-18650-Analyzer/
<p>This is an AMAZING device and can even be improved a little.</p><p>I made a very similar device to test powerbanks at work about 18 months ago.</p><p>A powerbank exploded in a user's pocket injuring him. We had relied on our supplier to test the devices. We set up a fairly rigorous testing regime. We tested not only our units but also the competitor's units and got to learn a huge amount about powerbanks</p><p>We eventually got hold of the exploding powerbank and found it was a fake copy of one of ours, very similar outside but without any protection circuit inside.</p><p>Some notes:-</p><p> * Our Chinese powerbanks seldom fail and when they do, they fail safe</p><p> * They usually have an efficiency in excess of 83%</p><p> * The power delivered is very smooth. Less than 10mV spikes. 0.4V to 0.7V total voltage variation throughout the cycle</p><p> * Some of the competitor's powerbanks are not very good (read &quot;dangerous!&quot;)</p><p>Features I incorporated that may enhance any power measurement device:-</p><p> * We rapidly sample 1000 times (to increase accuracy) and record the average, the max and the min in a spread sheet</p><p> * This is repeated 40 times a second until the unit is discharged</p><p> * We use a variable load (mosfets and some opamps) but have found that we always run it at 1 Amp. The technicians can then compare different powerbank models against each other.</p><p> * Our customers sometimes ask us to test units that have been returned to them and the units generally (almost always) pass. The weak link in powerbanks is the power cable.</p><p>A word of caution - Our company has come to rely on this simple device more than the sophisticated equipment used by our suppliers (not a good idea). We have challenged new suppliers on the results. The suppliers tend to get very annoyed when they discover out test equipment is an Arduino and some opamps, lying loose on a workbench...</p>
<p>For anyone interested, here's a similar, but also totally different, project that I did using an Arduino to test and compare the amp hour capacity of some popular brands of AA batteries:</p><p>http://www.buchanan1.net/battery_test.html</p>
<p>Nice job mi amigo! A further advancement is to use at least three different loads, capture the data and run it into a spreadsheet so you can look at the different curves to determine &quot;Quality&quot; of the battery. The performance of a battery changes with the load. Performance is dependent upon on its equivalent series resistance (which changes with temperature). Something else to capture and compare is temperature of the battery under load. This will give you a good idea of the quality of the battery. In a battery bank, I would not mix batteries that have wildly different load and temperature characteristics. Just some advance thoughts when dealing with Li-Ion battery recovery.</p>
<p>There are two types of li-ion batteries, protected and unprotected. a rule of thumb is those you buy as individual batteries are protected, however those you pull out of computer battery packs tend to be unprotected as the protection circuity is part of the pack electronics, and the cells don't simply burn, they ARE explosive if shorted out, without the protective circuitry, they are best suited for replacing bad cells in packs, or for powering led based flashlights. BUT should be carefully charged and NEVER overcharged.</p>
Hi there, can use this to measure how long can total energy that is in the cell power the arduino circuit?
<p>I used a prototype board too. This is how it looks. I chose to use a push-button to start the test whenever i want. If the button is not pushed, the tester acts like a voltmeter. I also added a call conversion function in source code to convert the seconds into human readable time (like hours:mins:secs). I also use it a lot.</p>
Is there any limitation on the resistor used ? i am using a 5.6 ohm 10 watt resistor ... i read in a similar project that the resostance should be less than 4 ohm ... please clarify
<p>I just can get an 3.9 Ohm 9W resistor.<br>I'm right that I must change this line</p><p>mah = mah + (((sensorValue*4.98)/1023)/4 )/7.2;</p><p>to </p><p>mah = mah + (((sensorValue*4.98)/1023)/3.9 )/7.2;<br>or is there something else to change?</p>
<p>I=V/R so I = <em>sensorvalue (V) / Resistance (Ohm)</em></p><p>You are right. For more precision, check the total resistance of your circuit with a multimeter and use this value in your program.</p>
<p>It works! Now I will check my diving lamp batteries... I'll soon solder all parts to a prototype board and use it regulary. Thank you all.</p><p>ps: I removed the push-button switch and added a buzzer. :)</p>
<p>I'm building this project, and I have the same problems than tony_roti. I'm wondering: Do we absolutely need a push-button switch? All my problems seems to come from here. I will modify the program to start automatically when the voltage is above 3.00 volts. Thank you splats for this nice project and all others for your constructive comments.</p>
<p>Does this work for 26650 batteries too? They basically have the same voltage, and just more mAh than 18650.</p>
I think that you must put a lcd.clear(); before final result are printing. And delete spaces in lcd.print(&quot; V &quot;); and lcd.print(&quot; mAh &quot;); <br>Why? Because if you test a cell with bigger capacity (4 digits), you won't be able to read the final digit of timing.
I was wonder if it can be adapt to measure the capacity of Ni-Mh/Ni-Cd 1.2V cells? In that case the load rezistor must be 2.8Ohm if we want a 500mA discharge current right? <br>I think the safe discharge voltage for this tipe of cells is 1Volt.
It's working great. Fantastic job. I have tested several god and bad cells. Especialy one that came with a cheap chinese flashlight, that says 4200mA, after I tested it, has only 729mAH. <br>Thank you splats for sharing.
<strong>Hi splats! Great idea. I have placed everything in order but I still have 2 problems (one solved):</strong><br> <br> 1. Wrong or no Initialization of the display: My LCD consistently showed black boxes in the bottom line. I've made some changes to fix this: since I don't read from the display, I've put the pin 5 of the display (RW) to the ground and use pin 4 (RS) and 6 (E) of the display for LCD initialization. I did use a potentiometer for brightness control and a 10Kohm resistor on pin 15 of the LCD for dimming the light of the display. I left everyting else in place like you did. Problem number one solved.<br> <br> 2. If no battery is inserted, the sistem displays for a short period of time &quot;Batery life test&quot; and goes directly to final result printing 0.00 mAh, 0s, 0.00 Volts (image no. 1). The relay in this state is off but at every two seconds, the relay is on for a short period of time (miliseconds). If a battery is inserted, the relay goes directly in high state and the sistem goes into the testing mode (image no. 2). This part seems to work well untill the 3V is reached. After that it shortly shows the final result and enter again in testing mode (loop mode - <a href="https://www.youtube.com/watch?v=XgWwhsGKmyM" rel="nofollow">see the video</a>). I have used this relay brick with built in EMF protection: <a href="http://www.parallax.com/product/27115" rel="nofollow">http://www.parallax.com/product/27115</a>. I have put the - IN to gnd, the + IN to 5V and the S pin (signal) to Arduino digital pin 1. The button is conected to Arduino digital pin 0 but it seems that the sistem ignore that. The load resistor in on NO (normaly open) OUT PIN of the relay. I don't know what the problem is.<br> <br> 3. Why do you put the buttonPin on 5V instead of the GND?<br> Thanks in advance.
Problem number 2 solved. I have used a 10Mohm pull down rezistor for the button. It seems to work fine now.
Hi Splats - thanks for the feedback! I suppose I should mention you should place an EMF protection diode across the coil of the relay, I can't get over how low the component count on this project is - good work Splats and thanks for sharing!
SInce I'm using a Solid State Relay , I don't have to worry about back EMF. but if I was powering a straight Relay coil then yes .
Great idea! Can you help with the relay choice? Does it have to be solid state? <br>Would this make a good choice? <br>http://cpc.farnell.com/sharp/s202s02f/relay-solid-state/dp/SC12326 <br>This is rated @ 8A <br> <br>This is a standard coil based relay: <br>http://cpc.farnell.com/imo-precision-controls/srm-1c-sl-5vdc/minature-power-spco-5vdc/dp/SW02552
I ordered 5V Relay Module for Arduino from dx, rated 10A AC/DC: <br>http://dx.com/p/arduino-5v-relay-module-blue-black-121354 <br>I don't know if the relay must be solid state. I think it should work with any 5V relay. <br>I will see. I'm still waiting for my order to arrive.
No it doesn't have to be solid state. I just used one because I have about 100 of them in a drawer. it should work fine with that relay.
No it doesn't have to be solid state. I just used one because I have about 100 of them in a drawer.
I just ordered most parts from dx (Funduino uno R2 compatible - USD$ 12,99, 16x2 LCD display - USD$ 3,40, 5V relay - USD$ 2,20, and some printed circuit board breadboard and jumper cable wires, total USD$ 24,79). Because it takes a lot of time to come (about 40 days), I will write after I put all parts together. I hope it will work.
This is a little beyond my knowlage and skill set but I would love to have an 18650 tester. Do you know of any low cost options, or where I could go to have one built?
hey its a great post to teach me buil the technology. <br />please also share this post here for me please:- http://technitute.com
I hope this doesn't sound like a &quot;not nice&quot; comment but you seem to be as spell challenged as I am.(I misspelled about 10 words in this comment alone!) There are a number of words that are just spelled wrong and others that are spelled right but are the wrong word for what was obviously intended. <br> <br>It is a great instructable but all the misspelled words were rather distracting. I would suggest doing what I do and that is use a word processor program that has a spell checker and correct any misspelled words before copying and pasting your text into the instructable. <br> <br>This instructable is a little advanced for me but I am keeping it for when I can catch up to it. <br> <br>Thanks for the idea!
None Taken , I went back in an cleaned it up a bit . I just type too fast for my own good sometimes.
Cool.

About This Instructable

40,812views

291favorites

License:

More by splats:Laptop Battery Analyzer /Recycler Helmet Mounted , High intensity lamp 
Add instructable to: