So I have a 3s 800mAh that I would like to use to power my arduino uno, but at the same time I would like to use one of the analog pins to monitor the voltage. Is this possible? Also, I know the maximum current the arduino input can handle is 40 mA and I'm scared that hooking it up will fry my board. Is there a way I can calculate how much current will flow through if I connect a fully powered lipo at 12.6V to my Uno (would Ohm's law be the right track? If there is a resistance value for the Arduino's input?).
Thanks in advance for all the help.
The analog input resistance is very high (about 100M Ohm) and so current flowing into the input pin is insignificant. The problem however is that when voltage exceeds about 5.3V, a protective diode opens and will connect your input directly (zero Ohm) to 5V. This will more than likely damage your Arduino microcontroller when connected to a 12.6V battery and so you must avoid this.
A common solution is to use a voltage divider. Two resistors in series from battery plus to ground are used to drop the center point voltage to within the 5V range.
Another solution is to use a zener diode (use 8.2V for a 3S lipo) connected from battery plus to a 1k resistor to ground. This will drop the center point voltage to about 4.4V for a fully charged battery and give a better dynamic range than is possible with a resistor/resistor divider.
Avoid using a pot as a voltage divider (other than for lab testing). The wiper on these devices typically rely on mechanical contact and are susceptible to failure.