raspberry pi robot, arduino for solar charging question

hi,
i´m going to build an 4wd robot with a raspberry pi and i want to usa a solar charging circuit to power it up.
my idea is to use an arduino, a solar panel and one 4s lipo or 2 x 2s lipos.

my thougts are:

use the arduino and some add on circuit to charge 2 cells of the 4s (or one 2s lipo) and the other 2 cells for (or the other 2s lipo)
the power supply for the raspberry pi and the arduino (i have a pirocon shield for it, so 7,4V input shoult be fine).
when the 2 cells are fully charged i want to switch automatical to the other 2 cells for charging and the full 2 cells are now used for power supply.

maybe i need a third battery for the switching process.

is it possible to build something like that with an arduino and if yes, what add on cicuits an things do i need?

thanks
flo

hope you understand my question, my english is not that good... sorry for that.

Good luck with your project. I think you'll be spending far more time charging than running - have you any idea how power hungry the Pi is?

Anyway, that aside, what you want to be looking at really is various combinations of comparators and P-channel MOSFETs. Take a look at the Arduino's power circuitry (part of the main schematic) and you will see how it deals with the seamless switching of power between the VIN and USB ports by using a comparator to check the incoming voltage levels and use that to switch on/off a P-channel MOSFET. Expanding on that circuit you could make basically a 2-way digitally controlled switch which would have either one or the other battery subsystem providing power to the main system. Any brief dropouts should be easily compensated for with decent sized reservoir capacitor on the post-switch side.

One other thing I would note is that Lithium Ion batteries and solar charging don't always sit well together. Li-Ion is quite fussy about voltage and current levels during its charge sequence (you do know about charging them, right?), and solar power can't really provide the right levels of power stability to keep them happy. Personally I'd think about investigating a 2-stage charge system where the solar panels first charge some Ni-Cd or Ni-Mh batteries (which are much less fussy) and then those batteries, when charged, dump their charge into the Li-Ion batteries. It all adds more bulk, yes, but the Li-Ion batteries will last longer.