Looking to (re)build a circuit to discharge my lipo batteries to like 3.9-3.7  - Page 1
Forum section: electronics / projects

author: gilligan
author_rank: Contributor
timestamp: December 28, 2019, 03:59:01 pm
content: These guys make a pretty slick little device that drops the voltage of batteries down to their storage level.RC stuff comes in 1S, 2S, 3S, 4S.... configurations which are 1 in series, 2 in series, etc. So the battery drain level is different for each configurations.$5 is not a bad price for these guys but I also have a bunch of 1S batteries that I need to discharge to storage voltage.Can anyone look at this and napkin up me a schematic and/or explain how they are doing this?That's either a shunt resistor or more likely a higher wattage load resistor (I have a few of those), with a small driver circuit for an LED. Are they basically using that LED as the driver for the transistor running to that load resistor which once it drops below a certain voltage (set with the other resistors) the LED goes off and the drain stops happening?

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 29, 2019, 06:01:33 am
content: the 3 terminal device might be a TL431 or similar shunt regulatoras soon as the supply voltage gets below the value programmed by the resistors divider it goes off and let just 0.1-1µA current through ithere is a simulation with a capacitor used as a rough battery modelthe green trace is the battery voltage dropping to about 7.6V (60% charge) at the end and the red one is the discharge current

author: eblc1388
author_rank: Frequent Contributor
timestamp: December 29, 2019, 09:47:25 am
content: not1xor1 has shown you a 2S circuit and I'll show you the 1S discharge circuit, similar to his. I added the LED for indication. The LED will go off when the discharge process is completed.The main discharge current is through the 68R resistor and the LED. This will continue until the cell voltage has dropped to the desired cutoff level, selected by user as per the value of resistor R5.There is is still some small current drain when the LED turns off so the circuit is not meant to be connected to the cell for storage purposes as it will slowly drain the cell down.

author: magic
author_rank: Super Contributor
timestamp: December 29, 2019, 10:44:02 am
content: A single transistor could perhaps replace the TL431 if you can live with a few % of discharge voltage variation over typical room temperature range. Also, a low voltage TL431 variant like TLV431 or many others could be useful.It is interesting however that the original circuit clearly uses some other method, because resistor values just don't make sense.These are, as anyone can see: 31Ω, 5100Ω and 3.6/5.1/8.2MΩ, depending on battery voltage. They must be using some clever obscure IC here.editLet's do some math.Reference input current of TL431 is 2µA typical, flowing into the chip. This times 3.6MΩ plus 2.5V makes 9.7V, 3.2V per cell.TL431 output saturates down to 2.5V, leaving between 7V and 10V across the resistor, for 30~40mA of discharge current and up to 400mW dissipation in the resistor.For 4S it's 3.17V / 33~23mA / 460mW and for 6S 3.15V / 20~15mA / 450mW.Could it be?

author: Siwastaja
author_rank: Super Contributor
timestamp: December 29, 2019, 11:59:05 am
content: It takes ages (days to weeks) to discharge through the small resistor and TL431, so you need to leave it mounted. Then there's the risk you forget it connected, and because the quiescent current is fairly high with that resistor divider in there, there's a risk of destroying the battery by overdischarge during storage.

author: gilligan
author_rank: Contributor
timestamp: December 29, 2019, 03:01:16 pm
content: Quote from: Siwastaja on December 29, 2019, 11:59:05 amWhat do you recommend?

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 29, 2019, 04:09:58 pm
content: Many decent LiPo chargers for RC have an option to charge/discharge 1S to nS battery packs to storage level in a much shorter amount of time. I have a Imax B6 around, it's relatively cheap and does the job.As said above, I wouldn't leave one of those circuits plugged to a battery for extended periods of time because it will eventually discharge it completely (due to the resistive divider). Now if the recommended use it to monitor the circuit and unplug it when the LED turns off, as it may take hours to get there, I think it's pretty unpractical. I think the fact it's cheap and stand-alone would really only make sense if you could leave it plugged to the battery and forget about it until you use the battery again...An equivalent circuit that would draw minimal current once below the threshold would require more care and probably a specialized IC (with fixed internal divider) which I doubt they used here, or more components...

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 29, 2019, 04:27:03 pm
content: What about add a buzzer or bright flashing LED that activates when the voltage is reached?

