• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Lithium Battery Doctor 3D Printer File Image 1
Lithium Battery Doctor 3D Printer File Image 2
Lithium Battery Doctor 3D Printer File Image 3
Lithium Battery Doctor 3D Printer File Image 4
Lithium Battery Doctor 3D Printer File Image 5
Lithium Battery Doctor 3D Printer File Image 6
Lithium Battery Doctor 3D Printer File Image 7
Lithium Battery Doctor 3D Printer File Image 8
Lithium Battery Doctor 3D Printer File Image 9
Lithium Battery Doctor 3D Printer File Image 10
Lithium Battery Doctor 3D Printer File Image 11
Lithium Battery Doctor 3D Printer File Image 12
Lithium Battery Doctor 3D Printer File Image 13
Lithium Battery Doctor 3D Printer File Thumbnail 1
Lithium Battery Doctor 3D Printer File Thumbnail 2
Lithium Battery Doctor 3D Printer File Thumbnail 3
Lithium Battery Doctor 3D Printer File Thumbnail 4
Lithium Battery Doctor 3D Printer File Thumbnail 5
Lithium Battery Doctor 3D Printer File Thumbnail 6
Lithium Battery Doctor 3D Printer File Thumbnail 7
Lithium Battery Doctor 3D Printer File Thumbnail 8
Lithium Battery Doctor 3D Printer File Thumbnail 9
Lithium Battery Doctor 3D Printer File Thumbnail 10
Lithium Battery Doctor 3D Printer File Thumbnail 11
Lithium Battery Doctor 3D Printer File Thumbnail 12
Lithium Battery Doctor 3D Printer File Thumbnail 13

Lithium Battery Doctor

akosboda avatarakosboda

February 2, 2022

thingiverse-icon
DescriptionCommentsTags

Description

Li Ion battery Doctor

Features: Charge, discharge, amp hours counter, test for short or open circuit, weak battery indicator, measure internal resistance.
Charge : TP4056 module (modified), selectable 200 or 500 mA current. TP4056 circuit, monitored by Arduino.
Discharge : current 200 or 500mA, PWM controlled. Internal resistance is calculated from battery voltage drop under load.
Capacity : Battery gets fully charged, then discharged, amp hour at 200 or 500 mA load is counted.
Recovery : Deep discharged battery charged with 100mA current.

Parts : Arduino (mini, nano), LCD 1602, TP4056 module, 5V relay, TIP120 Darlington, LMV358, small parts.

Four switch selectable menus:

1.Test : The battery connector is biased to 2.3V. Open battery shows this value. Short circuit battery shows 0.1V or less. Weak battery : 3.2V minimum, current less than 100mA. Good battery shows at least 3.2V and 100 mA, the internal resistance is calculated from the voltage drop 0/200/500mA. Switch selects 200 or 500mA.

2.Charge : Relay connects TP4056 and battery. The battery will be charged by the 4056 chip's hardware, Arduino only monitors its status, the voltage and current (Switch selects 200 or 500mA). Relay can not be activated if the battery is reversed or very low.

3.Capacity: Battery will be fully charged by TP4056, then discharged by a PWM-LMV358-TIP120 circuit. Discharge current 200 or 500mA is switch selectable. Arduino accumulates the current every second, shows total mAh value.

4.Repair : Deep discharged batteries - below 2.6V - will be charged gently until they reach the minimal voltage to begin the normal charge process. The charge current is about 100mA, supplied by a PNP transistor current generator.

Main circuits (Dx , Ax refers to Arduino pin):

Charge : TP4056 module, resistor to pin 2 is replaced by 5K6 (200mA charge) and a switched 4K7 (500mA charge). Pin7 (red LED) pulses 200uS in standby mode, which is filtered by 10k/1uF and fed to D8. Pin6 (blue or green LED) is connected to D9. If the input of NMOS Q4 is positive enough, the relay can be activated by D10 and charge will begin.

