How do I stop charging the batteries in my DIY BMS project? - Page 1
Forum section: electronics / projects

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 05, 2022, 04:59:20 pm
content: Hi!Another project for personal use. The challenge now is to build a BMS, without using a microcontroller. I was able to go well with the project, stabilizing the maximum charging voltage at 4.2v and stopping the supply at 3.0v. In this project, the output is automatically interrupted when the recharge is activated. What I need now is to stop the drip phase. Can anyone suggest me an idea of how to work out a circuit that terminates loading. I want it to stop charging when the voltage across each shunt resistor (R11 and R12) reaches 2.5v.Reply #22I finished my bench tests, with everything working as intended. (image 2)1) Balancing - ok2) Blocking of the cc supply, in the final phase of the balancing, with the release of the output for use - ok3) Interruption of the output when one of the batteries reaches 3.0v, with the unlocking of the cc source for a new recharge - ok4) battery shutdown when its voltage reaches minimum 2.6v - ok

author: fcb
author_rank: Super Contributor
timestamp: February 05, 2022, 05:30:00 pm
content: Perhaps a simple comparator (LM393) with inputs slung between each battery+ and the local 431 regulator.Set the comparator inputs up such that when both batteries exceed the respective 431's (2.5V) the comparator output goes high, common the comparator outputs and you have an output that floats when both batteries exceed 2.5V. Use this with a pull-up resistor to drive a Pchannel MOSFET that shuts off the input supply (probably between S1 and D1, as you'll need the Q1-1 action to switch on your output Q3/Q2-2 complex).Also, you might want to arrange some hystersis/slugging with a comparator circuit - can be done with a couple of resistors.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 05, 2022, 07:04:16 pm
content: fcb, thank you very much for offering me a light.If I understand correctly I would have to use two LM393. I believe that by changing the reference voltage I can use only one LM. The question is still confusing for me, how am I going to use the LM393 outputs to trigger the SCR and thus turn off the mosfet?

author: fcb
author_rank: Super Contributor
timestamp: February 05, 2022, 07:27:06 pm
content: Quote from: Avelino Sampaio on February 05, 2022, 07:04:16 pmProbably something lost in translation.The outputs of the LM393 are open collector, so you can link them together to create AND type functionality. When both (+) inputs on the LM393 are above their respective (-) inputs then the LM393 tied outputs can float high (switching off your Pmos).If you take your pencil sketch addition, all you need to do is wire both outs of the LM393 to the gate of the new Pmos and have a single D-S resistor.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 05, 2022, 08:49:39 pm
content: fcb, I believe I have to use SCR to keep the new mosfet off. If I'm still on the wrong path, please correct me. Tomorrow I will do the tests and return with the result.

author: fcb
author_rank: Super Contributor
timestamp: February 06, 2022, 02:44:42 pm
content: You could use an SCR to latch the condition of the comparators (but not with that pencil circuit), don't know enough about what you want to achieve (i.e. what is the reset criteria?).Perhaps you could describe what you are trying to achieve with the overall design??

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 06, 2022, 05:00:38 pm
content: fcb, I had the idea of using the U1-2 and U2-2 opamps, as they are idle in the loading phase and so I didn't need to create more references. I used an AND gate from the CD4081 to equalize the finalization of the load.

