Low battery cutoff with reset IC - Page 1
Forum section: electronics / projects

author: okw
author_rank: Frequent Contributor
timestamp: April 28, 2025, 02:39:31 pm
content: I wonder if this is a good solution, to cut off the battery if the user leaves the rotary switched turned on and battery gets dramatically low?Or will it always stay on, and not even turn off then I switch to position 0, since it will feed the gate low once turned on the first time?Do I need the open drain version (CN803S), which in turn controls a transistor?

author: jwet
author_rank: Frequent Contributor
timestamp: April 29, 2025, 04:08:38 pm
content: Since you got no answers- I'll weigh in.I think I can see what you're trying to do but I don't think it will work reliably, Vcc to the supervisor goes away when the FET opens and the FET turn back on and oscillates. You want to have an under-voltage disconnect for your battery if the instrument isn't put in off so you don't drag it down to zero. This isn't an auto off, its just a disconnect on low battery- good for rechargeable longevity, there are standard circuits that do this (google LiIon batt. protection) and most non oem Li Ion cells have something like this in them. A PMOS FET with its gate pulled high will be off as in postion 0. When not in postion 0, the FET will be on. The problem I see is that on low battery, the supervisor will push the gate up to Vbat - a diode drop which will likely not "fully" turn off the FET, the Vcc to the 810 will go away, it oscillates and discharges the battery and then the as the battery discharges further, the supervisor will lose its brains and the battery will get flattened anyway. I've had port equipment that gets stupid like this on low battery startup.As you said, a better way to do this is to invert the logic so the gate is pulled down when on and has a pullup to Vbat from gate to Vbat (kind of a deadman) in which you could control with a transistor of FET. You'll have to get the sense of things correct. Also make sure you don't have startup problems- in your circuit, for example, in your circuit the supervisor is powered by Vbat but Vbat is gone, the super goes away.You might look at some of the latching on circuits that are popular topics here and put a supervisor or voltage detecctor in one of those for low voltage cut off feature. Good luck.

author: okw
author_rank: Frequent Contributor
timestamp: April 30, 2025, 12:38:18 pm
content: Quote from: jwet on April 29, 2025, 04:08:38 pmI forgot, I actually have a DW01A in place. This disconnects battery ground if discharged below 2.4V.That's probably all that I need?

author: Peabody
author_rank: Super Contributor
timestamp: April 30, 2025, 02:17:02 pm
content: I think it depends on how often the device will be left on. The DW01 is usually the ultimate protection device, but it will only trip at about 2.4V, which is pretty low. So something that kicks in a bit earlier would probably extend battery life if this happens very often.I agree with @jwet that your circuit is circular. The reset IC has to be powered from BAT+, not the switched battery. Otherwise it will just oscillate.Do they make a reset IC that is push/pull? An active-low version of that would let you drive the base of an NPN from the IC output through a resistor, and the NPN would pull down the gate of the P-channel. Then when battery voltage goes too low, the only power consumption would be what the reset IC draws, and there wouldn't be any current through pullup or pulldown resistors.But shouldn't all of this be over on the left side, before the rotary switch?

author: okw
author_rank: Frequent Contributor
timestamp: April 30, 2025, 03:28:50 pm
content: Quote from: Peabody on April 30, 2025, 02:17:02 pmThe P-channel gate needs to be high to be off, so for the active low reset IC to work, it needs a PNP to pull up the P-channel MOSFET gate when the battery is <2.93V?And I need to do it on the right side of the rotary switch, the reset IC "simulates" the rotary switch being in position 0.Or did I miss something?I get that it will never be completely off when the battery is getting low enough, which defeats the whole purpose. But will 2.93V (through the NPN) be enough to fully turn off the P-channel? Or do I need some restructuring?The BAT+ is connected directly (fused) to the battery, which is also connected to a charger.POS1-5 goes to a voltage divider ladder.