author: magic
author_rank: Super Contributor
timestamp: December 29, 2019, 06:23:25 pm
content: Try this with TL431:anode to B-cathode to B+ through 22Ωreference to B+ through 330kΩI don't necessarily think this is a great solution but it looks like what they are doing so perhaps it worksIt may have the advantage of drawing very little current after discharge is complete.Certainly watch it while it approaches 3.1V and disconnect the battery if it doesn't stop by 3V. It should stop around 3.16V.Maybe use a battery with protection circuit for testing

author: gilligan
author_rank: Contributor
timestamp: December 29, 2019, 07:02:20 pm
content: I got ya...So, what about this... what if I put some small relays across the battery... drops below the threshold and click the relay let's go. The coil of the relay would also help drain the battery.

author: magic
author_rank: Super Contributor
timestamp: December 29, 2019, 10:07:12 pm
content: I don't think relays can be expected to have well defined turn-off voltage which will be repeatable and stable over long time. These are mechanical devices with springs, pivots and all sorts of unreliable stuff.I would first try the TL431 circuit described above, simply because I suspect that this is how those things that you posted work. But test it first. Or test it on a lab PSU, that would be quite trivial.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 29, 2019, 11:16:42 pm
content: A relay... that would be absolutely not accurate, not by a long shot. The added fun would be that it would probably get into an oscillating state when the voltage gets close to the min operating coil voltage... furious clicking... Fun stuff.

author: tunk
author_rank: Super Contributor
timestamp: December 29, 2019, 11:26:45 pm
content: Would an LED in series with a resistor and one or two diodes work?

author: gilligan
author_rank: Contributor
timestamp: December 29, 2019, 11:54:27 pm
content: Quote from: tunk on December 29, 2019, 11:26:45 pmThe original has an LED and a fat resistor.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 30, 2019, 04:29:13 am
content: Quote from: magic on December 29, 2019, 10:44:02 amTL431 is the cheapest and unlike other chips withstand up to 100mA of currentQuotesaturation voltage should be a little less than 2V

