Constant voltage source & sink for charging & discharging batteries - Page 1
Forum section: electronics / projects

author: jkrbasu
author_rank: Contributor
timestamp: February 17, 2018, 05:59:56 pm
content: Dear EEVbloggers-I'm attempting to build a simple circuit that will apply a constant voltage to a Lithium-Ion battery. If the applied voltage is greater than the battery, it should source current at a constant voltage, if the applied voltage is less than the battery, it should sink current at a constant voltage.The circuit I've tried so far is attached in the image(s) below. I like this circuit because it allows me to control the voltage applied just by dialing a pot. It works well for sourcing current (image 1), however, as soon as the applied voltage drops below that of the battery, it flattens out (image 2). That is to say, the circuit cannot sink current at constant voltage.I would like to build a circuit that can do both, as indicated by the cartoon graph in image 3. I would like to get behavior indicated by the dashed curve.Does anyone have any suggestions for this?Thanks!

author: IanB
author_rank: Super Contributor
timestamp: February 17, 2018, 06:10:57 pm
content: I'm not sure what your goal is here, but you may have a conceptual problem with your idea.First of all, when you connect a cell to a circuit, the cell voltage is equal to the applied voltage by definition. There is no "difference" between the cell voltage and the applied voltage. Considering this further, the cell is a voltage source, and you are attempting to have your circuit be a voltage source. Therefore you have two voltage sources fighting each other. It means you are attempting to "change" the voltage of the cell, which as a voltage source it is strongly opposed to doing. The only limits on the system here are the internal impedances of the cell and the circuit. Since the internal impedances of voltage sources are low, it means very large currents will potentially flow. The large currents could be several amps, even tens of amps.For this reason, charging and discharging circuits for lithium ion cells and other kinds of cell are nearly always constant current circuits, or current limited circuits.

author: jkrbasu
author_rank: Contributor
timestamp: February 17, 2018, 06:16:26 pm
content: Dear IanB-You're absolutely right. Applying voltages that are substantially different from the cell voltage would cause a huge spike in current. The goal is actually to first charge (or discharge) a battery at a constant current until a particular voltage limit is reached, and then hold at that voltage. I have accomplished the constant current part with two other circuits that I haven't included in this post. Once the battery has hit the voltage limit, the goal is to hold that voltage until the current decays to a particular value. That is the goal of the circuit I am trying to build here.In the case of a discharge, for example, we could think of discharging a battery from 3.7V to 3.2V at 50 mA constant current, then holding at 3.2V until the current decays from 50 mA to 10 mA, and then stop. The problem is that with the circuit as designed, I can't sink this current (50 mA down to 10 mA).

author: Peabody
author_rank: Super Contributor
timestamp: February 17, 2018, 06:25:57 pm
content: If you want to learn about this, that's fine, but the TP4056 does all this for you. Modules using it, and even having lipo protection circuits, are available dirt cheap - like $1 to $2. In any case, the datasheet for the TP4056 has a nice diagram showing the charging pattern you want to follow.Edit: Sorry, this is just the charging part. I skimmed too quickly, and missed the discharge part you're looking for.

author: jkrbasu
author_rank: Contributor
timestamp: February 17, 2018, 06:27:05 pm
content: Quote from: Peabody on February 17, 2018, 06:25:57 pmThanks! I'll take a look!

author: jkrbasu
author_rank: Contributor
timestamp: February 17, 2018, 06:30:05 pm
content: Quote from: Peabody on February 17, 2018, 06:25:57 pmDear Peabody-Correct me if I'm wrong- but it seems like the TP4056 is only for CC-CV charging and not CC-CV discharging of batteries?Thanks

author: jkrbasu
author_rank: Contributor
timestamp: February 17, 2018, 07:23:35 pm
content: Found a solution, turns out if you add a pnp transistor to make a half-bridge this circuit can be made bi-directional. (see attached image)Thanks everyone!

author: Peabody
author_rank: Super Contributor
timestamp: February 17, 2018, 09:40:52 pm
content: Quote from: jkrbasu on February 17, 2018, 06:30:05 pmYes, I had amended my post to apologize for missing the discharging part of your original post. Sorry.Quote from: jkrbasu on February 17, 2018, 07:23:35 pmCan you explain how it works? How does it shift from constant current to constant voltage?One thing you might want to try is connecting the pot wiper to the bottom of the pot, so that the divider would be just the top half of the pot vs the 10K fixed instead of the top half vs the sum of the bottom half and the fixed. Just might be easier to adjust. More linear.Anyway, congratulations. It's nice when things work out successfully.

