I am running a battery powered device, and would like my microcontroller (PIC) to report on the supply voltage.
This is so I can determine how many batteries is used in the supply, and also the state of charge of the battery pack.
Supply voltage ranges from 4xD (either 1.2V nominal NiMH or 1.5V Alkalines making about 6V) to 12xAA (1.2V NiMH for 14.4V or 1.5V Alkaline for 18V).
My PIC is running off a regulated 5V supply.
I plan to use one of the ADC ports to measure the voltage, and therefore believe I should map the 18V f.s.d. to the range 0-5V, so roughly I'd need to divide the input voltage by 3.
I've heard of using a resistor voltage divider, but know that it can be wasteful in terms of energy consumed.
Wondering if there is a better way to achieve this voltage division without too much energy loss/wastage?
Thanks.
No comments:
Post a Comment