author: Kasper
author_rank: Frequent Contributor
timestamp: December 30, 2019, 04:29:15 am
content: Quote from: SiliconWizard on December 29, 2019, 11:16:42 pmThe clicking could notify the user the drain is complete

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 30, 2019, 05:18:46 am
content: Quote from: Siwastaja on December 29, 2019, 11:59:05 amDays to weeks ?Lets make a rough calculation (assuming 100% efficiency and constant voltage battery).A 2000mAh cell, at 100% capacity holds an energy of 4.2V * 2A * 60 minutes * 60 seconds = 30.24kJTo discharge it to 60% of capacity you have to take away 40% of energy, that is 30.24kJ * 0.4 = 12.096kJ.A TL431 withstands 100mA of current. Lets make it 80mA of average current (I didn't care much of that in the circuit I previously attached), now that means that at 4.2V and 80mA the needed time would be : 12.096e3 / (4.2*80e-3) = 36e3 seconds, that is 10 hours.So unless I made some coarse mistake and unless you want to discharge the battery pack of an electric SUV I think it would take quite less than days or weeks.The schematic I posted was just a quick guess of that in the photo. I do not know if they use a dedicated chip or if that is just the usual careless design with a generic shunt regulator.In any case, with just few more components, it is easy to design a few µA leakage circuit (around 1µA in LTspice). It would cost no more than 1-2 euros/USD and might be a good DIY project.notes:- all resistor values should be changed according to the number of cells and the type of LED, do not forget about the maximum MOSFET gate voltage: a voltage divider or zener is needed in case of more than 4 cells.- I just chose the first low Vth MOSFET model in LTspice, I've no idea about the price and other features, but there are plenty of suitable MOSFETs- C2 is there to start the circuit. It might cause TL431 instability (oscillations) and would require a discharge button, so it might be better to just replace it by a (momentary ON) push buttonwith a series resistor(or better just use a bit overrated power resistor for R3)- do not forget to take into account TL431 and resistor tolerances.BTW - AFAIK - Li-ion batteries are not affected by the Ni-Cd memory effect and last longer if the discharge current is in the order of several tenths of mA rather than A

author: magic
author_rank: Super Contributor
timestamp: December 30, 2019, 07:42:42 am
content: Quote from: SiliconWizard on December 29, 2019, 11:16:42 pmRelays have hysteresis, the battery would need a bit of ESR for that. But a relay oscillator is an intriguing idea neverthelessQuote from: not1xor1 on December 30, 2019, 04:29:13 amFair point, it may be limited only by saturation of the reference input transistor. I didn't know.It doesn't change the calculations much, except for my 1 cell version which should definitely increase cathode resistance then.

author: eblc1388
author_rank: Frequent Contributor
timestamp: December 30, 2019, 01:28:55 pm
content: Quote from: Siwastaja on December 29, 2019, 11:59:05 amWith a slight change, one can also control the discharge current by using different value of R2. The attached example shows a discharge current of 1.2A. The cell voltage would drop very quickly within minutes to hour. Care in the choice of PMOS which should be logic level for it to work.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 30, 2019, 04:44:42 pm
content: Quote from: eblc1388 on December 30, 2019, 01:28:55 pmApart that you are re-quoting Siwastaja's plain nonsense, there is no difference if the batteries are discharged in half an hour or ten hours.A quick discharge decreases the battery life and increases cost and component size because of more power dissipation while one can forget to disconnect the battery from the discharger circuit in both cases.In the second circuit I proposed power dissipation is in the order of hundredths of mW and once the set voltage is reached the current leakage is in the order of µA.After one month a forgotten 2000mAh cell would lose 0.1-1% of capacity.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 30, 2019, 05:14:33 pm
content: Quote from: Kasper on December 30, 2019, 04:29:15 amTrue.I suspect the clicking would actually not be that furious though, it would likely be more like slow cycles.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 30, 2019, 05:16:17 pm
content: Quote from: not1xor1 on December 30, 2019, 05:18:46 amYup. Nice.

author: gilligan
author_rank: Contributor
timestamp: December 31, 2019, 03:56:36 am
content: The original is designed to drain 6s batteries... Those are typically pretty large mAh... Would this tl431 be able to do that?I'll likely whip one or two of these up to try... Especially given my batteries are coming in WAY before the rest of my gear lol.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 31, 2019, 07:26:56 am
content: Quote from: gilligan on December 31, 2019, 03:56:36 amThat's not rocket science, just basic physics and math.If you do not feel confortable with that old brewer Lord Joule, let's just speak about A * h.A 10000mAh battery can provide 10A for an hour.If you discharge that at 100mA (the limit for a TL431) it would FULLY discharge in 10000/100 hours. That is 100 hours.But we need to discharge them up to 60% of capacity so if there were no losses in the conversion between chemical energy and electrical one that would be 40 hours.Now taking into account the energy conversion losses and a safer (for TL431) current of 80-90mA the discharge time would still be around that, likely 35-45 hours.And do not forget the original post. The circuits portrayed in that photo are quite likely in that range of discharge current, 50-100mA.

author: magic
author_rank: Super Contributor
timestamp: December 31, 2019, 08:34:42 am
content: They claim 500mW discharge power.https://www.hobbyrc.co.uk/lipo-suction-4s-xt60So I wasn't that far off but they also claim overtemperature protection so perhaps it's not TL431 after all. And 3.9V rather than 3.2V termination so I'm not sure how they are doing it with so few components. And low leakage.Maybe OTP is a polymer fuse

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 31, 2019, 09:10:47 am
content: Quote from: magic on December 31, 2019, 08:34:42 amThe resistors divider is calculated for 3.8V and in any case 4.2V * .1A = 420mW so just a minimal difference.In any case I never pretended to exactly replicate that circuit.BTW here is a new simplified version with just one BJT and 150mA of average discharge current. Due to the BJT saturation voltage the resistor value should be adjusted.(The BJT may still be replaced by a P-MOSFET)

author: Siwastaja
author_rank: Super Contributor
timestamp: December 31, 2019, 04:39:32 pm
content: Quote from: not1xor1 on December 30, 2019, 04:44:42 pmNot nonsense - no capacity was originally defined, so it could be anything. I was thinking a pack somewhere around 10Ah, and discharging down to somewhere around 30-40%, this would be days. Your calculation also slightly increased the discharge current from the schematic you posted first.Your calculation is correct with your assumptions. Increase the resistor divider values to further decrease quiescent current, and the circuit is fairly good for your example case.

author: gilligan
author_rank: Contributor
timestamp: December 31, 2019, 05:18:55 pm
content: Awesome stuff guys... I'm certainly learning things.FYI, these are LI-PO batteries not LI-ION just for clarity sake in the need to properly store them at the proper voltage.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 31, 2019, 05:22:42 pm
content: Quote from: gilligan on December 31, 2019, 05:18:55 pmto be sure you have to check the cell manufacturer datasheet

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 31, 2019, 05:33:30 pm
content: Quote from: Siwastaja on December 31, 2019, 04:39:32 pmOK... I may have been too rudeplease accept my apologies and ... BTW have a happy new year

author: gilligan
author_rank: Contributor
timestamp: December 31, 2019, 11:39:26 pm
content: Quote from: not1xor1 on December 31, 2019, 09:10:47 amQuick question... how did you get the TL431 into LTSpice?I'm VERY new to LTSpice and I'm looking and I think I get it, but everything I read/watch says "pick something similar" and I don't know which component would be similar to the Zener with Reference.

author: MarkF
author_rank: Super Contributor
timestamp: January 01, 2020, 06:54:22 pm
content: A different approach:https://www.hackster.io/gleisonstorto/constant-current-load-with-cut-off-voltage-afe3e9

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 03:16:08 pm
content: Quote from: magic on December 31, 2019, 08:34:42 amYep. They also claim "Brings a 1300mah lipo to storage voltage within 24 hours", so this is clearly advertised as well that it will take hours.Yes they also claim "Low leakage current so the device can be left plugged in", but without actually seeing the schematic, I still kind of doubt it. Of course "low leakage current" doesn't mean much without any figure. To many non-EE people, a few tens of µA is a very low current... (and it's achievable with a simple resistive divider).

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 03:20:20 pm
content: Quote from: gilligan on December 31, 2019, 11:39:26 pmYou can find the TL431 Spice model on TI's website for instance.https://www.ti.com/lit/zip/sloj174Sorry I don't feel like explaining in details how to create a new part in LTSpice from a Spice model, but this has been explained before so you can look that up in this forum and on the Internet in general, you'll find tutorials (if someone else feels like explaining this again, feel free)