Discharge : PWM D6 output is smoothed by 20k-10uF and a positive current 0-125uA is fed to +ve input of the opamp LMV358. Same time, 0-125uA negative current causes a feedback from the 0.05 ohm shunt resistor, sensing the discharge current. The opamp output drives the TIP120 current sink transistor, if this is enabled by D7.

Current sense : The 0.05 ohm shunt resistor's range (+ or - 25mV) senses + or - 500mA. The LMV358 opamp pin 3 is biased from the 1.1V Vref of the Arduino, the constant current from there raises the output pin 1 to 2.6V, which in turn corresponds to zero mA current on the 0.05 ohm shunt. The opamp's amplification A=74 results that the output swing covers the +-500mA range. You should check this - very much component tolerance dependant - zero value (uncomment Serial.println(mA) in measA(void)) and recalculate the subtracted value (32500). See code.

Recovery current generator : A3 output (low) pulls the base of Q1 down to 3.4V, so the PNP transistor will generate about 100mA positive current.

Arduino : 1.1V internal analog reference is used, so the A1(voltage) A2(current) inputs have voltage dividers. A0 senses the position of the 4-throw mode switch.

User program : code size 6k, no external libraries. I had to write very compact and strictly hardware dependant LCD driver code to reduce code size ( ~to fit in a 8K chip, see https://www.thingiverse.com/thing:5223844), the LiquidCrystal library was too big. However, if your chip size allows, you could use that too.

Construction : 3D printed case. I mounted the relay circuit on the TP4056 PCB. The TIP120, LMV358, PNP current generator circuit is on perfboard attached to a coolplate.

Ground loop issue: uV-s make the difference, it's very important to follow the "high" current paths, and never mix it with opamp input circuit or the A/D inputs. In practice, this means the Tip120 emitter, the 0.05 ohm and the wire from the - of the TP4056 module is the same central point for current ground. The opamp ground points are connected here too. A single wire runs from here to the Arduino board, used for signal and supply of the board. Keep the battery socket wires thick (0.5mm2) and short.

Probably must correct calculations in the program. measV(); play up-down with the 411 multiplier , measA(); play with 453 divider until your DVM and the Doctor shows nearly the same.

Update 6 Feb 22 : Adaptor for banana jack 2mm. The adaptor's purpose is to connect cables to any form of lithium battery. Use solderable screws tacks etc. for contacts. For 4mm banana socket drill the holes to 7mm.

3D files : version for rotary / slide switch SP4T, banana adaptor. Print with (full) support.

Note : Files are in disorder, reason is that Thingiverse does not let me upload PDF or ZIP what's more sometimes I can't edit at all - 404 error of my saved files! But everything is there, hope you guys find the way.

License:

Creative Commons - Attribution

Related Models

Flexing battery holders with integrated spring preview image

Flexing battery holders with integrated spring

enif profile image

enif

32,986

Gridfinity Battery Trays (AA, AAA, AAAA, 18650, CR123, CR2, 9V, 21700, C, D) preview image

Gridfinity Battery Trays (AA, AAA, AAAA, 18650, CR123, CR2, 9V, 21700, C, D)

Dalkain profile image

Dalkain

3,159

Targhetta chiavi parametrico preview image

Targhetta chiavi parametrico

Dr.Raptor profile image

Dr.Raptor

14

Venus de Milo preview image

Venus de Milo

CosmoWenman profile image

CosmoWenman

20,120

EDC Container Box Capsule + O Ring preview image

EDC Container Box Capsule + O Ring

Meister Edel profile image

Meister Edel

3,334

Slim Filament Clip for Bambu spools preview image

Slim Filament Clip for Bambu spools

3DTechBase profile image

3DTechBase

66

Beer Crate battery holder AA/AAA/9V/18650 Stackable preview image

Beer Crate battery holder AA/AAA/9V/18650 Stackable

Marzochi profile image

Marzochi

16,639

All-in-One Battery box preview image

All-in-One Battery box

Michal Fanta profile image

Michal Fanta

2,315