Monitoring and Charging Multiple Batteries

Solar panels ?

Your problem is not a particularly simple one. If I was going to tackle this problem, I'd first decide
what sort of battery I was going to use. I'd probably then build a battery charger with another
arduino in it, to monitor the charging process in terms of voltage and current limits to charge
the battery, driven from the mains power. You could use the same device to charge your
12 V power battery and also what ever lower voltage source you use to drive the electronics.