Lithium Ion 18650 Capacity Checker - Adam's Arduino Projects

Поділитися
Вставка
  • Опубліковано 22 січ 2016
  • After working out cheap ways to charge Li-Ion #18650 batteries I wanted to see if I could find a cheap way to check their capacity. In this video I design and build a simple circuit to do just that.
    Code / Sketch: admw.uk/iA
    Parts list:
    ❗️These links are affiliated and I may earn a small commission if you purchase❗️
    Nokia 5110 Module: goo.gl/vl9rY9
    Arduino Nano Clone: goo.gl/lgAAdC
    1 Ohm 10w Resistor: goo.gl/enzsns
    Aluminium Clad Power Resistor: goo.gl/21t4VI
    IRF3205 Mosfet: goo.gl/eepYsc
    Prototyping PCB: goo.gl/hSqjwP
    Terminal Blocks: goo.gl/GmWAVr
    I'd love to hear your comments and ideas for improvements.
    #Arduino #Project

КОМЕНТАРІ • 340

  • @gapreston
    @gapreston 6 років тому +3

    Even 2 years after this video was posted, you have people like me building this device! I find it to be quite accurate as compared to my Opus 3100. Love the tutorial at the beginning! Thank you for posting this, Adam.

    • @AdamWelchUK
      @AdamWelchUK  6 років тому

      Always great to hear this little project is helping people out. Thanks for taking the time to comment :-)

  • @Estudio322
    @Estudio322 8 років тому +3

    This is so simple that it is amazing, i was struggling to find a way to tell the capacity of my cells because of the voltage differences by the state-of-charge of the cell... but this is the solution! i'll be making this for sure...thanks!

  • @trickyriky1
    @trickyriky1 8 років тому +2

    just wanted to say a massive thank you, from your video ive built a few of these circuits up and are using them to discharge 18650 for my own eventual power wall, couldn't have got this far without the youtube stars, so thank you once more

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +1

      +Tricky Sales Thanks for coming back to tell me. That's excellent news.

  • @JonathanWellskcender
    @JonathanWellskcender 8 років тому +4

    I've ordered the parts and can't wait to build mine. I think the project can be further expanded too.
    You could use another MOSFET to switch on a TP4056 charger module before/after the capacity test completes. (If you tap into the 'charge complete' LED or monitor the current going to the charger, you could even switch it off once it completes or the current is below a threshold.)
    You could even have an option to drain a battery to the storage voltage instead of running it all the way down for the capacity test.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +1

      +Jonathan Wells Yeah, both good ideas. I did think about integrating the TP4056 and hacking the LEDs. Never did get pen to paper though to jot a circuit down.
      I would like to build a version 2 of this circuit as people seem to like it. Version 1 is very basic all because it was an afternoons project made with junk parts.
      Thanks for your comments and suggestions.

  • @Fifury161
    @Fifury161 8 років тому +4

    I have built three of these now (slight modifications), thanks for sharing! I want to include a time lapsed field as well, however I haven't quite figured out the coding for that and have been unable to determine if it will interfere with the mAh measurements. I'm also toying with the idea of using an ESP8266 and using the WiFi connection to upload the data.

  • @SpeccyMan
    @SpeccyMan 8 років тому +6

    I have built this using an IRFZ44N mosfet and all is working well. I have made a couple of minor alterations to the code. Firstly, since it is not recommended to discharge a lithium battery below 3V I have set the termination voltage to that. In fact I am thinking of setting it a little higher still to obey the 80% rule as it is supposed to prolong the life of the battery. The second modification is to assuage my ever-so-slight tendency towards OCD (haha) and have modified the printing of the mAh value in the 'running' screen to print the value right-aligned in a field width of 5. It just makes it look a little tidier to me. ;-)
    A great project and I am also following your DC Load project with keen interest. Thanks.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +3

      +Nick B Thanks Nick. When looking at the cut off voltage I found all over my power banks cut out at 2.9 volts but obviously it's up to individuals to set it at a level they are comfortable with as you have. Completely understand your argument about cell health too, but discharging and testing capacity isn't something we'd normally do on a frequent basis.
      I'm so glad people like this project and have built the circuit. The beauty of releasing the code means that anyone can change it how they wish so I'm glad you've been able to adjust it for your needs.
      Thanks very much for the comments.

    • @BeetleJuice1980
      @BeetleJuice1980 5 років тому

      Why we need two resistors? Can we use one big for the load and measure the voltage across that one with two resistors?

  • @exallievididonbosconcrgrou7544
    @exallievididonbosconcrgrou7544 6 років тому

    Adam - your video is great. I learned a lot. I have been looking at coulomb counter that others have said will do the job of batt capcity meter, but yours is simple and straightforward. The science behind your project is solid. Thanks again for putting a good video.

  • @olvano
    @olvano 7 років тому +2

    i am using that same circuit ,thanks for putting it up, works great .my circuit is 18650 holder,16x2 lcd and your arduino circuit with code rewritten for 16x2 lcd .coding the lcd was hard work because i would have too wait 1 month for one like yours to be shipped ,so i watch ur videos over and over until i mastered it .thanks again for a very good tutorials,looking forwards for new circuit.with your style for coding .

    • @BeetleJuice1980
      @BeetleJuice1980 5 років тому

      Can you share the code for 16x2?

    • @mich29sm
      @mich29sm 5 років тому

      You could have show the data in Arduino's IDE Serial Monitor

  • @akaDavidWebb
    @akaDavidWebb 7 років тому +1

    Excellent and elegant solution. And my first introduction into Arduino use. Well done!

  • @netcomptech
    @netcomptech 6 років тому

    I came across this video while researching an Arduino based battery capacity tester/charger. My specific use is 12V lead-acid batteries used with a solar panel. Thanks for the video, this will be my starting point.
    In the formula for calculating battery capacity the measurement interval used was 5 seconds. I have been searching the web and can find no standard for measuring battery capacity that recommends voltage measurements taken every 5 seconds, or any other specific interval. In the Arduino's final calculation of 896mAH, if 1 second intervals were used instead of 5 then the final value would be 5 times greater or 4480mAh. And if you only added measurements every 10 seconds then the final measurement would have been half or 448mAH. Since the final measurement varies widely depending on the sampling time used and not having any standard sampling time used across battery manufactures, I think the method of measuring battery capacity in this video is flawed.
    Another aspect of the formula used is that a reference voltage of 4.2V. In reference to the type of battery being tested (18650), 4.2V is the charging voltage and not the batteries nominal voltage which is 3.6v. This difference of 0.6v will certainly significantly skew the results.
    batterybro.com/blogs/18650-wholesale-battery-reviews/32496579-comparing-panasonic-18650-bd-vs-panasonic-18650-be
    The basic formula which being used is ((Vin - Vout) / R) * T. The capacity formula which involves voltage over time is ((V^2)/R) * T. I think if you adjust your formula and reference voltage the final result will be closer to the labeled battery capacity.
    I found a website with a Watt-Hour to mAH converter. According to this calculator the correct final reading using the testing method in the video for a 3000mAH 18650 is 18WH.
    www.rapidtables.com/calc/electric/wh-to-mah-calculator.html
    From what I have found on the web, constant current limiting should be used when determining battery capacity.
    electronics.stackexchange.com/questions/18612/how-to-measure-capacity-of-a-lithium-ion-battery
    Considering the above may explain the large difference between the Arduino's final result and the labeled capacity of the battery.
    Using a constant current enables easier testing of the batteries capacity. For example, with a fully charged 3.6V battery and using a discharging end voltage of 2.5v; and a discharge current of 0.61A; it should take 8.2hours to fully discharge (0.61A * 8.2hrs = 5000mAH). If the battery is not fully discharged very often it will last much longer and be able to go through the charge/discharge process a lot more times. It is important to note that once the battery gets past it's stable usable capacity a drastic increase will most likely occur and this needs to be protected against so that the battery does not overheat and explode.
    batterybro.com/blogs/18650-wholesale-battery-reviews/32496579-comparing-panasonic-18650-bd-vs-panasonic-18650-be
    The easiest way to test LI-on batteries, as well as other types of batteries, is with an iMax/B6 battery tester for about $25.00 - amzn.to/2HfQjaT

  • @retrotech2020
    @retrotech2020 8 років тому +1

    Great little project and nicely done.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      Thank you very much. Glad you like it.

  • @vangalvin
    @vangalvin 5 років тому

    Adam, Thank you for making such an informative video! it was a pleasure to watch. Brilliant tutorial indeed.

  • @arrowstheorem1881
    @arrowstheorem1881 7 років тому +1

    Very high quality contents. Highly appreciated.

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      +Cosmo John That's very kind. Thank you.

  • @deangreenhough3479
    @deangreenhough3479 8 років тому +1

    Great video, maths well explained. Thank you, I'm just looking in 18650 batteries and you have inspired me to also look for the parts and to replicate your work. Top man!

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +1

      +Dean Greenhough Good luck with your project Dean. Thanks for your comments.

    • @deangreenhough3479
      @deangreenhough3479 8 років тому +1

      I have built mine. It works like a dream. Although I had to adapt the code for an LCD i2c, but have ordered the Nokia as it looks perfect for the job.
      I have learned a lot from this, mainly b not having the parts, i did have a 1 ohm 5w resistor and a 12v bulb, worked out perfect.
      I now also have a respect for the NPN transistor, I like them a lot

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Dean Greenhough That's great news. We learn so much by tinkering!

  • @ovek.pettersen3643
    @ovek.pettersen3643 7 років тому +1

    Very nice video. Good explaining for your choices. And it works at the end. Very good tutorial.

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      +Ove K. Pettersen Thank you very much.

  • @roila555
    @roila555 6 років тому

    Hello there, im really inspired of how easy you make these projects look to beginners just like myself, and im just wondering if it is possible to add additional batteries to test multiple at one time, or even small batt. Pack cells or the intire pack using a device similar to this, ofcourse having to recode for it. Or perhaps even make different settings in the arduino for each type of setup One is testing?
    Regards

  • @FrancisRodgers
    @FrancisRodgers 5 років тому

    Thank you for sharing this video. I am working on something similar. However, one thing that confuses me and I cant seem to get an answer. There are people doing this on a larger scale (as I intend to later). Why don't they discharge into a capacitor, so they can reuse some of the power to charge another cell later? I imagine it would be a considerable saving if you have to do this for many thousands of cells.

  • @rob6676
    @rob6676 7 років тому +2

    Good stuff, thanks for sharing

  • @agentulcupar
    @agentulcupar 7 років тому

    Hi, Adam. Thanks for you work!
    I use on AP70T03GH MOSFET from an old mainbord ASUS. But the MOSFET remain ON after the arduino finish the code. The solution was to use 100 Kohm rezistor between Gate and Source too pull dawn.

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      Hello - a nice bit of recycling! Yes, this is a sensible step - If I return to this project I will definitely be adding a pull down on the gate. Thanks

  • @icommandoi145
    @icommandoi145 7 років тому +1

    Great video and thanks for sharing your code.

  • @techissimply
    @techissimply 8 років тому +1

    Very good project! Thanks :)

  • @brianoc22
    @brianoc22 5 років тому +2

    Hi Adam, I really enjoy your videos. I had a question about the load resistor and 'voltage sense' resistor here - I can't see why they couldn't be integrated into one load resistor across which the voltage is measured. In this case you'd be measuring the battery voltage effectively, but again, I guess this is the voltage applied to the resistor, and so is the right voltage to use to measure the current flowing... what do you reckon. I'm hoping to use this with Azande tool, which is very handy for interfacing arduino with pc. All the best!

    • @iforce2d
      @iforce2d 4 роки тому +1

      Typically a smaller value of resistor is used to keep the voltage across the resistor small, within a range that the microcontroller can read without blowing up. However in this case since the microcontroller is running at 5V and the maximum voltage of the battery is 4.2V, you are perfectly correct, the second resistor was not necessary. In fact, measuring the voltage drop across a smaller resistor only serves to make the result less accurate, because you're only using a small portion of the resolution of the analogRead range.

  • @nyquisttheorem7741
    @nyquisttheorem7741 7 років тому

    Hello Adam, great video and particularly useful for me as I'm looking and building the same thing but to discharge several batteries at once. I would make two small changes to the code:
    (1) Decrease the sample time
    (2) Get an average of the current flow so the calculated charge at sample is:
    q = ((I_previous + I_now)/2)*(t_now - t_previous)
    I'm thinking this would increase the accuracy of the measurement (my apologies on the algebra). You could possibly be short-changing the battery capacity. Maybe, since you already have it built, you can test with these code modifications to see what difference there is in the measured capacity for a specific cell?
    Changing the order of the load and the shunt in your schematic should also eliminate the need for the 'voltRef' parameter in the code.
    Thank you for taking the time to put this together and hope you are having a great holidays!

  • @havefunbesafe
    @havefunbesafe 7 років тому

    Well done mate!

  • @Latvian3Dman
    @Latvian3Dman 7 років тому

    Thank You for sharing this project! I am old timer hobbyist and engineer, recently I got interest into RC things, so akkus became important. Also I did see clone project with OLED screen.

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +1

      Yes there are now a few copies of this design - all well and good I released it so people could use and improve it. Always nice to get credit though! Thanks for your comments and have fun with your RC things!

    • @Latvian3Dman
      @Latvian3Dman 7 років тому +1

      I would like to ask couple of things, if You don't mind :) If I have on hand high wattage resistor with other value (say, 10 Ohms), I just change this in code? "float shuntRes = 1.0" to my value?
      With 10 Ohms as a shunt, can this device be used without any additional load resistance, similar as in clone project (with OLED) by "Open Green Energy"?
      Is there clear wiring schematics drawn (sorry, if I missed that somewhere in a rush)?
      Thanks in advance! :)

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +2

      Yes you could replace what is effectively two resisters with one and adjust the shuntRes value accordingly. I wanted to change my load so I could drain cells at different rates, but if you are happy with a slow drain (On average about 370mA) then this will work fine for you.
      I'm afraid I don't have a schematic except for the badly hand drawn one in the video. :-)

    • @Latvian3Dman
      @Latvian3Dman 7 років тому +1

      Thank You! Nice of You to give supportive answers here.

  • @200sxgrazor
    @200sxgrazor 7 років тому +1

    Thanks Adam, great work. Looking through my parts bin I have a relay that I used on another Arduino based project. Could I use a relay instead of a mosfet?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +1

      Yes I guess you could. If you use the normally open connection and common you won't need to adjust the code either. Just make sure your reply is good for the current you are discharging at and you might need to protect the gate pin (the one attaching to the coil) with a resistor to make sure it doesn't sink too much current from your arduino.

  • @M3rVsT4H
    @M3rVsT4H 7 років тому +1

    This is great, thanks for sharing.

  • @alexanderbutovsky9295
    @alexanderbutovsky9295 3 роки тому

    Thank you for excellent video! Could you explain why do we need a shunt resistor and two Arduino analog inputs to measure current. If we know exact resistance of the load (for ex. 4.7 Ohm) and have measured voltage on this load (for ex. 4.0 Volts) then we can calculate current as 4.0 / 4.7 = 0.851 Amp. So, I think that measuring battery voltage (that is the same as load voltage if load resistor is connected directly to the battery) we can always calculate current value. It means that one Arduino analog input is enough to measure both voltage and current. Am I wrong?

  • @xxKeReMxxx
    @xxKeReMxxx 5 років тому

    Hi, i really liked your project and i have a question. Is it possible to add 3 more batteries?

  • @ircykk
    @ircykk 7 років тому +1

    Cool project thank you for tutorial.

  • @Venomator.
    @Venomator. 6 років тому

    That I like Adam, nice work sir! Not sure I’ve seen anything quite so functionally pleasing as this piece of work... 👍🏻 🐍

  • @Ivan989000462
    @Ivan989000462 7 років тому +2

    great work
    but is there any protection circuit for over discharge
    as far as i know these battery's shouldn't go blow 2.5v , how u manged to do that ?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +3

      Thanks. The code reads the battery voltage and is set to finish discharging at 3 volts. You can always adjust this for your own needs. It's is probably worth placing a 10k resister between the gate of the mosfet and ground - that will ensure that the the mosfet switches completely off if you are worried about that. However I always say you should really keep an eye on lithium batteries whilst testing.

  • @juangoveamunoz4095
    @juangoveamunoz4095 3 роки тому

    I wonder what is the difference between doing this way and discharge the battery at a constant current, would you get the same capacity result number?

  • @xumi3051
    @xumi3051 8 років тому +1

    You should add Timer so we can see how long the process is running from start to finish, but i think your project is awesome.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +xumi Yeah there's a few improvements that could be made. This was one of those projects that I threw together rather than planned (aren't they all?). One day I might revisit it - or perhaps someone will improve the code and release it before that! Thanks for your comments.

  • @omsingharjit
    @omsingharjit 2 роки тому

    Can you make Or Add IR measuring feature also?

  • @yb835
    @yb835 3 роки тому

    Hi adam, how can we calculate how many times times the battery loaded and how we can we calculate the latest capacity of Battery?

  • @kostadinrusev284
    @kostadinrusev284 6 років тому

    thank you for the answer. I really did not have the library

  • @NoFear4XJs
    @NoFear4XJs 7 років тому

    Is there a circuit board that can be connected between a battery and a device that will state how long you can operate before it reaches a set cut off point ?
    Maybe a timer that has taken into account the volts and amp draw automatically....
    This would be a money maker, even if the circuit board had to do a one time drain on the battery it could have a memory that could be reset...
    Their must be many ways one can be designed and set up to function.
    Thank you for your time.

  • @neail5466
    @neail5466 6 років тому

    hello sir, i would like to tell you that using such a simple technology you have done a outstandingly precise job..but in order to achieve that accuracy i need your little help..would you please tell me how much tolerance does the fusible resistors have?? i got mine 2.2 ohm 10w..at 5.6ohm and 0.27ohhm 7w..at 1.8 ohm..would you please share the difference between actual and written value?

  • @a.n.e.1992
    @a.n.e.1992 2 місяці тому +1

    Good job

  • @cmj20002
    @cmj20002 7 років тому

    I have some bd243c NPN transistors. Can these be used instead of the mosfet that you used?

  • @fumezflori
    @fumezflori 7 років тому

    Hello, I'm looking to build a discharger with a higher Amperage capacity, your design could be modify to 15A discharger?

  • @zvonimirtrgovcic5499
    @zvonimirtrgovcic5499 7 років тому

    can you make a circuit and sketch for lipo battery with 10A discharge and cell monitor?

  • @chris9h1bw
    @chris9h1bw 6 років тому

    I have in stock the 2004A LCD display and am finding difficulties to wire it up according to the diagram. Is it possible for you to give me the right pin connections?
    I am all set to check the capacity of the 18650s I have.

  • @prahe86
    @prahe86 7 років тому

    Great video. Thanks for the code, too. I have subscribed to your channel.

  • @shivanigoud6556
    @shivanigoud6556 4 роки тому +1

    A helpful video for our project....
    Can u please suggest code for using lcd and Ardunio UNO instead of NANO , NOKIA 5110 Module

  • @chrisscanlan7743
    @chrisscanlan7743 8 років тому +1

    Great Video you just picked up another Subscriber. Thank you for your content. Will have a look at your other video's now. Thanks. Chris.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Chris Scanlan Thanks for the kind word Chris - I hope you enjoy what you find.

  • @kadirmaran4087
    @kadirmaran4087 7 років тому

    Hi Adam. Thanks for the project. I would like to ask something, is this the final version of it? Because, i''ve seen some other project with very little differences, and i think those are based on your project. But i just want to be sure which one is the most accurate and safe, before start to build one myself.
    Thanks again!

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      This is my first (and so far only) version. A few people have re-used this idea shall we say - most without any credit but imitation is flattery I guess... I would advise one simple improvement to this design (although there are far better ways to complete this task but they take more complicated and expensive circuitry) is to add a 10k resistor between the mosfet gate and source (ground) to ensure the mosfet goes off at the right time.

  • @lucianoserejo129
    @lucianoserejo129 6 років тому

    nice project! Can i use a arduino pro mini to build this?

  • @renatocanhaify
    @renatocanhaify 4 роки тому

    hello. Is it possible to transform it in a baterry cycler? that is a device which charges and discharges batery with positive and negative voltage cutoff?

  • @ipadtasticus
    @ipadtasticus 5 років тому

    Could you please tell me why we need 10ohm resistor AND load? Isnt that resistor a load itself?

  • @Fungineers
    @Fungineers 5 років тому +2

    Why do you have to use a seprate shunt? Cant you just use one resistor for both dissipation and for measurements?

  • @muhammadabunaimziatolihaza8721
    @muhammadabunaimziatolihaza8721 5 років тому

    please teach me on how to control battery from overcharge and overdischarge using arduino uno

  • @sethgandy1337
    @sethgandy1337 6 років тому

    So here's a head scratcher, I've just finished all the soldering and uploading the code, but it stays put on the "please wait" text. It never changes, I've tried restarting a few times and waiting in excess of 10 minutes, even with a battery connected. Have you seen that before?

  • @AntonMikhaylov
    @AntonMikhaylov 8 років тому +2

    Thank you very much for this project. I'm going to build one now.
    But can I use IRFZ44N mosfet instead of IRF3205? Characteristics are slightly different. I'm a noob in electronics, but it looks like it should work fine, even if the drain-to-source resistance larger (17mOhms vs 8.5 mOhms).

    • @AntonMikhaylov
      @AntonMikhaylov 8 років тому +1

      Oh. Silly me. The comment below by Nick B suggests that it will work. (:

    • @AntonMikhaylov
      @AntonMikhaylov 8 років тому +1

      And yes, you've got another subscriber!

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Anton Mikhaylov Thank you. Glad you found your answer.

  • @EM-ww3vl
    @EM-ww3vl 5 років тому

    can we use a relay instead of mosfet?

  • @TheAshish60
    @TheAshish60 5 років тому

    i have made one by using only 1 resistor ( 3 in parallel to get 3.3ohm) and when i check the voltage across the battery with multi meter it shows different value from the arduino voltage , like the arduino reads different voltage if i change the "voltRef" as the voltage reading is not current i might not get real capacity of any cells. is there any more accurate way to know the capacity even if its complex and might take time to make ? i just need the accuracy to be 95-99%

  • @jamiecole7032
    @jamiecole7032 8 років тому +7

    brilliant video managed to build one myself. Was wondering if you could add a charging circuit to this so it charges it first and when it gets to 4.2v it discharges it and shows the capacity. thanks again for the video.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +2

      +That Guy Thanks for the kind comments - I'm really pleased people are building these.
      You could potentially add a TP4056 charging module into the circuit or you could have the arduino control the charge if you wanted to get a bit more advanced - you'd need to throw in a couple of mosfets and a power supply. It was never really in the brief of my project though.

    • @SpeccyMan
      @SpeccyMan 8 років тому +1

      You would also need to add a delay between the end of charging and the commencement of the discharge cycle to allow the battery to cool (perhaps adding in a temperature sensor?)

    • @jamiecole7032
      @jamiecole7032 8 років тому

      Nick B depends on what current your putting into the battery, they dont usually get hot or even warm unless they have gone bad. :D but the temp would be a good safety feture for the bad cells

    • @SpeccyMan
      @SpeccyMan 8 років тому

      Maybe not the Li-Ion chemistry but the Li-Po certainly do get warm, especially under high discharge currents (such as those found on multirotors.) Li-Ion do appear to be a little more forgiving.

  • @davidmonheit
    @davidmonheit 8 років тому

    Hi. Firstly, thank you for a great project. I am setting one up with an Arduino Uno. I am using a 10W1Ohm shunt and a 10W6.8Ohm cement load (that is what I had!). I am also changing the display to a 1620A (which is what I have). I calculate a current of 538mA. 10W is plenty. I assume that my test will take longer to run as the current drain is lower. I have also modified the code to suit and I am puzzled by the 4.71 voltRef variable. When I measure my arduino 5v pin I get exactly 5v. Is there a reason why you used 4.71? Many thanks again, David

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +1

      +dmon123 Hi David. That's right the lower the current drawn the longer it will take - you'll also probably see the highest capacity. Discharging some poor cells quickly will really show how poor the cell really is.
      The reference voltage is what you suggest. What actual voltage is your Arduino using. So measure the voltage between the REF pin and ground. If you use USB to power the Arduino this will depend on the USB adapted you are using - so theoretically for best results you should check each adaptor. If you use the onboard 5v regulator to power the project it should be more constant once you've found its initial voltage. Without that variable being fairly precise the results could be a fair way off.

  • @williangomesarruda2972
    @williangomesarruda2972 8 років тому +1

    +Adam Welch thank you from Brazil ;)

  • @pinobo1997
    @pinobo1997 4 роки тому

    Nice video. I have some questions. What is the purpose of the shunt resistor? We already have a voltage drop on the resistor load to calculate the current... so the shunt seems unnecessary. In this way we could also read a single voltage (the positive terminal of the battery) as the other end of the load will be at ground (so clearly 0V). Am I wrong?
    Thanks

    • @AdamWelchUK
      @AdamWelchUK  4 роки тому +1

      You’re right - it’s not really necessary. The idea of a shunt and load resistor in the deign was simply so the load could be changed. Changing the load resistor would change the rate at which the cel was being discharged, and no code changes would be required.

    • @pinobo1997
      @pinobo1997 4 роки тому

      @@AdamWelchUK many thanks, now it's clearer

  • @bubblelaber4909
    @bubblelaber4909 7 років тому

    thanks . really appreciate it

  • @steve0steel
    @steve0steel 8 років тому +1

    Great project! But in order to improve the accuracy you could measure the voltage drop across the whole load, especially when you are using a resistor anyway :)

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +2

      +steve0steel Thanks for the comments. I guess you're right, but I wanted to be able to change the 'load' whenever I wanted without having to change the code. Using a fixed shunt resister value meant I could pop in any other suitable load and vary the current draw easily. Using your method is need to change the code or add in a menu to be able to dial up the right resistance.
      If you watch my second video on this you'll find I was quite please LS with the accuracy to say I threw this together with bits I found at the bottom of my components box.
      Thanks again for your suggestion and kid words.

    • @steve0steel
      @steve0steel 8 років тому +1

      +Adam Welch Wow, it's nice to actually get a response. You just gained a subscriber! I watched the second video and you're right, the possibility to swap loads is great :)
      Did you ever compare the measured current of the Arduino with the reading of a current-meter. It would be very interesting to see how accurate it is!

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +steve0steel Thanks again! Do you know I haven't done that. When I found good results compared to the commercial product I put that down as a win and counted myself lucky! Perhaps I'll do that one day.

  • @independentliving252
    @independentliving252 7 років тому

    Well, finally got the Ming He. That canoe came in. Just waiting for the TP's to show up and I'll show you what I was talking about.

  • @peterpiso7384
    @peterpiso7384 6 років тому

    Thanks for the information i am trying to figure out the way to go through 500+ 18560 batterys and i don’t want to be there for one hour per. Battery. ie just wanted to ask if you could do more than one battery at a time with Arduino nano ??
    Thanks

    • @AdamWelchUK
      @AdamWelchUK  6 років тому

      +The Siren Hello. I haven’t expanded this beyond what you’ve seen but others have... github.com/shmick/18650-liion-capacity-checker this version of my idea can check four cells at once.

    • @peterpiso7384
      @peterpiso7384 6 років тому

      Adam Welch thank you for your help much appreciated thanks again

  • @allsop168
    @allsop168 3 роки тому

    Can I use your project to test AA/AAA alkaline, NiMH batteries?

  • @SplashT
    @SplashT 7 років тому

    can it measure resistance of accu?

  • @gedtoon6451
    @gedtoon6451 10 місяців тому

    Is the Nokia display not 3.3v compatible? Are you OK driving it directly from a 5V Nano?

  • @txsraappraiser
    @txsraappraiser 8 років тому

    can you make a 10s bms for 18650's?

  • @chris9h1bw
    @chris9h1bw 6 років тому

    Dear Adam,
    I built the battery capacity kit and when I came to compile the sketch I am getting this error "error compiling for board Arduino Nano".
    In the ino file I downloaded the Lcd5110_Graph.h and it is in the library .
    Can you, please help me in solving this problem.
    Regards
    Chris

  • @bangkokhomes
    @bangkokhomes 7 років тому

    Another good video Adam
    mikebkk

  • @iforce2d
    @iforce2d 4 роки тому

    Did you check these values against a proper meter? Hardly seems realistic that the current is jumping from 0.76A to 0.63A and back within a few seconds, with just a battery discharging into resistors. That's almost a 20% error in current measurement, although I guess in the long run it might average out to about the right result.

  • @joshua_337
    @joshua_337 4 роки тому

    could this be adapted to use a raspberry pi 4?

  • @maicod
    @maicod 8 років тому

    a big thumbs up ! one question: why is the 10watt Resistor so large ?

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Maico Thank you. To dissipate 10 watts of heat!

    • @maicod
      @maicod 8 років тому +1

      ***** Ah Right ! I've so far used only 1/4 watt resistors so I thought : WHAT a large one :)

  • @Patrick-rj8gh
    @Patrick-rj8gh 7 років тому +2

    Just wondering if measuring the voltage drop across the 10 Ohm resistor gives an underestimate? what about the voltage drop across the mosfet? Would it be better to use a 16 bit voltage sensor like the ADS1115 directly across the terminals of the 18650. You could use a Hall effect sensor to measure the current which might be more accurate?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      The drop across the mosfet should be tiny - it is a logic level mosfet so should be fully on at 5 volts. Obviously the voltage at the source pin would be 0 volts, so you wouldn't even need to connect a wire here - and I guess my argument that the drop across the mosfet is tiny means I could have not bothered with the second voltage reading!
      This project was built in a day using bits I had lying around. There are much better ways of doing this. Using an ADS1115 and hall effect sensor are definitely ways to improve the accuracy. Adding extra channels so you can discharge more cells at once is another. Using the mosfet as the resister and adjusting it for constant load (or adding in different modes) for example.
      They are all good enhancements and one day I might do this again and build some of those features in but it wasn't possible on the day when the idea popped into my head.
      The best part about this project for me was that it was very basic and easy to understand, and that means that people like yourself are thinking about better ways to do it and ways to improve it. Cheers

    • @Patrick-rj8gh
      @Patrick-rj8gh 7 років тому

      Thanks Adam. I like you videos by the way. Its good to get inspiration for my own projects. Speaking of which, I’d like to build myself a good quality data logging charge controller for the 18650 that’s capable of PWM constant current constant voltage charging. I was inspired by the solar PWM charge controller, you know the one you reviewed/built with the mosfet & charge pump. One of the questions I ask myself is can you drive say 14 volts into an 18650 using PWM? Even if the PWM has a time averaged voltage which is spot on 4.2 V, the battery sees the full 14V for 5 ms every now and then (160ms). I guess a battery is a gigantic capacitor but lithium ion is picky about voltage and gets damaged easily. What to you think?

    • @ABID5
      @ABID5 5 років тому

      So to avoid any mosfet complexity, i used a relay module to switch the load on.

    • @TheAshish60
      @TheAshish60 5 років тому +1

      lmao thug life :v i should do that too

    • @BeetleJuice1980
      @BeetleJuice1980 5 років тому

      @TorrNet I have the same question too

  • @alanfalck1184
    @alanfalck1184 7 років тому

    Hi thanks for a great project. I'm keen to modify your design to test an eBike battery pack (48v) 10Ahr I will use 4 x 12v 50w Halogen bulbs in series as the load. Could you suggest how I could modify your design to cope with the higher 200w load (more FETS in Parallel ?) and to scale readings between 40 and 30volts ? Ultimately I want to plot a discharge curve in Excel Alan

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      Hi Alan, a few things to consider - you'll need voltage dividers on the analog inputs to protect the arduino from the 48 volts. You'll need a big shunt resister capable of carrying the load and yes, either multiple mosfets in parallel or one mosfet capable of carrying 200w. Once you've made the hardware beefy enough changing the code to account for the voltage dividers and higher cut off voltages shouldn't be too difficult. Sounds like a fun project!

    • @alanfalck1184
      @alanfalck1184 7 років тому +1

      Thanks i'll let you know how I get on

  • @richardpatterson7103
    @richardpatterson7103 7 років тому

    I am having the worst time getting the code right. in copying it something is off and I've spent 2 hours going over errors. would you happen to have a file of the code anywhere online?

  • @EngineeringNibbles
    @EngineeringNibbles 8 років тому

    Hi,
    could you recommend some transistors to switch the circuit ?
    I can't seem to find ~5Vgs 2 or 3a transistors to work with the arduino and the one you use seems to be expensive when bought in large quatities

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +BillTheBox I've been buying IRF3205s in packs of ten from China eBay sellers for about £1.50 which is about 2USDs I think. If you're looking for cheaper than that then I don't really have any recommendations because I haven't tested them. Any N-Channel logic level mosfet able to handle at least 2 amps and 5 volts will be absolutely fine. You can use a fet which is able to carry more current - the IRF3205 is good for 55 volts and 110 amps!

    • @EngineeringNibbles
      @EngineeringNibbles 8 років тому +1

      ***** Many thanks !
      I ordered two different types : IRF3205 and IRF540N

  • @fistfull95
    @fistfull95 6 років тому

    Thank you for the video. I have built this, but I can't get it to work... I have used the design where you use the 6.8Ohm resistor as a load, and soldered the load directly to the perfboard. The rest is exactly the same. I noticed that my shunt resistor is reading around 1.3Ohm, instead of 1.0Ohm, I have altered the code with the new value but still nothing. It doesn't start discharging. I Serial.print'ed the battVolt value, but it is always reading between 0.7 and 2.0. So there is the problem I think. I have checked the wiring all day long today, but I can't find anything wrong.

    • @AdamWelchUK
      @AdamWelchUK  6 років тому +1

      Perhaps you should check continuity across the mosfet when the mosfet gate pin is high?

    • @fistfull95
      @fistfull95 6 років тому

      Adam Welch I figured it out, I was missing the common ground (found it in the comments, I am horrible at reading schematics, but apparently even worse at listening haha) the device works now, except for the screen. It never updates the screen, but I see that the battery is draining as Serial is reporting, and the load resistor is getting warm.

  • @christopherjump236
    @christopherjump236 6 років тому

    would a larger Wattage power resistor (eg 50w) be suitable? As long as it is still 4.7ohms?

    • @AdamWelchUK
      @AdamWelchUK  6 років тому

      Yes larger power is fine. It doesn’t have to be 4.7 ohms, you can swap it out for different values if you like for different discharge rates. Just fo the maths to ensure it’s suitable.

  • @daikiryoku
    @daikiryoku 7 років тому +1

    Sorry for the newbie question, but what is the mosfet doing in this circuit?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +1

      +Simon Inga Its simply switching off the load when it reaches the cut off voltage.

  • @HiJoeZi
    @HiJoeZi 8 років тому

    Is a moset necessary? Will a simple BJT transistor do the job also?

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +HiJoeZi Probably yes depending on the transistor - you'll need to research a suitable one. Remember to protect the Arduino with a resistor.

  • @glauciogv5225
    @glauciogv5225 4 роки тому

    Hi Adam, nice video. I had experienced some problems accessing the Code/Sketch link. Are the link still ok ? Thanks in advance

    • @AdamWelchUK
      @AdamWelchUK  4 роки тому +1

      Sorry about that. I’ve changed web host and the way I’m doing everything over the last couple of days and I hadn’t yet updated this link. Should be working again now.

  • @OntarioMiner
    @OntarioMiner 8 років тому

    Hello Adam, Great capacity testing unit. I'm currently building a copy of yours. Do I have to use the Nokia 5110 84 x 48 LCD screen with the Arduino nano or could I use a different size. I dont know anything about the programming of the arduino or if the screen size has to match your code. Is it possible to use another screen without changing your setup?
    Cheers
    Eric

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      If you're changing the screen you'll need to change quite a bit of the code. You'll need to change the library at the top for one suitable for your replacement. You'll need to change every line of the code which instructs the Arduino to write or clear the screen too. You'll have to think about the spacing around what ever screen you opt for too.
      It sound like a big job, but it's a great way to get to grips with the code. If you don't fancy doing that, the Nokia 5110 screen module is only about 2USD.
      You can swap out the Nano for a Uno without any issue.

    • @OntarioMiner
      @OntarioMiner 8 років тому +1

      I'm going to stick with the original screen. Cheers

  • @Chickey
    @Chickey 8 років тому

    Crackikng video, i'm going to do some testing with my usb doctor. Scary how low the capacity is of some of the cheap cells from ebay.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Colin Hickey Thanks for the kind comments - let me know how you get on. Did you see my charger doctor outtake?
      I've reclaimed a few samsung batteries from a laptop battery in the last few days - I think a few of them should hold a reasonable amount.

  • @alexcociug9779
    @alexcociug9779 8 років тому +1

    Nice project!
    Do you think it could be possibly to check the capacity of toyota prius battery module ? it works between 8v-to 6volts

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Alex Cociug I guess you could adapt it for that. You'd need to put a voltage divider on the analog inputs and adjust the code accordingly, but otherwise you should be ok.

    • @alexcociug9779
      @alexcociug9779 8 років тому

      Thank you very much for fast response! CAn you please recomend a certain model?
      Thank you!

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Alex Cociug I was thinking you might just use a couple of resistors but I guess you could use a couple of pre-made modules like these - rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&pub=5575189419&toolid=10001&campid=5337903455&customid=Voltage+Divider&icep_item=201616845898&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg
      You'll lose a bit resolution because those modules are designed to measure up to 25 volts, but they'll probably see you right. How much capacity do the prius battery modules hold - it might take a while to get their capacity (assuming they're high) at the 500-1000ma discharge I used in this project.

    • @alexcociug9779
      @alexcociug9779 8 років тому

      A good prius module have 6.5Ah. What is maximum discharge rate which i could use in this project in order to save some time?
      Thank you!

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Alex Cociug Using the same shunt and load resistors the maximum discharge would be a little over 1 amp. The resistors are only 10 watt. 8 volts * ~1.2amp is roughly 10 watts. At that rate it could take six hours to discharge a good cell.
      You could use higher wattage resistors and increase your discharge rate - just keep an eye on that equation; P=IV

  • @PesonaFisika
    @PesonaFisika 6 років тому

    why use 2 loads, I mean 2 resistors.
    for reading the voltage can't we just directly reading the raw voltage from the battery? I mean, placing the analog reading directly to the battery terminal without using a voltage divider? and just use one resistor as a load?
    or am i missing something?

    • @BeetleJuice1980
      @BeetleJuice1980 5 років тому +1

      He is using two loads to be able to measure the current with one and the second to be able to change it for different amps. You can do it with one but you can't change the load

  • @user-grean2000
    @user-grean2000 3 роки тому

    Good afternoon! Link doesn't work where can i download code / sketch?

  • @eumesmo-kd1tr
    @eumesmo-kd1tr 7 років тому +1

    good work excellent

  • @davidkinuthia1052
    @davidkinuthia1052 3 роки тому +1

    hallo sir i have made this project im stuck at the code its giving me this error where could i be going wrong
    exit status 1
    stray( \342*)
    digitalWrite(gatePin, HIGH);
    millisPassed = millis() - previousMillis;
    current = (battVolt - shuntVolt) / shuntRes;
    mAh = mAh + (current * 1000.0) * (millisPassed / 3600000.0);
    previousMillis = millis();

  • @leckyputeh199
    @leckyputeh199 7 років тому +1

    can I ask you one question?
    Can I use SCR for the switching instead of MOSFET?
    I need to use SCR for my project.
    Hope you reply this soon.
    Love your channel!

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      +AshraF AzmaN I don't know much at all about SCRs. They are current driven I believe so as long as yours can be switched with less than 40mA's (the limit of an arduino pin) then I'm guessing it could be used. Thanks for the kind comments

    • @leckyputeh199
      @leckyputeh199 7 років тому

      ***** i mean about the cheap mppt from the previous video, can i change the MOSFET with SCR? I'm afraid the battery will be explode

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      +AshraF AzmaN Can you comment on the video you mean?

    • @leckyputeh199
      @leckyputeh199 7 років тому

      Sir, can you help me make a simple solar battery charger for lithium ion batteries without display? Thanks in advance.

  • @tommyallehamn9543
    @tommyallehamn9543 7 років тому +1

    +Adam Welch Nice job man, but the big issue is, why u didn't add the value of the load res to the shunt res in the code? in other words, u put shunt res to calculate the current in the circuit, but u ignored the load res which effects on the current! isn't right?
    BIG THX

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +1

      +Tom Tommy Hi Tom. No the code is right. The voltage drop across the shunt resistor is proportional to the current flowing through the entire circuit. Try a couple of different loads and run though the maths. I=V/R - You'll find it works!

    • @tommyallehamn9543
      @tommyallehamn9543 7 років тому

      +Adam Welch Big thx for the fast reply. I agree with u and I think it's more logical to do that, I though like this, as long as the current is constant on sequence, we consider that the same current value or the amperage flows through every part in the circuit (shunt res, load res ....etc) and that's why i'm so surprised! adding just the shunt res to the code gave me good results, but, in theory, I felt that I made a mistake!

    • @tommyallehamn9543
      @tommyallehamn9543 7 років тому

      and something else, to be sure, I tried just an 1 ohm shunt res, without any load res or any additions.... and it gave a nice results also :)

  • @tbyers31
    @tbyers31 8 років тому

    I'm relatively new to electronics so pardon if this question is off. Are you measuring the voltage drop across just the resistor or across both the resistor and the load? And does it matter? I enjoyed this video very much.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Tim Byers Shh - don't tell but I'm fairly new to electronics too!
      The voltage drop across the shunt resistor is proportional to the current flowing around the whole circuit. So in my application here where V=IR and as my shunt resistor is a 1 Ohm resistor V=I. However we're looking at the voltage drop, so Vin-Vout=I. In reality most current shunts are much lower values, in the order of 50-100 milliOhms. However I was using what I had lying around for this project and measuring such small voltage differences might have been more difficult for the arduino.
      Thanks for your kind comments and I hope that answers your question.

    • @tbyers31
      @tbyers31 8 років тому

      +Adam Welch Adam, your answer is helpful and I appreciate it. I tried a setup with a 1 ohm shunt resistor and a 1 ohm load and while it works, that taxes the cells and I could only get about 1.5 amp out of them with the voltage dropping very quickly (sometimes just a single measurement). A second test with 2 x 2.2 ohm resistors (and changing the shunt reference in the sketch) got things down to a reasonable .75 amp draw. Thanks again for your video.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +Tim Byers Thanks. I did some maths in this video to show the level of current draw from different loads. A 2 ohm total load would draw about 2 amps - I=V/R, 4.2/2=2.1 dropping to 3.0/2=1.5 amps near termination. It's probably quite high for cheap cells or cells that have had a hard life.
      Glad you got it working for your needs.

  • @markbisch630
    @markbisch630 7 років тому +1

    Hey Adam, I have an uno I would like to use do you think your code will work on that? Also what would you assume the accuracy of this tester would be?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому

      +Mark Bischetsrieder the accuracy is all around the accuracy of the shunt resistor and your measurement of the Vcc voltage. It can be quite accurate.
      An uno will work fine - others have used an uno without an issue.

    • @markbisch630
      @markbisch630 7 років тому

      Awesome thank you for the quick reply! Just picked up an lcd and some resistors at a local shop today. Funny the project im working on has started at least 3 other projects in the process.

  • @willianeletrick
    @willianeletrick 7 років тому +1

    Good evening, could I have the Schematic of the circuit please ?

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +1

      I've (finally) added a schematic to my website - admw.uk/iA

  • @siux94
    @siux94 8 років тому

    Correct me if I am wrong, but we don't need to use display, arduino can output results to PC via serial?

    • @AdamWelchUK
      @AdamWelchUK  8 років тому

      +siux94 Absolutely. You're 100% correct.

    • @Mr_ASIC
      @Mr_ASIC 8 років тому

      lool your are running away from lcd interface overhead :) that's cheating pro , Just kidding :)

  • @andreasyufrizal73
    @andreasyufrizal73 8 років тому

    I will try

  • @BeetleJuice1980
    @BeetleJuice1980 5 років тому

    Anyone can explain to me why we need two large resistors and not one as a load and we measure the voltage across that one only with two resistors?

    • @BeetleJuice1980
      @BeetleJuice1980 5 років тому

      Read all comments (yes all) and found the answer. Since I studied this circuit and all others your viewers made I belive its time for version 2 With all the upgrades people noticed.
      Great work sir thank you

  • @tm-uz7md
    @tm-uz7md 8 років тому

    Two thoughts. The termination voltage of the discharge cycle should be measured at rest, not under load. On my quadcopter the 18650GA Li Ions run at 3 amps. The manufacturer's continuous rating is 10 amps. I land when the voltage (under load) gets down to 2.5V. After landing the voltage immediately bounces back to a resting voltage of 3 to 3.15V. My battery utilization is typically 90% or thereabouts. Second, the industry standard is to rate the batteries under 200ma load. Hence the 5000maH rating label, vs the much lower results you obtained, around 1000maH.

    • @AdamWelchUK
      @AdamWelchUK  8 років тому +1

      +tm22721 Thanks for your input.
      The information I've read suggests that once a li-ion battery reaches 3volts under load it's pretty much done. A voltage rise off load is superficial and testing the battery again won't reap much more energy. I've tested this with this tester, a LiitoKala charger and my iMac b6 clone. You'll get a small increase - but not much at all.
      I've never seen an industry standard of 200mA - have you a source? I stuck with 500mA because that's what the commercial product I bought also used.
      I guess the best thing about this project is that you're welcome to replace the load resistor for something you're happier with, and you could update the code for your needs - release the load every ten seconds and read the voltage and reapply the load or not based on that reading.
      I hope you're able to test it and adjust it for your needs. Thanks again for the input.

  • @Arek_R.
    @Arek_R. 7 років тому

    Manufacturers show maximum discharge rate of cells like that eg.:"10C"
    Which means 10 x capacity in Ah.
    So for calculations there is used "C" not "Q"

    • @AdamWelchUK
      @AdamWelchUK  7 років тому +3

      "Q" refers to the coulomb and the unit of charge. It is the recognized symbol for charge ( admw.uk/jf ).
      I think you're looking at something different to me. 10C refers to the discharge (or charge) rate - so if you have a 2000mAh battery you might charge it at 1C (2 amps) or discharge it at 10C (20 Amps). It doesn't to my knowledge explain the capacity of the cell. However it can effect the capacity because discharging at 1C or 10C will probably give you different capacity values - and that's why I left the load resistor interchangeable and did all the calculations on the shunt resistor. It gives the user the opportunity to test their cells at different discharge rates. Some batteries are designed to be high drain, others aren't.