author: Peabody
author_rank: Super Contributor
timestamp: April 30, 2025, 10:35:14 pm
content: Quote from: okw on April 30, 2025, 03:28:50 pmIn the new circuit you have a pulldown resistor on the gate, which will turn on the mosfet unless the PNP and reset IC work properly to keep it high when battery voltage drops. And if they do work properly, you will still have current flowing through all the resistors if the reset output goes low, so battery discharge continues.It seems it would be better to have a pullup resistor on the gate, which is pulled down by an NPN to ground to turn on the mosfet. But I can't read the Chinese datasheets on the CN parts. Do they have one that sources positive current when the battery voltage is high, and either sinks current or goes tristate when the voltage is low. The idea is that you want a positive voltage to be required to turn on the mosfet (a positive voltage on the NPN base, which turns on the mosfet). Otherwise it will be off. And if the battery gets really low, and all the chips drop out, you still don't want anything to turn on the mosfet.Edit: The TLV809 has a push/pull output. So its output would directly drive the NPN base through a resistor. When battery voltage is good, it would turn on the NPN, which in turn turns on the mosfet. When battery voltage drops below the threshold, the output would go low, turning off the NPN, and turning off the mosfet. There would be a high-value pulldown resistor on the reset IC's output, just to make the NPN default to off, and a pullup resistor on the mosfet gate, defaulting it to off as well. None of the resistors carry any current when the IC output goes low. Perhaps your CN809 works the same.QuoteI guess I don't understand. If it's not actually in position zero, what will protect the battery from overdischarge? It just seems you would want the whole circuit to shut down when the battery voltage gets too low, no matter what position the switch is in.

author: okw
author_rank: Frequent Contributor
timestamp: April 30, 2025, 11:35:43 pm
content: Quote from: Peabody on April 30, 2025, 10:35:14 pmIn the original design (without the reset IC and transistor, only P-ch mosfet), it turns the MOSFET off when in pos 0 (instrument off).The weak pulldown (470k) is to bleed the gate, so the P-ch turns on and starts supplying the circuit in pos1-5.Quote from: Peabody on April 30, 2025, 10:35:14 pmI'm not sure I understand. Battery is "always" good (except very rare occasions when the user accidentally left the instrument in pos1-5 and drains the battery. But i don't want the mosfet to always be on just cause the battery is good. It should be off in position 0. I made the rotary switch like this, since pos 1-5 goes into a voltage divider ladder to a ADC to determine the position. Instead of actively turning the circuit on, it's actively turning it off.Quote from: Peabody on April 30, 2025, 10:35:14 pmYes, that's exactly what I want. In pos 0 the battery is not discharging (well 8.2uA, but that's gives 10 years standby), so reset IC is not really needed in pos 0. It is if the user leaves the instrument in pos 1-5 accidentally, the reset iC should cutoff the battery at some point. I could of course put two mosfets in series (one disconnected in pos 0, the other disconnected when reset ic kicks in), but that wouldn't be very elegant.

author: Peabody
author_rank: Super Contributor
timestamp: May 01, 2025, 02:29:01 am
content: Sorry. It's clear that I don't understand your circuit, or what you're trying to do. So I'm going to let others help you get this done rather than continue to offer suggestions that aren't useful.

author: okw
author_rank: Frequent Contributor
timestamp: May 02, 2025, 10:09:42 am
content: Quote from: Peabody on May 01, 2025, 02:29:01 amYour input is very valuable. I think I'm just not explaining the circuit well enough.I've included more extensive schematics to describe what I'm thinking.I have two sources available, battery and USB. Then USB is plugged in battery is charged, and system is powered just from USB, not battery (power path). System is active in all positions (including 0/off).On battery, user needs to turn to any pos 1-5 to power the instrument. If in position 0, the quiescent current is 8.2uA, so essentially not drawing any power.If user accidentally leaves to instrument on (pos 1-5), I need to ensure the battery isn't completely drained.I have included a deep sleep in the firmware, but even that draws some, so over weeks or months, the battery will be completely drained.That's where the reset IC (or other suggestions) comes in. I was thinking to piggyback the P-ch gate, so the reset IC forces the P-ch to turn off (in case the user accidentally left the instrument powered).Would this work?One problem I can think of is that the P-ch won't fully open once the battery is that low (2.93V) anyway, so some current will flow (counterproductive to the battery cut-off).Are there any tricks to fully open the P-ch with lower gate voltage? I think I measured Vgs > 3.4V to fully open (disconnect) the P-ch.

author: Peabody
author_rank: Super Contributor
timestamp: May 02, 2025, 02:59:52 pm
content: Ok, I think I understand. I think your circuit will work. I'm just bothered by having the mosfet "default" to ON because of the pulldown resistor. But I can't think of a way to have it default to OFF without adding another BJT. Also, when the shutoff happens, you still have current flowing through R2, R3 and R4, so the battery drain doesn't completely stop.Are you saying that when the CN809 ouput goes low, the PNP doesn't pass enough current to overcome the pulldown and turn off the mosfet? I would have thought the problem would be turning it on fully when it should be on. But you might try changing the positions of R3 and R2 so from left to right the connection to R3 comes first. The way you have it now produces a divider.You know, you have either BAT+ or BAT- going through five mosfets. What mosfets are you using?I haven't studied everything in the schematic, but notice that you need a resistor to ground on the PROG pin of the TP4056.

author: okw
author_rank: Frequent Contributor
timestamp: May 02, 2025, 03:09:29 pm
content: Quote from: Peabody on May 02, 2025, 02:59:52 pmAnother BJT doesn't hurt, if it makes it betterQuote from: Peabody on May 02, 2025, 02:59:52 pmI haven't actually tried the design with the reset IC circuit. As for now, it's only the rotary switch and P-channel. It works great, but would drain the battery if accidentally left on.Quote from: Peabody on May 02, 2025, 02:59:52 pmI wish I didn't need all those mosfets, but can't find another way to reduce.I use HL2305 and HL2312. They're quite decent (RdsON ~30mR and ~25mR @4.5V).Quote from: Peabody on May 02, 2025, 02:59:52 pmThe TP4056 is stripped for components for readability. It's just for the overview.

author: Peabody
author_rank: Super Contributor
timestamp: May 02, 2025, 04:04:52 pm
content: So far I haven't been able to come up with a better circuit. But I'll think about it some more.This is what I'm confused about:QuoteYour mosfets look good.

author: Peabody
author_rank: Super Contributor
timestamp: May 02, 2025, 05:39:40 pm
content: Below is a possible alternate circuit. When the device is turned on, current will flow through all three resistors, and the mosfet will be on. If you turn the knob to POS-0, current will flow only through R3, and the mosfet will turn off. If the battery falls below 2.93V and the rotary switch is still in some other position, there will be no current through any resistor. If it's in position zero and below 2.93V, there will still be current through R3.You would need to test this. And depending on how noisy your environment is, 1Meg may be too high a value for R3. I did not put a pulldown resistor on the NPN. If you don't have any base current, you shouldn't need one.I'm assuming your 809 has a push/pull output.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 03, 2025, 03:00:32 am
content: Quote from: okw on May 02, 2025, 10:09:42 amThings to watch are1) chatter, where a recovering unloaded battery passes OK and then a loaded battery trips OFF on a recurring basis.2) Load of the sense circuit : Anything that runs ON a PNP to turn OFF a PFET, will have a rather high off current.There are battery sense circuits that may be better suited :CM302CN302 has Set-reset action with separate trip and ok thresholds, so can give user control to avoid chatter effects.ADCMP361YRJZ has a high precision (0.275% ref) and both polarity outputs, but you pay a bit more for that precision.New parts like ROHM bd48hw0g have wide VDD, & op SW operating specs, 0.75%, and sub uA active currents

author: Peabody
author_rank: Super Contributor
timestamp: May 03, 2025, 02:46:15 pm
content: The TLV809 has 40mV of hysteresis. If that's not enough, you can add more. The circuit below adds positive feedback, but only when voltage goes from low to high, so it doesn't change the trigger voltage going low. However, it does add whatever current passes through R5 to the current draw from the battery when the supervisor shuts down the power.