author: jkrbasu
author_rank: Contributor
timestamp: February 18, 2018, 06:38:15 pm
content: Yup- the battery moves between constant current and constant voltage circuits using some EM relays. I prefer to use EM relays for this to be able to fully electrically isolate the battery when I'm not charging or discharging.Here's a link to the constant current sink circuit that I'm using, if you're curioushttps://forum.allaboutcircuits.com/threads/microamp-constant-current-sink.143479/#post-1214144Thanks for the suggestion on the wiper!

author: soubitos
author_rank: Frequent Contributor
timestamp: February 18, 2018, 07:06:07 pm
content: Wait.. isnt this short of what a BMS does in a multi-cell pack?

author: jkrbasu
author_rank: Contributor
timestamp: February 18, 2018, 07:10:09 pm
content: Yup, pretty much. But I'm not really building a BMS, just building an automated test environment for charging/discharging Lithium-Ion coin cells. I'm a chemist/materials scientist working on novel materials in Li-ion batteries and trying to understand how they impact capacity retention vs. number of cycles, charge/discharge rates, voltage limits, etc. etc. Battery testers (like Arbin, Maccor) are stupid expensive- I decided to make my own!

author: soubitos
author_rank: Frequent Contributor
timestamp: February 18, 2018, 07:30:09 pm
content: Then you need a "slightly" modified TP4056 charger or similar and a heavily modified 1s bms circuit with a loop function to charge and discharge the battery under test + keep track of the results... hmmmmmm

author: soubitos
author_rank: Frequent Contributor
timestamp: February 18, 2018, 07:37:05 pm
content: In order to charge and discharge batteries "manually" 4 at a time with capacity etc settings, i use BT-C3100http://bit.ly/2ognJ0Ywhich i got about a year ago and is relatively cheap and works well. If that is not good enough you need something more.. drastic

author: IanB
author_rank: Super Contributor
timestamp: February 18, 2018, 08:06:46 pm
content: Quote from: jkrbasu on February 18, 2018, 07:10:09 pmI think the formal way of doing this would be to use a programmable four quadrant power supply or source/measure unit connected to control software on a computer such as LabVIEW. This would allow you to set and vary voltage/current parameters, run cycles and record results.You can try to build your own system, but you will not achieve the level of reliability and stability provided by lab grade instruments, and it will cost you a lot of time to get there. If your core aim is to study battery chemistry then designing electronic instruments is going to be a distraction.

author: jkrbasu
author_rank: Contributor
timestamp: February 18, 2018, 08:59:11 pm
content: Quote from: soubitos on February 18, 2018, 07:37:05 pmSince I'm testing coin cells and need to get down to currents as low as 200 uA (and measure them highly accurately), these systems don't quite afford the level of control I need, unfortunately

author: jkrbasu
author_rank: Contributor
timestamp: February 18, 2018, 09:09:46 pm
content: Quote from: IanB on February 18, 2018, 08:06:46 pmA four quadrant power supply is not necessary for batteries- two quadrant is fine. There is no need for negative voltage. Supplies like the 6632B are often available on eBay for $50-100, if you're lucky.I am programming in LabVIEW, and am using an Agilent 34970A to multiplex across 12 channels. My cost per channel for the whole system is only about $60, at least an order of magnitude cheaper than the major brands out there. Also, the 6 1/2 digit DMM in a 34970A actually yields far more accurate results than what can be achieved with an ARBIN, which often miss voltage endpoints by 10s of mV's.Quote from: IanB on February 18, 2018, 08:06:46 pmI'm well aware that designing electronic instruments is a distraction from my core research. But when you're bootstrapping a startup with no money, it is a necessary distraction.

author: jbb
author_rank: Super Contributor
timestamp: February 18, 2018, 11:53:34 pm
content: If you’re willing to build test gear, I think the AD8541 might be the chip for you. It has precision amps for current sense and cell voltage and analog control loops for CV / CC control loops.If you only need < 10mA, the VCTRL output can be buffered by an op amp and series resistor as a linear current sink/source.Note: the cell voltage sense inputs are not very high impedance, so some 5uA or so of current offset may occur.

author: David Hess
author_rank: Super Contributor
timestamp: February 19, 2018, 12:35:09 am
content: Quote from: jkrbasu on February 17, 2018, 07:23:35 pmThat is exactly how it is done. It forms a simple class-b amplifier which can source or sink current. Some simple charge balancing circuits work in exactly this way.Current limiting could be added by placing resistors in series with the collectors or at least the collector of the PNP transistor.