PIC analog to digital converter to measure more than one battery voltage (with different grounds)

I'm trying to build a circuit that can scale down several lipo batteries (5 cell) up to 22V max to be safe to either 3.3V or 5V for measuring with a PIC microcontroller using the analog to digital converter.

Now the problem is I have more than one battery for each motor and each battery is isolated from one another. There is no common ground between them.

Can someone offer some advice on how I can measure the voltage of these batteries using the PIC's ADC. Some form of voltage divider will of course be needed and suggestions on this are welcome.

My analog circuitry skills are extremely weak so please provide as much detail and or references. Any calculations would also be appreciated.

I'd like to ensure some level of filtering/isolation is present due to the LiPos obvious high current usage and noise of the motor.

PS: I know there are very cheap LED voltmeteres on ebay for this but I want to be able to send the sampled voltages back to a base in my project.

-
While Steven's answer is valid there are other completely different topologies. Possible problems with analog optocouplers are error level and cost. Look at the datasheet carefully. –  Olin Lathrop May 15 '12 at 11:53
@OlinLathrop by 'error level' do you mean added noise/inaccuracy? –  kenny May 15 '12 at 14:54
@Olin: doesn't "0.01% servo linearity" mean there shouldn't be error level problems? Especially at DC. –  Federico Russo May 15 '12 at 14:57
@Federico: Yes, 0.01% is very good. Many aren't that good. Watch the price though. Like I said, this is certainly one workable approach. My point is that there are also other completely different methods. –  Olin Lathrop May 15 '12 at 15:13
@Olin - I've seen several occasion where the user changed his mind and accepted a different answer. It happened to me to, in both directions. Besides, even if the question is a few days old a new answer would bump it, and it will attract new attention. This isn't a waste of time. I've had several old answers upvoted because the question was bumped when a new answer was added. People do seem to find it useful. I'm curious to see other solutions here, now there's just mine. –  stevenvh May 27 '12 at 8:35

If you can't connect the circuits an analog optocoupler like the IL300 may be useful:

The input and output remain separated, yet you have the analog value of the battery's level available to the ADC on the other side. The IL300 has an excellent 0.01% servo linearity.

(Vcc and ground left and right of the optocoupler are obviously different.)

transfer function
Opamp U1 will try to make its inverting input equal to $V_{IN}$, that's

$I_{P1} = \dfrac{V_{IN}}{R1}$

It controls $I_{P1}$ by varying the LED's current $I_F$, but we don't need this value in our calculation. Since the photodiodes are matched $I_{P1} = I_{P2}$, and the output of U2 is

$V_{OUT} = I_{P2} \times R2$

so that

$V_{OUT} = \dfrac{R2}{R1} \times V_{IN}$

So, even when R1 is drawn far away from U2 it plays a role for it. The circuit might not work if you choose R2 ten times larger than R1 and your input voltage is 2V.

edit
The short circuit current for the photodiodes is 70 µA. If Vin is for instance 1 V then R1 must be at least 15 kΩ to allow the opamps to get Vb also to 1 V. A value of 100 kΩ for R1 (and R2) will give you an input range of several volts.

-
Thankyou Thankyou Thankyou !!!! This is exactly what I need! –  Peter H May 15 '12 at 10:58
@olin I'm open to alternative solutions. –  Peter H May 27 '12 at 4:30
@Peter - I'm not sure Olin will be notified of your comment. I am, because it's my answer, but he hasn't commented here, and I think that's a requirement. If you didn't see the name hint while you were typing his name, he won't be told. His comment was a comment to your question, not to my answer. Maybe you should move your comment there. –  stevenvh May 27 '12 at 4:36
Thanks Steve, Just another question with regards to your solution. It's recommended to have operational amplifiers on both the left and right side of the IL300. Most amplifiers I know of require that the differential input voltage be lower than Vcc of the Op amp. The Lipos are connected to an esc which can provide regulated 5.75Volts. I can use this to power the left op-amp. Should I be building a resistor dividor to lower the lipo voltage then feed then feed this into the left op-amp which is powered by the 5.75V. Say a 1/10th dividor? What are your thoughts? –  Peter H May 27 '12 at 8:14
@Peter - Yes, a divider is advisable. I don't think many opamps can handle Vcc at their input. But why 1:10, and not 1:1? That will place the input voltage right in the middle, where you have the most headroom up and down. You'll need that especially if you're not using a Rail-to-Rail I/O opamp. –  stevenvh May 27 '12 at 8:19