I'm trying to make a simple passive battery balancing circuit using logic level n-mosfet driven by MCU. However, I've got some issue on how to drive the mosfets by the digital output of the mcu, and also having isolation between mcu ground and the source legs of the mosfet. Otherwise, in the case of the following circuit, the 2nd battery would be short circuited.
Looking forward to hear your thoughts or maybe another alternative to drive the mosfet. I was thinking to use optocoupler, but then I need another isolated supply. Thanks