I am building a battery powered device. Almost all of my logic is running at 3.3v, although I do have a 5v supply for a few hobby servos.
I want to measure the battery voltage, but I can't do so directly with the ADC on my controller because the battery voltage (depending on the cell count of the lithium polymer battery that the user connects to the device) can vary between 6 and 36 volts. (My 5V and 3.3V supplies are fine with this input variation already.) The ADC can't measure anything above its supply voltage.
Obviously I need some sort of amplifier with a fractional gain, about 1/12 or so. Should I just use a simple voltage divider? How do I decide what values to use? Maximizing sleep-mode battery life is a concern, so that votes for using large values. What constrains how large those values can be? (The input impedance of the ADC, right?)
Am I better off using some sort of opamp amplifier circuit for some reason?
What's the usual solution here?