meetjestad / mjs_firmware

8 stars 4 forks source link

Improvement: Better battery level measurement #4

Open matthijskooijman opened 6 years ago

matthijskooijman commented 6 years ago

Currently, the nodes measures its (regulated) vcc in order to estimate when the battery is getting empty (measuring the battery directly requires extra components and/or wastes extra power). This works, but the measurement is currently fairly static and only gives a small heads up before the battery dies. This could be improved by doing two measurements: One when idle, and one when the GPS and/or radio is on. In the latter case, there is more current draw, so that should give a lower battery voltage (and thus, show a dip in vcc earlier).