Electronics > Projects, Designs, and Technical Stuff
Battery Tester
(1/3) > >>
ColdKeyboard:
Hey everyone, I'm working on a project where I would like to build a piece of a "equipment" that I can use to test Lithium Ion/LiPo batteries.
Testing would be basically loading the battery with constant current (maybe vary it over time) and log how does the battery voltage change over time.
Also as an auxiliary feature, it could be used to test battery charging circuits (use the constant current to act as a load on USB battery charger).
And the third feature would be a built in battery charger, so you can discharge the battery through the board, then charge it and log the curves.

Components that I have in mind are; 2.048V voltage reference, 12bit DAC, MCU with 12bit ADC and Op amp + passives and mosfets.
Here is the list of components I'm thinking about using (have them laying around):

* STM32F103
* MCP1501T-20E 2.048V voltage reference
* MCP4726A1T 12bit DAC
* TLV4376I Quad op amp
* (?) N-MOSFET for load
* (?) Battery charger
* (?) Sense resistor(s)
What I have in mind for now is to have a micro (currently thinking about STM32F103) that would control a DAC to set the voltage on the input of the
op amp that is driving the N-MOSFET (load). DAC would have external vref from 2.048V FVR IC to improve it's accuracy. Microcontroller will also use it's 12bit SAR ADC
to measure battery voltage (through voltage-divider + op-amp as buffer) as well as to measure voltage on sense resistor (load) plus voltage on second sense resistor (battery charger).

Idea is to have MCU hooked up to your PC (or maybe chose a preset through PC) and control what is the load current, maybe even vary it over time to emulate more realistic load and log
what is the battery voltage, current drawn. When the battery gets depleted, MCU will kick off a charging cycle where we measure charge current and battery voltage.
This would be initially fed back to PC over UART but maybe I could even add a SD card so it gets logged. Also RTC can be leveraged to offer timestamps for various events.

Now this is something that I'm designing for myself, since often I have a need for a device like this that I can tune through PC (set profile) or change few passives to modify the operating range.
I would really love to hear your opinion on; would this be useful to anyone else other than me, what other features of this device would be nice additions and etc.
Also if you have suggestions/examples for parts of the circuit (constant current load, conditioning sense resistor voltage reading for ADC, and so on)

Thanks in advance! :)
ColdKeyboard:
Okay, maybe it would be easier if I asked one thing at a time...  :)

If I wanted to do A-2-D conversion of voltage across a sense resistor, would MCU's ADC be good enough choice or should I go for
stand alone ADC to have better accuracy, signal to noise ratio and etc.?

Currents that I plan to measure are from few uA up to 300-500mA (at max), so what value of Rsesne would you recommend and what configuration of op-amps
and ADC would give best results?
thm_w:

--- Quote from: ColdKeyboard on November 21, 2018, 04:47:50 am ---Currents that I plan to measure are from few uA up to 300-500mA (at max), so what value of Rsesne would you recommend and what configuration of op-amps
and ADC would give best results?

--- End quote ---

2uA to 500mA, that is one in 250,000. The STM32 12-bit ADC would only be capable of 4,096 steps of resolution.
So either need to change your spec to have less resolution, have different shunts/current ranges, or use an external 18-bit+ ADC. Some of the microchip ADCs are nice, but slow sample rates.

Personally I am using "LiitoKala lii-500" type charger to determine capacity of 18650 cells. But it offers no PC control or any advanced features you suggest.

ideas:
https://www.eevblog.com/forum/repair/part-identification-150w-constant-current-electronic-load-60v-10a/
https://www.eevblog.com/forum/projects/diy-electronic-load-project-thread-d/
https://hackaday.io/project/1912-smart-battery-tester
https://hackaday.io/project/162343-variable-load-for-constant-currentpower-discharge
ColdKeyboard:
Wow, that's really exhaustive review or LiitoKala. Awesome job!

So if I wanted to measure these ranges, would dynamically switching the sense resistor work?

For example if I have three sense resistors in series, 1K, 100R and 1R, I could short 1K and 100R if I'm measuring higher currents
and use 1K for low current and so on. Would this work? Does anyone have a suggestion on how to build the circuit so that the switch's
resistance doesn't affect the reading too much?

Also would there be any significant benefit from using a dedicated ADC vs. using the one that is built in the MCU?
Which one would give me the best accuracy?
spec:
Hi ColdKeyboard,

What fun- can you build two and let me have one. :)

Just been looking at your requirement and would like to ask a few questions:

* Will you want to fit just one LiIon/LiPo battery at a time?
* How do these full scale ranges, for charging and discharging, grab you: 100uA, 1mA, 10mA,100mA, 1A? Taking the 1A range as an example, a 12 bit ADC would have a resolution of 200uA.
* Just to clarify, would you be happy sourcing and programming a 3V6 MCU with a 12 bit ADC?.
* Can I assume an ADC input range of 0V to 3V6?
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod