need a better shutdown circuit to protect LiPO cell

Started by PeterPan, December 27, 2014, 12:11:23 PM

Previous topic - Next topic

PeterPan

One of my projects is so too small to use any full size battery, so I've opted to build in a small 200mAh LiPO cell. But the one insurmountable problem I'm having is that a LiPO cell, if allowed to discharge below about 3.0V, will have a progressively shortened mAh ratting and eventually become useless. My circuit's current draining components are all contained in a micro-controller based module, capable of monitoring my voltage. I'm currently using this to trigger a special low power mode, which I thought would be an ideal solution. But unfortunately, "lo" power is not close enough to "no" power. If my circuit goes into "lo power" mode and sits there for over a week, the drain is still enough to put the LiPO cell in in danger. I thought of using a latching relay with some clever On/off switch to might allow a complete disconnect, but I don't think such a relay exists in the tiny size I would need. And with the device only consuming 8mA when its operating normally, I don't have enough current to spare to keep even a tiny regular relay closed, without compromising the operational time. Can anyone think of a low part count (and small!) circuit or IC to block the battery from draining? The LiPO cell will have about 4.2 volts available after full charge, will soon settle at 3.7, and will eventually start dropping further when its about to give up.

Since I do have a few spare I/O ins on my microcontroller, and can already detect the low voltage condition, I already have the "control" I need. Just not sure what actual parts or circuit to use. Thoughts?

--Randy (PeterPan)
*         *                                              *
   *                             *
... Second Star to the Right, and Straight on Till Morning!
       *                  *                  *

bool

One possible way would be to use some low-drop p-mos that can saturate to near-0 volts, and an open-collector (or drain) type of circuit to turn-off ("un-latch") the thing when the battery goes too low.

Something like this: http://s.eeweb.com/members/steve_lawson/answers/1368634260-EEWeb_TTL_MotorPowerSwitchMOSFET_high_side01.png

(in that schem, the +12 would go to the battery straight, the 2k2 resistor should be increased to preserve consumption, and the BJT could be swapped for a n-mos to further reduce current draw. The "load" should the the circuit itself, obviously.)

So the mosfet would get turned-on hard (effectively "latch") when you power up your device and then your micro would turn it off by cutting off the "bjt" ("un-latch") when battery goes low.

The only thing to figure out would be the exact mechanism to override everything logical and turn-on the fet immediately at power-on. Some C-R mechanism perhaps?

R.G.

MOSFET.

The 'on' switch pulses a bucket of charge into the filter cap that runs the uP. that will let it come up and think long enough to turn on the main MOSFET power, which then powers the uP through a diode.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PeterPan

Quote from: bool on December 27, 2014, 02:47:00 PM
One possible way would be to use some low-drop p-mos that can saturate to near-0 volts, and an open-collector (or drain) type of circuit to turn-off ("un-latch") the thing when the battery goes too low.

Something like this: http://s.eeweb.com/members/steve_lawson/answers/1368634260-EEWeb_TTL_MotorPowerSwitchMOSFET_high_side01.png

(in that schem, the +12 would go to the battery straight, the 2k2 resistor should be increased to preserve consumption, and the BJT could be swapped for a n-mos to further reduce current draw. The "load" should the the circuit itself, obviously.)

So the mosfet would get turned-on hard (effectively "latch") when you power up your device and then your micro would turn it off by cutting off the "bjt" ("un-latch") when battery goes low.

The only thing to figure out would be the exact mechanism to override everything logical and turn-on the fet immediately at power-on. Some C-R mechanism perhaps?


Thanks. This might be a good start. There is a chip I found, and MCP111 that seems to do everything want, but its more intended to drive an MCU than provide real power. Its good to 10mA, which actually might be enough for my whole device, but I think I might lose as much as 1/2 a volt! But if I used it to drive a power mosfet as you described, it might work with a pretty low part count. Still hoping for a total one chip solution though before I start designing. You know how it is... one you start scratch designing, there goes another month to R/D time, with Mr. Murphy watching you're every mis-step! :-)


--Randy (PeterPan)
*         *                                              *
   *                             *
... Second Star to the Right, and Straight on Till Morning!
       *                  *                  *

bool

What need to be done and fool-proofed with the circuit above would be to add the "kickstart" RC cell. IOW, a couple-ten-uF tied to the Q2 emitter (the "-", gnd) and then to a, say 100k to the "+12" (wrt the schematic). A diode should connect the RC junction (K) to the p-mos gate (A).

This would in effect be extremelly similar to the R.G proposal above (if understood correctly) with one exception - it would be separated from the rest of the circuit so in case if something-went-wrong it wouldn't be as much affected by the rest of the components. Also, this would allow for more finetuning.

The principle of operation: at power-on, the C would trough the diode turn the mosfet gate hard-on, while charging trough the R1 (from the schem), which should be of course increased to a couple tens of kOhms. This RC constant should keep the gate ON for as long as to the MCU to get into its steady state and to turn ON the Q2 to keep the mosfet ON and so to keep the circuit powered. The R mentioned above should keep charging the C after that (or to keep it charged) to prevent it from interfering with the mosfet gate control after the powerr-on event (the diode mentioned is there for that purpose).

The only thing left to do is to figure out how to discharge the C after the turn-off event.

An old school approach would be to abuse a "reset" taster also for that purpose.

