Back to Back Mosfet Problem (Bidirectional Power Switch)

Friends,

I have a 12v solar charge controller connected to a 12v lead acid battery, feeding power to a camera.

The point is i don´t need the camera running 24/7, so I am using an arduino to control two n-channel mosfets connected back to back as a bidirectional power switch (common source).

The idea behing this project is that i need to shut down the system at certain times, blocking both directions, in order for the system to stop draining the battery and also for the solar charger to stop sending current to the battery.

Everything works fine, except for the fact that when arduino feed the mosfet gates with 0V, (shutting of the system) current cannot reach the solar charge controller, however there is "some" current going back to the battery intermittently.

I did not draw in the diagram, but i have a bidirectional power monitor connected to the battery positive wire, so I know how much current is passing and the flow direction.

before using two mosfets, i had a regular relay working perfectly. For some reason the mosfets are not completely blocking current.

Any ideas why mosfet setup is not blocking everything? The schematic is attached to this message.

Are you trying to build this? I have an issue trying to follow your cartoon drawing but try this

The control voltage for the MOSFETs needs to be between gates and sources, and must float w.r.t. the circuit
being controlled. No connection between control circuit and either drain, and no common ground between
control circuit and controlled circuit.

Another issue, I assumed you were using P Channel high side due to the “P” on your picture but I just noticed it says IRF540 which are N channel MOSFETS. This won’t work well (if at all) at your voltage levels. You need MOSFETS that are designed to switch at whatever you’re using for supply voltage. Again suggest you learn to draw proper circuit diagrams, it will help you in the long run and will be immediately clear to us so we can help.

As drawn the circuit is p-channel and putting 20V across the gate oxide, I should have pointed out that is
too high, the indicated ZXM61P03F FET will probably be destroyed.

Normally a MOSFET switch like this uses a PV-opto-isolator for a fully floating gate control voltage, and you'd
only use n-channel FETs as they are superior in performance. This is the basis of a DC solid-state relay.

This circuit is relying on there being a bias voltage between the rails being switched and ground, but this can
only be feasible for a restricted range of voltages, those safe for driving a MOSFET (typically 12V or 5V for
logic level devices).

It could be adapted using 12V zener across gate and source and some resistance to drop the excess voltage.

Also for the solar charger to stop sending current to the battery.

I don't know anything about your charger, but if you arrange it so that, for a 6 cell lead acid battery, the output is 13V2 or less then there is no need to disconnect it. You can put 2V2 per cell all day long across a lead acid battery and it will take what it needs and stay charged up without over charging.

MarkT the bias values can be adjusted for source but it’s quite safe to set saturation point of NPN so you’re only getting 10v VGS or whatever you want. Vgs max is +-20 for that FET

As far as N Channel vs P Channel, there are advantages and disadvantages to both... PFET are harder to get to lower Rds due to the charge carrier in solid state. I prefer high side switching of power for a few reasons. But this circuit can be adapted for low side NMOS if needed. I have PMOS that have 1.2 mΩ Rds that will switch at 1.2V and good for -40V and can pass incredible amounts of current. We try to keep to the low cost components for hobby use... still not sure why Arduino packs with IRF540.

simulation with gate voltage - switched at 5V (less than -20V gate voltage) this is preferred to keep the circuit working for larger range of source voltage.

with biasing to reduce gate voltage if needed - notice approx -11V gate voltage by setting saturation current.

A BJT is in saturation if the base-collector junction is forward biased, so no you cannot change the
saturation voltage more than 0.6V strictly speaking.

A resistor-zener divider is the way to get the right voltages to the gate, not playing around trying to
set the bias of a BJT which is not temperature-stable anyway.

that's not how you saturate a BJT... you're thinking MOSFET which gets ohmic... BJT saturation can be set by the collector or emitter resistor or in our case RL. You set the saturation point so it's no longer tied to hFE. there are other tricks to getting it where you want it... but the point is moot.

The circuit is fine without this up to 20V as stated. Less parts is better.

You clearly don't know what saturation means for a BJT - MOSFET saturation is completely different definition BTW.

Saturation in a BJT is when the base-collector junction is forward biased, that's the definition(*), there is no way to vary this "point". Saturation is acheived by providing a high enough base current to achieve this, typically 5% to 10% of the collector current. In this regime the current amplification is dominated by carrier diffusion driven by concentration gradients, not by carrier drift due to electric fields.

https://ecetutorials.com/analog-electronics/operation-of-bjt/

The point most definitely is not moot, its very clear cut.

(*) and the emitter-base junction is also forward biased, just for completeness

Mark if you like I would be glad to discuss without taking over OP post. I’m sure you’ve seen this before. Sorry it’s the first one I found and may be a little busy with other interesting characteristics.

Which clearly defines the saturation region. You can set the saturation point of the circuit and the max and min gate voltage without relying on hFE.

The definition you have for saturation while it is correct has no bearing on our circuit. The saturation is set using RL.. hope that helps