author: fcb
author_rank: Super Contributor
timestamp: February 06, 2022, 06:44:54 pm
content: Quote from: Avelino Sampaio on February 06, 2022, 05:00:38 pmStop for a minute. You are probably making it all too complicated, let's go back a step and look at what you are trying achieve.1. Charge a 2S Li chemistry pack from a 600mA CC source. OK2. Have some sort of charge-dump balance circuit (adjustable via P1/P2) to limit the maximum voltage across either cell. OK3. Disconnect the charging CC when both cells charge-dumping. OK4. Disconnect the battery pack output when??? Under what circumstance???5. Underwhat circumstance will the battery pack be recharged??6. Under what circumstance will the output be reenabled??And TR3 is wrong. As soon as you trigger it will switch off, no latching function, and with C3 you might have built a crude relaxation oscillator.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 06, 2022, 10:44:49 pm
content: fcb, thanks for your questions.As soon as I flip the switch S1, Q1-1 is off, which turns off Q2-2 and then the output is stopped until charging is complete. When charging is complete, TR3 turns off Q4, which turns on Q1-1, which turns on Q2-2 and then releases the output. Another way I have to release the output will be turning off the S1 switch.Here in the bench test TR3 is being fired without any problems. C3 is being needed to solve a problem when activating the S1 switch. When energizing the circuit through S1, some initial pulse at the AND gate output is being generated, which triggers TR3. If I ground R26 or leave the TR3 gate open, Q4 is triggered normally. So a "dirt" on the AND gate output is resolved with C3.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 08, 2022, 07:48:33 am
content: HiI'm back asking for some more suggestions, as the project still lacks two more solutions:1- I need it to automatically restart charging when the battery voltage reaches 3.0v. A circuit that cuts TR3, releasing Q4.2 - the quiescent current in the circuit may, over time, drain the batteries deeply, in case the DC source is kept off. What solution can I use to completely cut the battery charge consumption when they reach 2.5v?

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 08, 2022, 11:01:10 pm
content: HiI solved question 1 according to the circuit shown in the image below. When reaching 3.0v, two conditions occur in the circuit, which is detected by the AND gate. TR3 is interrupted, releasing Q4 for recharging the batteries.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 09, 2022, 03:03:28 pm
content: HiThe updated schematic follows, with the introduction of the Q9 and Q10 mosfets, which aim to avoid the deep discharge of the batteries. Among several mosfets tested, I chose the IRF3205 which has very low RDS and VGS close to the desired one. The circuit consumes approximately 1.9mA of quiescent current per battery.

