Code Monkey home page Code Monkey logo

arduino-cc-battery-tester's Introduction

arduino-cc-battery-tester

Constant current circuit to test 18650 batteries.

Introduction

18650 batteries need to be tested under load to know their capacity. It is possible to plot a discharge curve of the battery, but a constant current load gives you more useful data as you will be using the 18650 battery to draw a certain amount of current in your circuit anyway.

The circuit diagram can be seen in "BJT CC.sch". Basically, the op-amp and the transistor (a TIP120 is used here, but any power Darlington would work too) act as a constant-current load, keeping the current at 1 amp through the 1ohm power resistor.

The important part of the circuit is that it is controlled by an Arduino. The Arduino senses the battery voltage and switches off the transistor once it reaches a set cutoff point as an over-discharge protection. This is crucial since we are dealing with unprotected 18650 batteries.

Important variables

The most important variable is "const float currentSet", which sets the current in Amps. Set it to 1.0 to test your battery under 1A.

Usage

Set the variable currentSet and upload the code to your arduino. Then, connect the wires to your Arduino as shown in the schematic. You can monitor your Arduino from the serial monitor, or you can use a program like PLX-DAQ, which logs the serial monitor data to an Excel file.

When the battery is under load, the LED will turn on. After the battery is discharged, the battery cuts off and the LED will blink once a second, indicating that the discharge is done.

Here's how to calculate the capacity of the battery: Take the time in hours that the battery works under load, and multiply it by 1000 to get the capacity in mAh. This is the capacity of your battery under a 1A load.

LED indicator

1 blink every 5 seconds --> No battery connected

2 blinks every second, for 3 seconds, followed by 2 second delay --> Battery undercharged

3 blinks every second, for 3 seconds, followed by 2 second delay --> Battery overcharged

1 blink every second --> Battery finished discharging

LED fully on --> Battery under load.

Credits:

I was heavily inspired by GreatScott's video, and my circuit is almost identical to his. Check out his video here: https://www.youtube.com/watch?v=8uBcywBUTkw

arduino-cc-battery-tester's People

Contributors

thomastay avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.