High precision battery cycler - Page 1
Forum section: electronics / projects

author: jbb
author_rank: Super Contributor
timestamp: December 01, 2019, 07:49:13 pm
content: Hi allI'm thinking about a new project: a precision battery cycler for battery testing.Background:For many applications, a hobby LiPo charger (we've done OK with iCharger products) is good enough - you can measure the capacity and get some rough discharge voltage curves out. And balance the cells in a pack.But,the voltage and current measurements are often not very accurate and I find that for cycle life testing there's quite a bit of noise on the measured capacity from cycle to cycle. This means you might have to run 500 cycles to build up a good trend, which takes ages (could be 5-6 months!).If you're trying to answer questions like:"If I reduce the end of charge voltage by 0.1V, I know the capacity per cycle will go down, buthow many more cycleswill I get out of it?""What if I keep the charge voltage the same but change the end of charge current cutoff?""What if I use this special lead resistance compensation feature to reduce the time spent in Constant Current charging?""What impact does storage temperature have on battery ageing?"and you're doing 500 cycles of each option, this can turn into many thousands of hours of testing.A research team at Dalhousie university published some papers onprecisionCoulombetry, where they used super accurate equipment (I think 100ppm grade) to research battery behaviour, and found that meaningful trends become clear after just a few cycles. This could turn a months-long experimental campaign with a crapload of batteries on test (running experiments in parallel) into a weeks-long experimental campaign (followed by a months-long validation test on just a couple of conditions).What do I propose:To be honest, I also want to have a go at designing some precision electronics; I'm sure there's a lot to learn.I'd like to design my own open source precision cell cycler. Target accuracy for the first version would be 0.1% (1000ppm) or better; this falls into the space between a cheap hobby charger and a really expensive industrial grade battery test system. A second revision might be able to do much better (100ppm may be possible with care).Is anyone aware of other open source projects in this domain? Or an open-source temperature controlled chamber design?Here's what I'm thinking of:Single cell per channel (voltage range to suit LiIon, LiPo, LiFePO4, NiMH, Pd-H2SO4Around 3A current capacityKelvin (4 wire) connection to cellPt100 or Pt1000 precision cell temperature measurementProtection against mis-wiringDoesn't drain the cell if the mains power is offSwitch mode power stage based onAD8452control chipReferences set by 16b DACMonitoring with 24b ADCPossible accuracyon the order of 300ppm (but I'm sure I'll walk into a trap of some kind...)Microprocessor on module for calibration management and safety monitoring (not just cell V, I, T but also miswiring, broken wire etc.)And a wishlist for later revisions:Multiple channels to recycle discharge energy (and to get per-cell cost down)Temperature control of the analog stage (reference, AD8452 and possibly measurement shunts) to reduce major error sources (input offset drift and shunt resistor tempco)Temperature controlled chamber for the cells under testA higher-accuracy self-calibration unit (built into system)Provision to fit an ID chip to a cell for cell identification and cell parameter storageAny thoughts?

author: fcb
author_rank: Super Contributor
timestamp: December 02, 2019, 01:22:02 am
content: I built something like this at the beginning of this year. Didn't know about that AD8452 though.Mine (named the 'QBA' for quad battery analyser) was built using a dsPIC for four channels of PWM, 4 relays (to disconnect the cells when power off, etc..) some DG409's (differential sampling cell voltage, current shunt and temperature sensor per cell) and 24 bit ADC and precision reference. We did 4 terminal measurement on the cells as well, the whole thing had a 50way IDC on it, as well as USB and 2.1x5.5mm barrel jack socket for power.It works on a 12VDC bus with what is effectivly a giant zener clamp (MOSFET, heatsink, fan, opamp, etc..) set to start at about 12.5V, the idea being that if you needed to discharge more than charge the bus voltage would rise to 12.5V and then any excess disappated as heat. Typically you would set two cells discharging and two cells charging at the same time and it would be pretty efficient.I didn't take it any further than a prototype, as it worked well enough to give me the data I needed.Good luck with your project - that AD8452 sure looks interesting.

author: jbb
author_rank: Super Contributor
timestamp: December 02, 2019, 03:57:46 am
content: Yes, that all sounds quite similar. Were you happy with how it turned out?Any words of advice?The AD8452 is an interesting chip. It integrates a lot of the precision analog stuff off the bat.But it’s quite expensive, so I’d really like to know how challenging it was to manage the PWM control loops with the dsPIC. Did you need to do high bandwidth current loop control, or could you do relatively slow control updates with the 24b ADC only?

author: jbb
author_rank: Super Contributor
timestamp: December 05, 2019, 09:59:57 pm
content: I’ve been thinking (a dangerous activity!) about the differences between an AD8452 (all analog control) and a digital control system.Digital control is tempting, but the nitty gritty details of finite ADC and PWM resolution can cause strange responses and limit cycle oscillations. (Note, TI Piccolo devices offer High Resolution PWM down to about 300 picoseconds, so around 14b resolution at 250kHz).I don’t know what will work better, so I’m actually thinking aboutAnalog control implications:+ don’t need fast software and fancy microcontroller+ quite integrated- need precision DACs for settings- need loop filter components- current sense amp isn’t the very bestDigital control implications:+ flexible control loop design- fast real time firmware required- big microcontroller required+ no precision DACs+ get to choose excellent sense amps- need external sense amps+ can use DC bus voltage feedforward to reduce interactions between channels as they change stateFor digital control, I’m thinking 50mOhm shunt, ADA4254 instrumentation amp (could do 1 for Voltage and 1 for current, or use 2), ADS128A04 (24b 128kS/s 4 channel) ADC, 4.096V reference.

author: jbb
author_rank: Super Contributor
timestamp: November 09, 2020, 11:27:37 pm
content: Well, approximately a year later I’ve finally got the energy to come back to this.I don’t have a lot of free time these days, so I’m going to have a crack at the AD8452 solution.Some system parameters:* 2.0 - 4.2V cell voltage* 0.1 - 3A cell current* AD8452* 2.5V system ref* Hence need 10mOhm shunt, I’m thinking Susumu KRL3216T4A-M-R010. Has anyone got any comments on these?* AD7124 ADC* 12V main DC railFor an initial evaluation, I’m putting together a basic board with the analog & power electronics, ADC, DAC and an ATmega32 controller (look, they’re not a great chip but I’ve got some lying around already).The ADC would like a 614.4kHz clock, which happens to be a fraction of 7.432MHz (a standard ‘UART’ crystal).I’m need to synchronise the PWM to some fraction of that so that PWM switching noise doesn’t alias down to DC. The expected duty cycle is around 25% to 33%, so I want a division ratio of 1/4 to 1/3 as this will place the harmonic nulls near the ADC frequency. A ratio of 1/3 makes me a bit nervous, so I’m thinking 1/4, or 153.6kHz (ie one quarter). Does anyone have experience with this sort of ratio trick?

author: David Hess
author_rank: Super Contributor
timestamp: November 10, 2020, 03:28:13 pm
content: Quote from: jbb on December 01, 2019, 07:49:13 pmI have considered doing the same thing but for different reasons.QuoteAlso do not forget that the large charging and discharging currents create common mode errors in other parts of the circuit.QuotePhysical attachment to the battery is important also. Some designs use a metal clamp.QuoteBe careful that switching noise does not corrupt measurements.QuoteIt is more important to know what values are set than to accurately set them.QuoteConsidering other error sources which cannot be controlled, 24-bit resolution and microvolt accuracy are not needed. 16-bit resolution over 3 volts is 45 microvolts and 20-bit resolution is 2 microvolts.Handling of noise is a major concern, especially with switching power, so a delta-sigma instrumentation converter may be best which is just as well since they are inexpensive.

author: jbb
author_rank: Super Contributor
timestamp: November 10, 2020, 11:37:23 pm
content: Thanks DavidYes, I too am concerned about switching noise and ground shifts. That’s why I’m cooking up a test board without all the trimmings. I’m going to start with a solid ground plane and try to control the return currents (AC and DC) by component placement and layout.I’m also concerned about thermal EMF in the shunt resistor. Do you know of any detailed resources on that? (Visha say “buy ourreallyexpensive resistors” and lay them out to minimise thermal gradient. This isn’t very helpful.)On ADC: yep, 24b is overkill at this point. But I do like the built in oversampling and digital filtering. And I’ll use spare channels to measure the RTD.On DAC: for the first rev I think I’ll go for a (much cheaper) 12b converter.

author: David Hess
author_rank: Super Contributor
timestamp: November 11, 2020, 03:40:52 am
content: Quote from: jbb on November 10, 2020, 11:37:23 pmA solid ground plane is exactly the wrong thing to use at microvolt resolution unless you are even more careful about high return currents. Single point ground layouts and differential signaling (Kelvin connections) or the equivalent are the way to go.QuoteThermal EMFs combine with the temperature coefficient of resistance to limit accuracy. One thing which can be done is to use a larger power current shunt than necessary to minimize self heating.In the forums we have discussed thermal EMFs in current shunts before. One solution is to chop the current shunt input with an h-bridge so it sees AC and the DC thermal EMF error can be rejected but this is not very practical. Still, I am sure someone has tried it at some time.The practical solution is to just measure the EMF error and accept it as a boundary to accuracy. If increased accuracy is desired, then a higher resistance shunt is used for a greater output voltage at the cost of greater error from self heating.QuoteI like that they can also reject 50 and 60 Hz noise.

author: fcb
author_rank: Super Contributor
timestamp: November 11, 2020, 08:29:25 am
content: We opted for a scanning approach to measuring current and voltages - generate the PWM's from the microcontroller. The PWM control loop doesn't need to run at high-speeds.

author: tszaboo
author_rank: Super Contributor
timestamp: November 11, 2020, 12:15:24 pm
content: The AD8452 is an excellent chip for this purpose, it is built for doing exactly this. I've tested the 8450 years ago, and it is great. Also, just one microcontroller could control many channels, so you end up with a more dense system. You dont need to measure with that high sample rate, and that is the point of this chip.But there are a few key points you need to keep in mind when using it:It has analogue control loop, that you need to design to your system. See page 28 of datasheet. This dependant of the battery and your switching circuit. Whatever works with a 18650 battery might oscillate with a LiPo or wouldn't work with other batteries. Also, it is a pain in the butt to size and tune correctly.Note that this is for industrial battery manufacturing, so a a company like Panasonic would design and tune their own board for one specific production line.KRL3216T4A-M-R010: It is small. A typical go-to solution for these shunts is Vihay-Dale, something like WSL3637R0100FEA. You will find similar resistors in testing equipment.Dont synchronize to switching noise, that is a never ending rabbit hole. Just measure at a frequency, that is way below the switching, maybe even below 50Hz, and filter it. All those measurements dont contain such useful information, because you end up throwing it away. Or maybe you do a lot of filtering and averaging, the same that you can do with an RC filter.Dont ignore the timing. If your clock is wrong, you end up with the same mAh errors, like when your current measurement s wrong.Also, TI has a current shunt monitor with built in shunt, that could be useful if you want digital control.

author: jbb
author_rank: Super Contributor
timestamp: November 13, 2020, 01:36:30 am
content: Good points on the loop stability, time base and resistor, thank you.It looks like loop stability will require some quality time (or at least linear time invariant time) with some analysis tools. I don’t want to be swapping loop compensation for every new cell!Time base will be a generic crystal to begin with.Thank you for suggesting a different resistor. While the tempco is a little higher, the total heating should be much lower and I’ll come out ahead on accuracy. Also it’s cheaper :-)