Controlling two or more batteries with different voltages