Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

How to detect low battery within AVR

If you power your electronic device from battery, you probably want to have feature that tells when battery is running low. For rechargeable batteries it is crucial to know when voltage is nearing to threshold when lower drop would damage battery itself. Say LiPo batteries cannot be discharged lower than 3.0V. Josh have went through this problem by analyzing low battery indication options. He says that small circuit built around MCP65R46 can be good choice where voltage is simply compared to reference inside chip, but problem is that in that case you need additional components. Also such circuits draw a bit of current to work.

AVR_low_battery

So he thought that in microcontroller based circuits you can get away without using any circuit and still have same functionality if not better. The fact is that AVR microcontroller is equipped with internal 1.1V bandgap voltage reference. The thing is that this voltage can be sampled with ADC against VCC or VREF voltage. So he suggest take VCC voltage as reference and measure bandgap voltage as unknown voltage. Then by applying simple formula calculate actual VCC. Once you have this voltage level, it is up to you how you indicate this – with LED, output on LCD. If you want to be precise, you should know that internal reference voltage can vary from chip to chip. So you need to test it against known VCC and then use calibration to get close values to truth.

[..Source link..]

Bookmark the permalink.

Leave a Reply