Suppose I have a circuit that draws its power from a LiPo Battery. I would like to know how much power the battery still has in it. Ideally a circuit of power level to voltage will be best .. this way I can connect the output of that circuit to a ADC input in my Arduino.
To be honest, if you manage to find a way to do this reliably, just measuring the voltage, and patent it, then you will never have to work again. The available energy left in a battery is loosely related to the terminal voltage but also depends on the battery temperature.
A common method of determining the battery charge state is to use a coulomb counter to count the charge going into and out of the cell. This gives a better estimate of the charge state of the battery, although the actual energy available is still temperature dependant. At low temperatures the battery capacity can be less than 50% of the nominal. An example device is the ST STC3100. This uses an I2C interface to communicate with the processor. The coulomb counting is performed by integrating the current in and out of the cell over the charge/discharge cycle. If you know when the battery is full then you can estimate the amount of charge that has been used.
The big problem is that the output voltage stays fairly flat for most of the time. So, unless you have a really good A/D, you can't monitor it directly. That is why laptops and such tend to use clocks to measure the remaining power.
It's pretty easy to find the graphs if you search for "battery discharge curve"
What I am doing right now on a big battery consisting of a lot of Lipo cells is the following. I first charge it up (see datasheet of the cells for maximum voltage). Next I will drain the battery with a big resistor whilst using a current clamp connected to a scope as well as measuring the battery voltage. There is a power supply in parallel with the battery rated at the cutoff voltage for the battery so I can leave the setup to drain the battery right up till the point where it is not recommended to go further. With the scope(some Fluke, don't know the model) I can record the current over time, and thus determine the capacity. When the capacity is determined I am going to log the current and voltage constantly when it is in use, and thus I can more accurately find the charge left. But this setup will be monitored by a fancy industrial computer so I am not sure if that is the best way to go about at home.
These answers are too good.
I discover commercial solution are cheaper.
At your lab, if you can measure the load of the device, you don't need to put any charge meter inside it.
For example : a simple power load schema
state load -------------------- standy 0.1 A full on 1 A
If the Arduino commands the two states - or can read them, a digital data - bingo.
Arduino times them and add to these two counters : time in standby, time full on.
Easy math to calculate how much juice your device had suck form the battery.