Previously I made same scheme(attached) but with two relays and it worked pretty well.
Now I want to rebuild it with transistors (MOSFETs).
The main purpose as i mentioned in the subject is to switch battery connection type, from series, which I need to power my scheme, to parallel, for charging with USB. (Arduino will switch MOSFETs states.)
But I have some questions:
1: Is it okay to use M1 or should I use BJT npn to drive M2?
2: How to pull up M2 gate?
3: Will M3 be closed by default or I should use scheme like on the second attachment.
(M1,M4 - N-Chanel MOSFET ; M2, M3 - P- Chanel MOSFET)
Any answers will be appreciated, thanks for your time!
well, I'm not biggest pro here in hardware design nor I have patients to study your design, but changing parallel and series connection on batteries with mosfets looks so wrong... Especially if you are not familiar with mosfets. I would add multiple contact button (don't know how it called) to do that, cos if you make mistake in your code or batteries will become discharged enough fets can be activated, deactivated and mess your circuit up.
A power module which is showed on scheme 1 and control module which consist of arduino, shift registers, motor drivers, and other components. Basically circuit should get signal from radio and control 6 dc motors.
MorganS:
Use relays. It is truly the best way to do series running + parallel charging.
Better, safer and more efficient is to use a DC-DC converter to boost the USB voltage up to power a proper charge controller.
hammy:
Why not look at charging them in series ?
My PCB runs out of space so I need small components, so setup with boost converter and charge controller doesn't fit, and I think it will be more expensive then TP4056 and two relays. Although setup with MOSFETs will be more expensive then relay setup too, so I will return to relay scheme.
Trying to switch batteries with MOSFETs means doing the equivalent of SSRs, ie two back-to-back MOSFETs
for every switch position (the only way to allow current to flow either direction). IE 8 MOSFETs are needed to
replace a single DPDT relay...
Use a relay for this, perhaps latching relay is the best choice, but be careful about current - use fuses
where appropriate to protect the relay.
A single break-before-make DPDT relay is the correct way - this makes it physically impossible to short out either
of the batteries using the relay.