Batteries removal detection

THE_RB

Joined Feb 11, 2008
5,438
There are P-channel mosfets with very low T.H point suitable to 1.9v to 3.2v range so that the gate can be tied to ground. The problem is (and I tried it) that the mosfet doesn't turn OFF when the batteries are removed because that the Vgs still exists from the power supply input capacitors. The mosfet diode has no influence because the drain and source were in the same potetial.
Ahh good point about the turn off. The only time I used this system was on a 12v device as a reverse polarity connection "diode" and it didn't have the back driving issue of the capacitor.

Hmm, maybe he could still leave the PFET reversed (a in the "perfect diode" circuit) and just drive the gate with a spare pin of the micro? The same factor that makes the perfect diode work (ie the FET is reversed) disables its body diode so you can actually turn it off by the gate.
 

Thread Starter

Baron

Joined Jun 15, 2009
31
That's the chicken and the egg question. How the MCU will know that the batteries were removed in order to switch the mosfet gate to turn it off?
 
First of all go easy on me as this is my first post here and I haven`t done much component level electronics since school 11 years ago, I came to this forum to do some catching up.
suggestions:
1. could you use an inductor in series with the batteries, before any power supply components, when the batteries are removed the current flow will stop abruptly inducing a voltage pulse you can use to trigger an interrupt? when running in steady state there should be no voltage drop across the inductor.
2. you could use a low value current sensing resistor in series with the high value cap in the power supply, and monitor current direction, when the cap starts to discharge above a certain threshold this could generate your interrupt.
3 if all else fails and you dont mind your device having a limited shelf life you could fit a tiny pcb mounted lithium coin cell to allow the device to run long enough to have a controlled shutdown.
good luck
 

THE_RB

Joined Feb 11, 2008
5,438
That's the chicken and the egg question. How the MCU will know that the batteries were removed in order to switch the mosfet gate to turn it off?
That's the easy bit, the MCU just turns the FET off regularly for a brief period and checks if the battery is still connected. It needs one MCU pin to control the FET and one mcu pin to sense the voltage on the battery side of the FET.
 

Thread Starter

Baron

Joined Jun 15, 2009
31
That's the easy bit, the MCU just turns the FET off regularly for a brief period and checks if the battery is still connected. It needs one MCU pin to control the FET and one mcu pin to sense the voltage on the battery side of the FET.
That's a great idea. simple and low cost solution.
I'm going for it.

Thanks
 
Top