![]() |
Forum Index : Microcontroller and PC projects : Picomite - prevent starting with low battery
Author | Message | ||||
apalert Regular Member ![]() Joined: 06/07/2023 Location: AustraliaPosts: 41 |
If the picomite shuts down because of low battery voltage it seems prone to corrupting things. Quite often the OPTION AUTORUN ON, NORESET gets knocked out which is disastrous for a self contained device. I'm using the soft-start circuit from Fruit of The Shed. This is a high side PMOS switch activated by a push-button switch to earth and maintained by an output from the pico. FOTS Soft Start It's easy to code a dignified shut-down when the battery runs low. The danger comes from trying to start the device when the battery is in a very low state. I'm wondering about incorporating a zener diode into the FOTS circuit? Does anyone have thoughts? |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2678 |
Perhaps an Under Voltage Monitor chip connected to the RUN (reset) pin is what you need. It will hold the RUN pin low if the supply is out of limits. One example - LTC2965 Your issue might instead be the sensitivity of the RUN pin to noise and static. Add a 100nF to ⏚ and a 10kΩ pullup. As for the OPTION AUTORUN issue you could instead put this at the start of the program:- Sub MM.STARTUP Pause 100 'allow time for Ctrl-C to work in the event of a re-boot loop RUN End Sub |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5193 |
Make sure you have sufficient hysteresis. Otherwise when the battery empties you end in an seemingly everlasting hickup sequence. Depends on battery internal resistance when near empty. Volhout PicomiteVGA PETSCII ROBOTS |
||||
apalert Regular Member ![]() Joined: 06/07/2023 Location: AustraliaPosts: 41 |
Thanks for your input folks. Volhout, yes the battery could well jump 0.1 - 0.2 volts as soon as the circuit shuts down. Phil, one problem with the LTC2965 and similar is that they are very expensive. Really interested in your idea putting RUN in Sub MM.STARTUP. Seems that totally mimics AUTORUN and could be more reliable. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 8037 |
You can't fully protect against switching on with a low battery. It's not possible unless you use active battery monitoring that tests periodically with a real load. The problem is that the terminal voltage will always read normal until it is loaded, then then it drops because of the internal resistance. By the time it starts to read low without a load it's too late - it's already flat. It should be possible to make an active monitor using a chip with a low power sleep mode (i.e. not a Pico). It would need to be separately powered from it's own battery, possibly trickle charged from the main one. The chip could hold the Pico's power off if the main power is too low. Periodically it would wake up and measure the main battery voltage while applying a load. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
mozzie Senior Member ![]() Joined: 15/06/2020 Location: AustraliaPosts: 171 |
G'day Apalert, The Micrel MIC841 is pretty much designed for this application, best of all they are cheap ![]() The MIC841HYC5 output can be applied to one end of the "Power Button" and the other end via a 10K resistor to the POWER ON input of the FOTS circuit, I had a different but similar circuit setup. If the high trip point is set fairly high a charger will need to be connected before the output will go high and allow the circuit to start. Best of all is the extremely low current draw, around 10uA ![]() Regards, Lyle. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 8037 |
That sounds ideal. I like the idea of setting the high trip point right up. :) The terminal voltage tells lies after a shutdown and should be ignored. . Edited 2025-08-08 01:29 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |