So, I’m putting together a rover that’s going to have four batteries in it. two 6v packs for each an arduino + two 422 servos and one for a camera and two 12v packs for each a wireless router and a sabortooth. This rover is going to serve a webpage through which you can drive the robot and view the camera feed. I’d like for the webpage to also display battery information using the arduino’s analog inputs. I know that connecting anything greater than 5v to an arduino pin is is bad for its health so how would I measure the 6 and 12 volt batteries?
Use a couple of resistors to form a voltage divider circuit: en.wikipedia.org/wiki/Voltage_divider
There are 2 setup on the Botboarduino for each of the votage inputs. Look at #11 in the UG for where the jumpers are for this. You can see this in the schematic toward the top center. We use a 4:1 circut, so 12V going in will give us 3v at the pin.
Kurt
at what voltages are the batteries considered “Low”? Is there any way to measure the remaining mAh of the batteries while they’re discharging in the robot?
Well, one way you could do it is measure the current coming from the batts (with a little more hardware mind you) and then you can do some math with that to get your mah used. As for measuring remaining in a battery, that’s tough because it can vary from charge to charge. You also can’t neccesarily rely on a voltage measurement to infer remaining capacity because the voltage of the batts will dip when they are under load, so you’d see the voltage (and anything you are inferring from that) bouncing all over the place depending on what the bot is doing.