Every good 'bot should measure it's power levels and beam them home in a telemetry stream. I really did want to keep track of my main batteries but I might have gone a little overboard when I tossed in measurement of power within the RPi and on the 5v Bus of the Explorer PCB. There are a number of really good articles on the web that I used for this endeavor so I will start with them:
Voltage Divider - The Arduino can only measure a range to 5v so dividing a larger source is a must and this article is a good one for some help.
Secret Arduino Voltmeter - Describes how to use the Arduino's reference voltage to adjust to variations in the input voltage that is driving your board. The code provided by this example is now behind the method referenceVoltage in my interface library. I will talk about this in my next post.
My main battery pack is six AA cells so my input voltage will be somewhere around 7.2 volts (1.2v x 6 cells). This is clearly above the 5v maximum for the Arduino so we need this voltage divider!
For this demo I am using two resistors of 4.6k each. This will divide the voltage in half (for more on how this works please see the article referenced above. I am not sure where the break points are but two low and you burn more power than you should and two high your accuracy suffers to the point of the Arduino not being able to get a reading.
The batteries are connected to the breadboard power bus outside of the camera frame.
The two resistors bridge the power bus to where I am taking my reading of the divided power.
The input is 7.92 and the output is 3.96. As near as I can tell that is a pretty good division by two!