I'm making a parallel/series switcher for two lithium ion cells because I can only charge them in parallel, but my project requires 7.5v. I'm using NPN transistors as switches, controlled by Arduino to switch between charging and discharging. The analog pins are used because all of the other pins on my Arduino are being used by a motor shield. The analog pins would be set to output.
During charging Q1 and Q2 would be saturated, and Q3 would be cut off. Vice versa for discharging.
Also- Ignore the connection between R1 and battery negative, imagine R1 is going to Arduino ground instead.
I don't think you get how transistors work. To turn on a transistor the base must be higher than the emitter by at least 0.7V. If you power your arduino from the resulting voltage it will only be getting one battery's worth of voltage in the so called parallel mode. When switched to seriese the output of the outputs is at most 5V and will not control the transistor.
Basically I think what you are trying to do is impossible and also unwise. Are you sure you can charge batteries in parallel? What makes them shair the charging current evenly?
Yes except when they are in the parallel mode you will effectively pull the rug from your arduino leaving it short of voltage. I don't know what you are trying to do with your project but I would suggest looking at using only one battery and a DC to DC converter to get you to 5V or what ever voltage you want.