Electronic – arduino – How to replace a relay with a MOSFET Transistor

arduinomosfetsolid-state-relay

I have this working

schematic

simulate this circuit – Schematic created using CircuitLab

An Arduino commute both relays and a power adapter charge each battery at a time.

I would like to replace each relay by a MOSFET. How can I do that?

I think the solution bellow will not work because DRAIN is always connected to SOURCE and this will short circuit batteries. MOSFETS only isolate from SOURCE to DRAIN.

When the D9 is HIGH, D10 will be LOW so the power adapter will never be charging both batteries simultaneously.

schematic

simulate this circuit

Sorry for the messy schematic.

Thank you very much.

Best Answer

The schematic looks either too complicate or wrong to me. From my understanding, you charge or discharge the coil to make the mech relay work, same thing, you put High or Low voltage on the Gate terminal to make a MOSFET work.

So you can simply connect the emitter of your BJT(BJT can be controlled by your Arduino) to the gate of the N-MOSFET. When there is a High voltage (12V should be fine) on the gate, N-MOSFET act like a closed switch( PMOS work the opposite way). The power adapter should charge the battery.

schematic

simulate this circuit – Schematic created using CircuitLab

A SPST mech relay could use one NMOS, A SPDT mech relay could use a NMOS and a PMOS, try it to see if it works.