author: Terry Bites
author_rank: Super Contributor
timestamp: May 03, 2025, 06:37:34 pm
content: You may find this interestingwww.onelectrontech.com/mosfets-load-switch-pmos-nmos-on-resistance-inrush-current-applications/andwww.analog.com/en/resources/analog-dialogue/articles/adding-hysteresis-for-smooth-undervoltage-and-overvoltage-lockout.htmlI'd avoid a DIY solution as there are so many low cost products in this area.LDOs with undervoltage lockout and power switch. eg TPS2150 TPS2140uC watchdog chipsPower Supervisors/ Monitors.

author: okw
author_rank: Frequent Contributor
timestamp: May 05, 2025, 07:16:03 am
content: Quote from: Peabody on May 03, 2025, 02:46:15 pmThanks for the detailed suggestion. However, I can't get it to work (in simulation). Load always sees 2.475V regardless of switch position or reset IC.I attached simulation from Falstad.

author: Peabody
author_rank: Super Contributor
timestamp: May 05, 2025, 01:37:36 pm
content: I don't know anything about Falstad. Well, if it doesn't work, it doesn't work. But I don't see why it wouldn't. And I don't know where 2.475V would come from.Edit: You have the gate pullup resistor (R1connected to the NPN's base. But something is wrong with the simulation. If I remove the NPN completely, current still flows through the mosfet.

author: okw
author_rank: Frequent Contributor
timestamp: May 05, 2025, 01:44:24 pm
content: Quote from: Peabody on May 05, 2025, 01:37:36 pmFalstad is the simulator:http://www.falstad.com/circuit/circuitjs.htmlIf you open the file I attached in the previous post in the Falstad link above, the circuit should be identical to yours. Maybe I made an error?

author: Peabody
author_rank: Super Contributor
timestamp: May 05, 2025, 02:03:25 pm
content: Yes. See my Edit of my previous post.

author: Peabody
author_rank: Super Contributor
timestamp: May 05, 2025, 02:08:49 pm
content: Why does current still flow? See attached.

author: okw
author_rank: Frequent Contributor
timestamp: May 05, 2025, 02:20:17 pm
content: Quote from: Peabody on May 05, 2025, 02:08:49 pmWire from gate to pull-up wasn't connected (each end must terminate in another end, crossing wires/nets won't connect).Anyway, excellent. Seems to work fine. Not sure why it shows 2.475V. If I decrease the load to say 1k, it's 4.1V. Seems supply isn't "strong" enough.What diode would you suggest for the reset ic? Is a SD103AWS ok (it's on the BOM already)? If others are better suited, i don't mind another line in the BOM.And how do I determine R4/R5?

author: Peabody
author_rank: Super Contributor
timestamp: May 05, 2025, 03:10:13 pm
content: Could you post your corrected simulation file?Does the simulated threshold voltage of the mosfet match the datasheet? And what about RDSon?R2 and R3 may need to be adjusted. Can you read out the simulated gate voltage when the mosfet is turned on? It should be very close to 0V.As for the mystery resistors, I don't have an 809 to experiment with, and I can't read the datasheet of the CN version. So you may have to experiment when you have one at hand. But basically, you want the Vcc inline resistor to be small enough that it doesn't materially change the trigger voltage (although it has to a little bit), and then the feedback resistor would be picked to produce the needed additional hysteresis. But with any luck, the built-in hysteresis will be enough that you don't have to do anything more. That diode should be fine, or just a 1N4148 would also work.I should add that I've never actually built the hysteresis feedback circuit, so I can't guarantee it will work. And I doubt you can simulate it. So some other method might be best, as described in the Terry Bites post.

author: okw
author_rank: Frequent Contributor
timestamp: May 05, 2025, 04:30:48 pm
content: Quote from: Peabody on May 05, 2025, 03:10:13 pmSimulated gate voltage when on is 30.1mV.Mosfet VGS(th) -0.5 to -0.9V (conditions VDS= VGS, ID=-250μA).Mosfet in simulation was -1.15V. If -0.5 (best case) it's still 2.954V (slight increase). Beta is 20m, no possibility to set RDSon. Which is around 30mR for my mosfet.I attached the english version of the 809 datasheet.I love building instead of using off the shelf chips. More learning

author: Peabody
author_rank: Super Contributor
timestamp: May 05, 2025, 09:35:52 pm
content: Based on the datasheet for your mosfet, there should be very little voltage drop across the mosfet at your test current when the gate is at 30mV. That's a G/S voltage of -4.07V with the threshold less than -1V. So it's going to be fully on. I did another run (see below) with the mosfet's "beta" changed from 20m, whatever that means, to 1.0, and got what I think is a more realistic result. I guess beta is some kind of proxy for RDS. I also changed all three resistors to 1M, and it still seems to work fine - unless you will have a noisy environment.Your 809 has a much small hysteresis than the TI 809. It's 13mV vs 40mV. Any chance you could use the TI part?The problem is that the resistor divider and the comparator inputs of the 809 are all inside the chip. So you can't implement the standard hysteresis circuit, which would just be a high-value resistor from the comparator output to the non-inverting input. Positive feedback. Well, let me see if I can work through the numbers to get an idea of what resistor values work, and then maybe you can do the simulation on it.

author: tooki
author_rank: Super Contributor
timestamp: May 06, 2025, 07:20:26 am
content: Instead of cobbling together a DIY solution out of “dumb” parts, why not just use a proper full-featured charging chip that can do all of this? You do need an MCU with which to control it, which I assume you have, based on the signal going to an ADC.I designed a device around the TI BQ25895, which supports fully-configurable charging control, power path management, and importantly supports “shipping mode” where the battery is completely disconnected. The device has a power button connected both to the BQ25895 and the MCU, which on the one hand allow the BQ25895 to turn on the device, but also provides a hardware-level hard reset by holding it down 15 seconds. On the other hand, when running, the MCU can read the button state and allow software-controlled shutdown, with the MCU ultimately sending a “go into shipping mode” command to the BQ25895, fully shutting down the device.The BQ25895 also lets you monitor all its input and output voltages, configure maximum input and output currents, etc.You still need your cell protection chips, and a fuel gauge IC if you want accurate battery state-of-charge measurement.In the end, it took me a little while to figure out how to properly use the BQ25895, since it was simultaneously the first time I’d used lithium-ion cells, and the first time I used an I2C device without a library. But it’s not actually that hard.Also, there’s a high likelihood that MPS makes an equivalent chip. MPS sells their development systems for FAR less than TI (like $30 instead of $400). You don’tneedthis — I didn’t have it when I designed my gadget — but it gives you access to a nice configuration GUI so you don’t have to manually come up with the configuration commands.

author: Peabody
author_rank: Super Contributor
timestamp: May 06, 2025, 04:54:38 pm
content: I assume the CN809 has a voltage divider inside the chip which reduces the 2.93V input down to the 1.25V fixed reference voltage. So the resistors would be in the ratio 100K and 74.4K. The actual values must be a good bit higher than that because the chip's supply current is only about 3uA.In simulation I tested inserting a 2.2K resistor inline between the battery and the 809's Vcc pin, along with a 100K feedback resistor from the 809's output back to the Vcc pin. It turned out that the diode didn't help, so I didn't use it.This only produced 65mV of hysteresis, which is not much. Increasing the 2.2K resistor would provide more hysteresis, but I don't know at what point the chip will no longer work properly, if it even will with the 2.2K resistor. Also, as I pointed out before, about 30uA of current will continue to flow through the 102.2K of resistance after the 809 has shut down the circuit, which is not good.I searched for voltage supervisor ICs with adjustable hysteresis, and found the MIC2779L. This lets you set both sides of the hysteresis wherever you want by adding three external resistors. The chip's supply current is about 1uA, and the three resistors can total up to 3Meg, so the shutdown current would be very low. There is also the DIO302 chip, which works the same way but draws higher current.While more expensive, the MIC2779L may be a good choice if hysteresis is a problem. Otherwise, you would have to experiment with a real CN809 to see how it behaves with different Vcc and feedback resistor values.

author: okw
author_rank: Frequent Contributor
timestamp: May 06, 2025, 05:36:30 pm
content: Could this be used in some way?

author: Peabody
author_rank: Super Contributor
timestamp: May 06, 2025, 10:08:32 pm
content: Yes, that looks better than the 809. Typical hysteresis at 3V would be 150mV. You would want the CMOS output.