My board has a Li-ion battery with the capacity of 2200mAh and maximum voltage of 4.25V and minimum voltage of 3V . This means that the battery voltage shouldn't get lower than 3V. Microcontroller is powered through a low dropout 3.3v regulator.

The micro should be apprised of the lowness of the battery when the battery voltage is approaching 3V (0.2 volts higher than the minimum voltage for example) and then shut down itself to avoid battery discharge.

There is a charging circuit which is powered by 5V. When power is connected it powers on the micro as well.

How to disconnect the microntroller from the battery and keep it disconnected until 5v power is back? Controller has voltage measurement built-in and can send a signal just before to go off.

  • \$\begingroup\$ I can't find a question here, what's your problem? \$\endgroup\$ – pipe Nov 21 '17 at 10:50
  • 1
    \$\begingroup\$ Simply use a voltage divider to make for example Vbat/10 and feed that to an ADC input on the microcontroller (assuming it has one). Then at intervals measure the voltage. \$\endgroup\$ – Bimpelrekkie Nov 21 '17 at 10:53
  • \$\begingroup\$ Yes, this is part of the solution. The tricky part is to turn everything off. Battery should be disconnected from the micro until 5v are connected. If not, it can be eventually powered on due to some unexpected battery recovery (temperature change, etc.) \$\endgroup\$ – Artiom Nov 21 '17 at 11:34
  • \$\begingroup\$ @Artiom Why is that bit tricky? \$\endgroup\$ – HandyHowie Nov 21 '17 at 11:38
  • \$\begingroup\$ @HandyHowie because I don't know how to do it and can't find any simple example schema for this \$\endgroup\$ – Artiom Nov 21 '17 at 11:56

A soft power latching circuit like this one should do the trick. Power can be switched off by pulling the SHUTDOWN input low. C1 will prevent the circuit from switching on again immediately after it was switched off.


simulate this circuit – Schematic created using CircuitLab

Make sure to use a logic-level MOSFET that only needs 3 volts of gate voltage.

  • \$\begingroup\$ Will it still work if V1 goes down to 3v ? \$\endgroup\$ – Artiom Nov 21 '17 at 14:34
  • \$\begingroup\$ @Artiom The MOSFET will stay off even if the voltage goes down that far but it might not turn on reliably anymore at that point. You need to choose a MOSFET with a suitably low gate-source turn-on voltage. With an FDV304P, it should still work even at 2.7V battery voltage. \$\endgroup\$ – Jonathan S. Nov 21 '17 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.