author: magic
author_rank: Super Contributor
timestamp: January 02, 2020, 06:49:31 pm
content: Actually there is a whole little universe of TL431 models from various sources and with various deficiencies.What most of them have in common is not trying to model the IC at transistor level but using simplifications which may not simulate weird corner cases faithfully.For example, the model you linked seems to have no mention of temperature and how it affects not only reference voltage (because it barely does) but also reference current, which OTOH can make a difference if high resistance divider is used. And the chip will get hot if you pass 100mA through it.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 02, 2020, 06:54:08 pm
content: Quote from: SiliconWizard on January 02, 2020, 03:16:08 pmin any case it is an easy DIY project, there is no need to care about the vendor claims.I just provided some ideas.Some improvements may come from using a LMV431 (typical off current is just 1nA, max 100nA) and by carefully selecting the MOSFET (no need for a high power one which likely has high leakage).I'm confident it would be not too difficult to achieve a discharge of 100-200mA and a leakage current of less than 1µA within a couple of euros/USD of cost.Unfortunately I can't make any test now as my lab is not available (I'm very slowly working on a ventilation system with an air purifier with active carbon and up to H13 filter).

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 02, 2020, 07:16:17 pm
content: Quote from: magic on January 02, 2020, 06:49:31 pmAs soon as you use a MOSFET to switch off the current through the resistance divider you have to care only about the off current of the shunt regulator (LMV431 is probably one of the best choice) and of the MOSFETUnfortunately I do not have LMV431 spice model, in any case I put the TL431 one in the zip file with a new simulation (see attachment). About 190mA of discharge current and still around 1µA of off current.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 07:25:53 pm
content: Quote from: magic on January 02, 2020, 06:49:31 pmYes, looking at it, the TI model looks pretty crude.

author: magic
author_rank: Super Contributor
timestamp: January 02, 2020, 09:40:05 pm
content: I think that if OP is still with us and serious about building something, the best way is to just put together a prototype on a breadboard and test it in practice and tweak until it works.An easy and safe way to test is with a lab PSU or adjustable LM317 circuit powered from some USB charger or similar thing. This way you could quickly simulate behavior at various voltages, see how it reacts to heating up etc. If the TL431 blows up, not much is lost

author: gilligan
author_rank: Contributor
timestamp: January 03, 2020, 12:49:00 am
content: Quote from: magic on January 02, 2020, 09:40:05 pmI'm still here and eagerly waiting for parts to arrive to do just that!Till then I'm playing in LTSpice (one, to see how it all works together and two, to understand LTSpice finally!)

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 03, 2020, 02:20:27 pm
content: Just the info from the vendor:https://www.analog.com/en/technical-articles/ltspice-simple-steps-to-import-third-party-models.htmlLooks like creating parts from Spice models has gotten a lot easier than what it used to be, and I was still using the old, "manual" way of editing/creating files by hand... so I did learn something as well today.Long story short:* Open the Spice model file in LTSpice. (Ex: TL431.mod) It will open as a Spice file (basically text editor mode);* Select the subcircuit name you want to create a part from (ex: 'TL431' on the subcircuit line '.SUBCKT TL431 1 2 3');* Right-click on the selected name, a menu pops up, select "Create symbol";* A confirmation message appears, choose 'Yes';* A symbol now appears in the symbol editor. You can customize its shape and rename the pins that correspond to the subcircuit nodes by default (only change the pin names, not the Spice order!);* Save it. You can now close the symbol and the Spice file windows. The new part is available for use without having to restart LTSpice.Note: the symbol editor in LTSpice is terrible. Even more so than the schematic editor. You've been warned.

author: gilligan
author_rank: Contributor
timestamp: January 03, 2020, 02:44:40 pm
content: Quote from: SiliconWizard on January 03, 2020, 02:20:27 pmYeah, that's what I ended up doing.It's quite frustrating and all the tutorials give examples where they can pick known components... like a diode or op-amp.Found one that showed an 8 pin chip and realized i could just redraw it to be what I wanted.Very clunky.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 03, 2020, 05:44:56 pm
content: Quote from: gilligan on January 03, 2020, 02:44:40 pmin thezip file I attached in my previous messagethere are both a TL431 model and an asy (symbol) file.

author: gilligan
author_rank: Contributor
timestamp: January 04, 2020, 05:38:33 pm
content: Quote from: not1xor1 on January 03, 2020, 05:44:56 pmYes, thank you very much!I have built a 1S, 2S, 3S, and 4S circuits with your help.I'll post them soon for feedback as I'm sure I screwed some things up. LOL