MCU switching off its own power? - Page 1
Forum section: electronics / projects

author: MikeK
author_rank: Super Contributor
timestamp: June 14, 2013, 12:36:02 am
content: So I have this low power MCU device running on a Li-Ion battery. I don't want the battery to overdrain, so I've come up with this idea. Please tell me if this is reasonable.A P-FET (low Rds and low gate threshold) switches the power to the MCU. The gate of the P-FET is controlled by the MCU. To turn on the device I temporarily ground the FET gate via a switch. Once the MCU is on it holds the FET on, measures the battery voltage and switches off the FET if the battery voltage is too low.Yes?

author: ve7xen
author_rank: Super Contributor
timestamp: June 14, 2013, 01:01:41 am
content: I think this is a pretty common technique.

author: Psi
author_rank: Super Contributor
timestamp: June 14, 2013, 01:18:48 am
content: Check out your MCUs power saving modes and work out how long the battery will last in its deepest sleep mode.Depending on your battery capacity, if it's going to last 5 years before the lithium gets to 2.9V you may not need to bother with the pfet.

author: MikeK
author_rank: Super Contributor
timestamp: June 14, 2013, 01:25:41 am
content: Good point.

author: Psi
author_rank: Super Contributor
timestamp: June 14, 2013, 01:37:37 am
content: Keep in mind that you want the unit to cut-off and stop working with some voltage left.That way if someone runs the unit until it refuses to work any more (due to low battery) there's still some energy left for the mcu to run in sleep mode for a while before the lithium gets to damaging low levels.The pfet is the ideal solution but depending on your application and how often it will get charged you maybe able to drop the pfet and lower your BOM costs.

author: amyk
author_rank: Super Contributor
timestamp: June 14, 2013, 11:11:01 am
content: There are special protection circuits designed for lion cells, which probably consume much less power than an MCU.http://www.ti.com/lit/ds/snos902/snos902.pdfhttp://www.sii-ic.com/en/semicon/products/power-management-ic/lithium-ion-battery-protection-ic/http://www.ricoh.com/LSI/product_power/bmu/

author: nctnico
author_rank: Super Contributor
timestamp: June 14, 2013, 11:17:57 am
content: All li-ion batteries have an undervoltage cut-out built in (which is where the TI chips are targeted at). It is actually difficult to buy Li-ion battery packs without protection because things can seriously go wrong with an unprotected battery pack.

author: rakeshm55
author_rank: Regular Contributor
timestamp: June 14, 2013, 11:37:58 am
content: What if the MCU undergoes a brownout or watchdog reset while functioning??....wont it Cut-OFF the power to MCU, killing its normal function...

author: Rufus
author_rank: Super Contributor
timestamp: June 14, 2013, 12:37:13 pm
content: Quote from: MikeK on June 14, 2013, 12:36:02 amFor most processors and pins the MOSFET will be turned on through pin clamp diodes to the +ve supply. You won't be able to turn it off it will probably oscillate.You should go find Dave's 'simplest power on/off button in the world' or whatever it was called vblog and thread. Some of the circuits discussed could have a processor pin hooked in to turn them off.

author: poorchava
author_rank: Super Contributor
timestamp: June 20, 2013, 07:50:17 am
content: Quote from: Rufus on June 14, 2013, 12:37:13 pmI think that can be prevented easily by adding another mosfet and maybe a diode 'or'

author: asgard
author_rank: Regular Contributor
timestamp: June 21, 2013, 12:05:42 am
content: One possible use is to have the dual Schmitt gate toggle with a forced-on option. For this circuit you can have another capacitor between Vgs and the gate. This is going to increase the Cgs quite a bit so be aware of that. That will force the initial state of the circuit to on. Instead of the pushbutton you could have a pin out of your MCU shorting that part of the circuit to ground (with a pullup, of course). The inherent discharge time will be long enough for you execute a HALT or SLEEP instruction while the toggle turns off.

author: daveatol
author_rank: Regular Contributor
timestamp: June 21, 2013, 12:55:26 am
content: Quote from: poorchava on June 20, 2013, 07:50:17 amThe diode OR is not required if you just connect the switch across the N-FET D-S.It is likely better just to use the sleep mode of the uC and have the uC switch off any loads before sleeping.

author: poorchava
author_rank: Super Contributor
timestamp: June 25, 2013, 07:39:20 am
content: I used the diode or to prevent any current flowing through the button to the mcu port before it is stable and working. I would not like the supply to get shorted to gnd via some unbiased transistor inside the mcu. a simple dual diode costs next to nothing so why take the risk.

author: Mike Warren
author_rank: Unknown
timestamp: June 26, 2013, 05:23:05 am
content: This is what I did recently. Runs from a 9V alkaline battery down to 5.2V.CN3 is just a couple of pads on the PCB I can short out, making it easier to debug the software.