author: fcb
author_rank: Super Contributor
timestamp: February 09, 2022, 04:07:52 pm
content: Don't like your IRF3205 circuit.You are relying on the Vgs of the MOSFET to protect the battery from over-discharge - you'll be operating the MOSFET in it's linear-ish region (heat..) and they don't have a sharp or well-controlled cutoff - process and temperature will play a big part.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 09, 2022, 05:08:18 pm
content: fcb,I had this concern, for being at the limit of the linear region. I then decided to carry out bench tests, to monitor the Vds voltage and verify its feasibility. Look at the images: In the first image, I tested it with a nominal voltage of 3.7v and a current of 2.5A. The left multimeter monitoring the Vds. See in the second image my worst case scenario, which will be when it approaches 3.0v but I consider it still viable (here maybe I'll increase the cut to 3.1v).Remembering that the circuit will interrupt the output when it reaches 3.0v, so the current from this point on will be very small (1.9mA). From 3.0v down RDS increases considerably (which is very desirable). With no other mosfet I got this condition.Do you have an idea for something more elaborate? No dedicated IC.

author: fcb
author_rank: Super Contributor
timestamp: February 09, 2022, 05:38:44 pm
content: There's an old joke and the punchline is "If I were you I wouldn't start from here", I think that probably explains my view.I'd look sit down and list all the conditions that your battery has to cope with, all the features and describe them in a list.Then I'd start with the most important and design some circuitry around that, so for example, open-circuiting a cell when V<x maybe very important to you. So perhaps design a switch for that? Then perhaps look at what creates the trigger condition for that circuit, and how it will recover (likely only when plugged in?) - you'll want to make sure there is unmeasurable amounts of current drawn from the cell when 'off'.Next look at the disconnection circuit for the charger - don't worry about latching yet.Perhaps next, any output enable disable circuit. Do you need it? What does it do? What drives it?After that design the voltage detection circuitry. Can you reduce the queiscent current? Can you use 1.25V low current TL431's? Comparator choice - is it just what's in the junk bin? Are you only looking for 4.3V and 2.5V trigger levels?Finally, design the logic.Also, perhaps divide your design into multiple domains and reduce the interconnection between them to make testing it easier. In your design I'd probably treat each cell/balancer/UVdetect as a standalone design with perhaps a logic input for 'forceON' (forces UV protection circuit on) and and output for 'end-of-charge'. Other parts could be the input switch, the output switch could also the logic.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 09, 2022, 07:48:52 pm
content: fcb, I am very grateful for your patience with me. The project I proposed to assemble is serving the purpose. I challenged myself to design, without the use of a microcontroller or a dedicated Integrated Circuit. And I can tell you, the learning curve has been wonderful!

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 21, 2022, 12:14:06 pm
content: HiI still have to solve a problem in my project, which is the battery cut at 2.5v, through the irf3205 mosfet. The resistive area of the mosfet shifts a little further down, at low current and low vds voltage, shifting the start of the cut to 1.8v. To try to compensate for this difference, I added a Jfet, as you can see in image 1. The jfet diode was around 0.54v for a current of 4uA. It was almost perfect, however the resistive area invaded the 3V region, when at high current (3A), making the idea unfeasible. What I need then is to build some circuit (image 2), which consumes a very low current from the battery, and is able to cut the mosfet at 2.5v. Anyone got any ideas to suggest me? Not worth dedicated CI or comparator. I have low vgs mosfets, N-channel Jfet, TL431, AZ431, LM334, LM336, transistors, diodes and zeners.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 21, 2022, 09:51:28 pm
content: HiToday I was testing the behavior of the AZ431 at the minimum working current (55µA in the datasheet) and an idea came to me, which was to use its loss of regulation to turn off the PNP transistor and therefore turn off the mosfet. The circuit is working perfectly. When the battery voltage reaches 2.62v, the regulation collapses and the VBE voltage quickly drops below 0.7v, thus turning off the mosfet. The quiescent current of this circuit is 35µA. For now, it's quite a step forward.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 22, 2022, 10:42:37 am
content: HiIn the previous circuit that I had elaborated there were two bad points: 1 - in the long run it would take the battery to zero volt. 2 - The initial quiescent current of 35µA still seemed a bit high.Following the same logic as before, of using the loss of regulation to take the VBE voltage of the transistor below 0.7v, I arrived at the circuit in the image below. The circuit completely turns off the mosfet at 2.62v. The quiescent current from this point is approximately 5µA. And the most important thing is that, in an extreme period of no use situation, the battery voltage will not drop below 1.73v. At this point there will be no more current flowing.This circuit allowed me to change the mosfet for another one with a much lower vgs(th), ensuring greater peace of mind with the Rds in my worst case (3v/3A). I switched to IRLZ44N.

author: fcb
author_rank: Super Contributor
timestamp: February 22, 2022, 11:44:36 am
content: Quote from: fcb on February 09, 2022, 05:38:44 pmI'm going to sound like a stuck record..

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 22, 2022, 01:04:46 pm
content: fcb,This was very inelegant. I've already hinted that the purpose of this project of mine is purely and simply my right to exercise electronics, without resorting to a dedicated MCU or CI. And honestly, I don't care if you're finding it ridiculous.

author: fcb
author_rank: Super Contributor
timestamp: February 22, 2022, 01:18:02 pm
content: Quote from: Avelino Sampaio on February 22, 2022, 01:04:46 pmI hope I didn't come across as rude, my apologies if it came across as such. Like many others on this forum (also with numerous decades of electronic design experience) - I'm just trying to be helpful and pass some of this knowledge on.....and with today's chip shortage, what you are attempting to design makes good sense, and it might just be an exercise - however there is more to be gained in treating the design exercise in a methodical manner.

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: February 22, 2022, 09:31:55 pm
content: HiI finished my bench tests, with everything working as intended.1) Balancing - ok2) Blocking of the cc supply, in the final phase of the balancing, with the release of the output for use - ok3) Interruption of the output when one of the batteries reaches 3.0v, with the unlocking of the cc source for a new recharge - ok4) battery shutdown when its voltage reaches minimum 2.6v - ok