Battery fuel gauge with zero parts and zero pins on AVR

Josh Levine writes:

It can be nice to know how much battery power you have. It becomes critically important with LiPo batteries since you can permanently damage them by running the voltage down too low. Typically battery voltage detection requires adding a circuit with extra parts and their associated power requirements. Wouldn’t it be great to be able to do this using nothing but software? Read on for a no parts, no pins, no power solution…

Join the Conversation

5 Comments

  1. Gosh, every little thing is overblown nowadays… This is a total no-brainer to every embedded engineer who put a little bit of thought about parts optimization. Done this many times, it was the first thing that came to my mind, and I never even bothered considering the opamp case. Yawn.

    1. Also, the “no power solution” bit would likely elicit strong reactions from EEs. My unfiltered reaction is ‘deceitful showboating’. When doing embedded design we usually do duty cycle calculations, even if the average is in nanoamps, it can still be designed for, in conjunction with battery behaviour over time. No power? Good grief. Dabbed too much marketing gloss on what is just a basic MCU technique. So it is not surprising that the author is getting flak and is attempting to defend himself via his FAQ. Heh.

    2. I think it’s a consequence of the growing popularity of being a “maker” (I hate that word) – in a parallel with PCs, twenty years ago only people who knew how to use a computer were using one. These days, 95% never bother past getting on Facebook and Youtube. The Arduino did the same for electronics – now, 95% think that “downloading a sketch” is engineering and circuit design is what you do in Fritzing. Whether one considers the resulting wider access a good or bad thing is for each to decide, but it undeniably lowered the bar to effectively zero and that is indeed extremely annoying for anyone even slightly more knowledgeable than that…

  2. Not only is this obvious (and subject of many appnotes) but the guy also is wrong about the attiny in the bottom of the writetup. Yoy CAN do this on the attiny and the temp sensor need not be involved…

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.