Monitoring Battery Voltage?

Has anyone tried feeding VBAT into an ADC input to monitor battery voltage? Since the two ADC inputs are hardwired to VCC, it would require some creative wiring to some VBAT accessible inputs, as well as a voltage divider to protect the ADC. Anything else I should look out for?


I have no idea what you mean by “Since the two ADC inputs are hardwired to Vcc”. In general, you can feed a fraction of VBAT to the ADC; just make sure that the output of your divider stays below 5V. If you’re operating under 10 V, something like two 4.7k resistors should be good. You might want to use 1% resistors, or at least measure them or calibrate your readings using a voltmeter you trust.

- Jan

Thanks for the advice. What I meant about the ADCs is, if I’m reading the Orangutan quick-start sheet correctly, both ADC6 and ADC7 are listed as “always VCC on power pin”. So if I wanted to measure VBAT with one of them, I’d have to run a wire from one of the other ports that can be jumpered to VBAT.

Ah, I think I misread the schematic. I originally thought only ADC6 and ADC7 were useable ADC ports, but now I see that all of PORTC can be ADC input.