This thing could be made very miniscule and low-power-draw with SMTs. Imho a 100uF 6V tantalum could be all you need to assure the power-on event to go smoothly.

PeterPan

Bool... I think we're on the same track, but let me offer a diagram to clarify, and explain my thinking.



Be kind, as I'm pretty new to using FETs. Here I have a P-Channel FET thats supposed to have a low on resistance. (I'm considering an IRLM6401). The power here is from the LiPO cell, which is about 4V when fully charged, 3V when it should be protected. When my switch is closed, the  P-Mos gate voltage should be near zero for a while, until the capacitor begins to charge. I'm only using a 1uF cap, but its charging through a high enough resistance (R1) that it should give the MCU the time it needs to start (about 100 mS). If necessary the resistor could be higher. Granted, the characteristic of the un-powered MCU is unknown, but really the worst it could do is a appear as a low resistance, which would still help the Gate voltage stay low. So the circuit should turn on. And, if the MCU immediately pulls its I/O line low (the one connected to the 1K resistor), the circuit should remain on, because the 1K is a much stronger pull than the 33oK resitor. Agreed? 

So now lets assume that the MCU has the capability to monitor its own supply voltage, as I've indicated. When I decide the voltage is too low, I can now toggle the I/O line high. It won't be quite the full V+, but it should be high enough to charge C1 quickly, and so cause the VGS to be much too small to keep the gate active. That should make the circuit should shut down. At that point, the battery should be protected, except for the leakage current through the P-MOS. To re-acvtivate, the user would have to turn off the switch and keep it off long enough for the charge on C1 to naturally drain, because the MCU's I/O pin will NOt be infinite resistance to ground. It shouldn't take too long, and certainly I'd expect the user to charge the battery first.

Am I one a good track here? Honestly its already more parts than I'd hoped to add.

--Randy (PeterPan)
*         *                                              *
   *                             *
... Second Star to the Right, and Straight on Till Morning!
       *                  *                  *

slacker

That should work. If you want less parts remove  C1 and put the switch there instead. To turn on hold the switch closed which pulls the gate low turning on the mcu, keep the switch held until the mcu pulls the gate low. You can probably remove R2 as well providing the mcu won't be damaged when it powers up and the pin is held low. You might need to make R1 smaller, it needs to be small compared to the impedance of the mcu pin when unpowered.

PeterPan

Quote from: slacker on December 29, 2014, 01:27:49 PM
That should work. If you want less parts remove  C1 and put the switch there instead. To turn on hold the switch closed which pulls the gate low turning on the mcu, keep the switch held until the mcu pulls the gate low. You can probably remove R2 as well providing the mcu won't be damaged when it powers up and the pin is held low. You might need to make R1 smaller, it needs to be small compared to the impedance of the mcu pin when unpowered.

I can't bypass C1 with the switch, because the whole point is to let the MCU stop keeping it pulled LOW when it detects low voltage. But now there's another fly in the ointment! The I/O lines on the MCU must be internally protected, and will clamp at 1.4V if a current is applied to when unpowered. GRRR... so now I have to add another transistor like this and reverse the logic of the I/O pin ( now it has to go high for normal operation, and low when the MCU senses the voltage is too low). The transistor blocks and prevents the MCU's internal diode clamping once the MCU loses power.



And, I might need a high value bleeder resistor across C1 if I want to be able to reset withing seconds. Geesh... now I'm up to 5 parts.  I'm not happy about that. Between the shutdown circuit and the charging circuit, I probably have double that part count.

--Randy (PeterPan)
*         *                                              *
   *                             *
... Second Star to the Right, and Straight on Till Morning!
       *                  *                  *

slacker

Sorry, I was assuming a momentary switch, should have mentioned that. If you used a mosfet instead of the 2n2222 you don't need the base resistor, which saves a part.

PeterPan

Quote from: slacker on December 29, 2014, 06:02:40 PM
Sorry, I was assuming a momentary switch, should have mentioned that. If you used a mosfet instead of the 2n2222 you don't need the base resistor, which saves a part.

Ah... OK... true. Of course then I'd need a second momentary to turn it off, but thats not a terrible idea eaither.

But OK I've got another, even better solution. I wish THIS was my idea, because its pure genius, but I found it online... its somebody else's genius idea. How about a two part (maybe just one!) solution...



The reason I say "One" part, is because it might be possible to just replace the resistor with a wire.  The circuit is based entirely on the MOSFET's characteristics. The FET stays "on" until the battery voltage causes the VGS to cross its threshold voltage, and then it gradually opens. All I need to do is pick a FET with the right characteristics, so that it starts cutting out around 3V, and completely cuts off at around 2.7, and I'm done. As it turns out, it looks like a lot of MOSFETs fall in around that range. My circuit is low power (10mA max) so there won't be a heat disipation issue in the "in-between" discharge stages. And it will be worth sacrificing a small amount of usable operation time near the end of the battery cycle, if it means saving the cell from being ruined. What could be simpler? Here's where I got this gem...

http://shaddack.twibright.com/projects/method_SimpleLiPolyOverdischargeCutoff/

Granted its not the bets protection circuit in the world, but you have to admire the simplicity!


--Randy (PeterPan)
*         *                                              *
   *                             *
... Second Star to the Right, and Straight on Till Morning!
       *                  *                  *