Hi,
i would like to switch between 2 batteries using n-channel mosfets. i was thinking of connecting the pluses from both batteries and interrupting the negative of each battery. I'm possibly switching around 134v so i need a solution which the mosfets can do it and wont blow up. im hoping to have a device which i can plug in lithium ion batteries and switch between them when one of them gets low without ever putting them in parallel with each other. for my electric bike. i have a esp32 hooked up to the circuit to switch the mosfets. all of this powered from the batteries i have made a schematic but it has problems.

This circuit switches batteries which have 35v and 36v absolutely fine. and i can even draw a load from them none of the mosfets get hot or warm.
PROBLEMS WITH THE CIRCUIT:
when everything switched off (low gpio signal) but mcu still powered. if 36v is connected in P2 circuit turns on, 0v on the outputs. 0v gate-source voltage. if 36v is connected to P1 circuit remains turned off and nothing happens. if 51v connected to P2 circuit turns on, 0v gate-source voltage for both sets of MOSFET. however, there's 6v on the output. additionally if 36v connected to P1 and 51v to P2 the same 6v remains.
If Q1 and Q2 are on and i connect 51v to P2 i get 51v on output, nothing gets hot. if i then connect 36v on P1 which is off Q4 and Q3 start to get hot and explode. Gate-Source is 0.5v on Q4 and Q3.
COMPONENTS:
OK1, OK2: TLP785
Q1, Q2, Q3, Q4: NCEP85T14 (will be changed for final product to support 134v)
MCU: ESP32
U3, U2: Dc to dc generic buck converter 190~12
U1: Dc to dc generic buck converter 30-5
Q&A:
1) why you don't want to connect the batteries in parallel?
Because i want to have 2 batteries connected together that automatically can be switched. probably even different voltage lithium-ion batteries altogether.
2) How much current will you be drawing from 134V supply?
I will be running around close to 20A however, i will add lots of parallel fets in the final design so that it could handle more current since i might want to deploy these on lower voltage circuits too.
3) I don't understand the dual N channel MOSFET thing with the MOSFETs in series like that, connected drain to drain, I can't see what that is means to achieve, or how it can work.
i put them in series like that because of the body diodes. before the circuit was non-functional if both Q4 & Q1 drains were connected together. With only one mosfet on each line, i was getting current flowing somewhere. Then i put diodes in to prevent that, but they got hot. So the dual mosfets have their body diodes in opposite directions, so if the mosfets were off, they were really off, with nothing flowing through the body diodes.
Credits:
ShermanP: for designing the circuit
PerryBebbington: For an explanation of the circuit.
Head over to Arduino forums to find them.
i would like to switch between 2 batteries using n-channel mosfets. i was thinking of connecting the pluses from both batteries and interrupting the negative of each battery. I'm possibly switching around 134v so i need a solution which the mosfets can do it and wont blow up. im hoping to have a device which i can plug in lithium ion batteries and switch between them when one of them gets low without ever putting them in parallel with each other. for my electric bike. i have a esp32 hooked up to the circuit to switch the mosfets. all of this powered from the batteries i have made a schematic but it has problems.

This circuit switches batteries which have 35v and 36v absolutely fine. and i can even draw a load from them none of the mosfets get hot or warm.
PROBLEMS WITH THE CIRCUIT:
when everything switched off (low gpio signal) but mcu still powered. if 36v is connected in P2 circuit turns on, 0v on the outputs. 0v gate-source voltage. if 36v is connected to P1 circuit remains turned off and nothing happens. if 51v connected to P2 circuit turns on, 0v gate-source voltage for both sets of MOSFET. however, there's 6v on the output. additionally if 36v connected to P1 and 51v to P2 the same 6v remains.
If Q1 and Q2 are on and i connect 51v to P2 i get 51v on output, nothing gets hot. if i then connect 36v on P1 which is off Q4 and Q3 start to get hot and explode. Gate-Source is 0.5v on Q4 and Q3.
COMPONENTS:
OK1, OK2: TLP785
Q1, Q2, Q3, Q4: NCEP85T14 (will be changed for final product to support 134v)
MCU: ESP32
U3, U2: Dc to dc generic buck converter 190~12
U1: Dc to dc generic buck converter 30-5
Q&A:
1) why you don't want to connect the batteries in parallel?
Because i want to have 2 batteries connected together that automatically can be switched. probably even different voltage lithium-ion batteries altogether.
2) How much current will you be drawing from 134V supply?
I will be running around close to 20A however, i will add lots of parallel fets in the final design so that it could handle more current since i might want to deploy these on lower voltage circuits too.
3) I don't understand the dual N channel MOSFET thing with the MOSFETs in series like that, connected drain to drain, I can't see what that is means to achieve, or how it can work.
i put them in series like that because of the body diodes. before the circuit was non-functional if both Q4 & Q1 drains were connected together. With only one mosfet on each line, i was getting current flowing somewhere. Then i put diodes in to prevent that, but they got hot. So the dual mosfets have their body diodes in opposite directions, so if the mosfets were off, they were really off, with nothing flowing through the body diodes.
Credits:
ShermanP: for designing the circuit
PerryBebbington: For an explanation of the circuit.
Head over to Arduino forums to find them.