To charge 2 batterys in series

maybe should i put a switch beetween the 2 batterys ?
and think about switch-off when it's charging and switch-on when i use the robot.
Can i use a MOSFET as a switch to do this job ?