Diode bypass

Thread Starter

eb_12345

Joined Jan 26, 2024
16
Hey all. I'm working on a battery hot-swap circuit right now and in my design I have a Schottky diode In series with each battery, which are in parallel. But, once the hot-swap has occurred and only one (fully charged) battery remains in the circuit, I'm hoping to bypass the diode so as to avoid the voltage drop that it causes. Is there a simple way to do this with switches or maybe even a logic gate that bypasses the diode only once the second battery is removed? Any help is greatly appreciated
 

crutschow

Joined Mar 14, 2008
34,386
Certainly a manual operated switch could bypass the diode.

Or do you want the procedure to be automatic?
In that case, you could use a relay.
 

Thread Starter

eb_12345

Joined Jan 26, 2024
16
Certainly a manual operated switch could bypass the diode.

Or do you want the procedure to be automatic?
In that case, you could use a relay.
circuit-3.png
Would something like this work? When the switch is open the current would flow through the diode. Then once the swap has occurred the switch would be closed providing a path of lower resistance for the current to flow, bypassing the diode. Here I have a resistor acting as my load drawing .25Amps.

It would be great to automate the process, however, in which case an automatic process would work. Is there any risk of ambient RFI being produced with relays? Our equipment is pretty sensitive.
 

MisterBill2

Joined Jan 23, 2018
18,388
If this is the same circuit where the goal was to avoid data loss while changing batteries, then operating the switches should not be a big deal.Automating the process to allow the incompetent the is another problem.
 

crutschow

Joined Mar 14, 2008
34,386
It would be great to automate the process, however, in which case an automatic process would work. Is there any risk of ambient RFI being produced with relays?
They can produce a small amount from the inductive coil kick during their turnoff, but that is mostly suppressed by placing diode across their coil (cathode to positive).

It's also possible to go to a fully semiconductor circuit that would generate no significant RFI.
I can post a circuit for that, if you are interested.

What's the maximum voltage difference between the two batteries when they are swapped?
What's the maximum load current?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,388
In the original post I thought that this was batteries in an airborn device, and in that case excess weight cuts flight time. And there is no way to add relays without wasting battery charge and risking a serious failure.
 

crutschow

Joined Mar 14, 2008
34,386
In the original post I thought that this was batteries in an airborn device, and in that case excess weight cuts flight time. And there is no way to add relays without wasting battery charge and risking a serious failure.
I see no mention of that, but a solid-state approach would work, if minimum weight is needed.
I have a couple of approaches that use just two P-MOSFETs with a few other parts.
Which approach to use is determined by the maximum difference in the two battery voltages when the swap is made.
 
Last edited:

Thread Starter

eb_12345

Joined Jan 26, 2024
16
If this is the same circuit where the goal was to avoid data loss while changing batteries, then operating the switches should not be a big deal.Automating the process to allow the incompetent the is another problem.
It is in fact the same circuit. I think the switches are easy but I might want to automate it so it's totally idiot proof.
 

Thread Starter

eb_12345

Joined Jan 26, 2024
16
I see no mention of that, but a solid-state approach would work, if minimum weight is needed.
I have a couple of approaches that use just two P-MOSFETs with a few other parts.
Which approach to use is determined by the maximum difference in the two battery voltages when the swap is made.
Like MisterBill said this system is onboard a drone so limiting the weight is critical. The component I am powering draws .25 Amps at 12 Volts. I think I plan to use an around 14.4V battery and use a voltage regulator to drop it down to 12V. Therefore, I'd guess at max charge the voltage will probably be around 16V and drop down to 14V once depleted so a voltage difference of around 2 Volts.
 

crutschow

Joined Mar 14, 2008
34,386
So below is a very simple hot-swap circuit (seems almost too simple to work) that uses two P-MOSFETS with two resistors as ideal diodes, (requires no specialized IC) to isolate the two batteries during the swap while minimizing the voltage drop that using regular diodes for this purpose would have.

The LTspice simulation below of the circuit is shown for swapping between two batteries.
When both batteries are connected during the swap (at 0.5 sec of the sim), both MOSFET’s gates go high, turning M2 off (M1 may be on or off, depending upon the MOSFET’s Vgs threshold voltage and the relative battery voltages, but that makes no significant difference).
The current from the higher voltage of charged Bat1 then goes through M1 (its substrate diode if it’s off), while M2’s substrate diode blocks any current into the lower voltage Bat2.
(Note that the Bat2’s current (blue trace) goes to zero as soon as the charged Bat1 is connected.)

After the discharged battery is removed (at 1s), the opposite MOSFET’s gate voltage goes to ground, which turns it fully on to give a very low drop from the charged battery to the output (red trace), equal to the MOSFET on-resistance times the load current.

So the circuit is totally automatic in operation and requires no particular procedure to swap the batteries, other then the obvious of connecting the charged battery before you remove the discharged one.

The MOSFETs should be selected for an on-resistance that dissipates less than a watt for the maximum equipment operating current, so a heat-sink would not be required.

If it would be okay to control the negative side of the batteries instead of the positive (which is likely for most applications), then N-MOSFETs could be used, since they generally have a lower on-resistance as compared to P-MOSFETs for a given chip size and are thus somewhat cheaper.

If the battery voltage is below 10V, use logic-level MOSFETs (max. Vgs threshold <2V).

The circuit can be built on a small perf board and should be very light weight.
Make sure the MOSFETs are correctly orientated with their drains connected to the batteries.

image
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,388
OK, it seems that the circuit would work. BUT if such unqualified individuals are going to be doing the task, it will only be a matter of time before one simply unplugs the used battery first, and then plugs in the fresh pack.
There are some problems that can not be solved with hardware
 

crutschow

Joined Mar 14, 2008
34,386
OK, it seems that the circuit would work.
Appreciate the enthusiastic support. :rolleyes:
BUT if such unqualified individuals are going to be doing the task, it will only be a matter of time before one simply unplugs the used battery first, and then plugs in the fresh pack.
Well hopefully this "unqualified individual" will not be stupid enough to do it twice.
 

MisterBill2

Joined Jan 23, 2018
18,388
Appreciate the enthusiastic support. :rolleyes:
Well hopefully this "unqualified individual" will not be stupid enough to do it twice.
I would point out, at the risk of being quite Politically Incorrect, that what has been proven many times, beyond a doubt, is that: "You Can't Fix Stupid!"
I did not say it first, but I have become convinced of the truth of the statement.
AND, this is not directed at any specific individual who has ever posted here, lest i be accused of being rude.
 

Thread Starter

eb_12345

Joined Jan 26, 2024
16
So below is a very simple hot-swap circuit (seems almost too simple to work) that uses two P-MOSFETS with two resistors as ideal diodes, (requires no specialized IC) to isolate the two batteries during the swap while minimizing the voltage drop that using regular diodes for this purpose would have.

The LTspice simulation below of the circuit is shown for swapping between two batteries.
When both batteries are connected during the swap (at 0.5 sec of the sim), both MOSFET’s gates go high, turning M2 off (M1 may be on or off, depending upon the MOSFET’s Vgs threshold voltage and the relative battery voltages, but that makes no significant difference).
The current from the higher voltage of charged Bat1 then goes through M1 (its substrate diode if it’s off), while M2’s substrate diode blocks any current into the lower voltage Bat2.
(Note that the Bat2’s current (blue trace) goes to zero as soon as the charged Bat1 is connected.)

After the discharged battery is removed (at 1s), the opposite MOSFET’s gate voltage goes to ground, which turns it fully on to give a very low drop from the charged battery to the output (red trace), equal to the MOSFET on-resistance times the load current.

So the circuit is totally automatic in operation and requires no particular procedure to swap the batteries, other then the obvious of connecting the charged battery before you remove the discharged one.

The MOSFETs should be selected for an on-resistance that dissipates less than a watt for the maximum equipment operating current, so a heat-sink would not be required.

If it would be okay to control the negative side of the batteries instead of the positive (which is likely for most applications), then N-MOSFETs could be used, since they generally have a lower on-resistance as compared to P-MOSFETs for a given chip size and are thus somewhat cheaper.

If the battery voltage is below 10V, use logic-level MOSFETs (max. Vgs threshold <2V).

The circuit can be built on a small perf board and should be very light weight.
Make sure the MOSFETs are correctly orientated with their drains connected to the batteries.

image
Wow looks great I'll have to prototype it and see If it works out!

One quick question: The capacitor in front of the of load is just used to stabilize voltage and power flow during the swap correct? Is there a reason you landed on 100 micro farad or is that a standard capacitor?
 

crutschow

Joined Mar 14, 2008
34,386
I'll have to prototype it and see If it works out!
Great. Let us know the results.
The capacitor in front of the of load is just used to stabilize voltage and power flow during the swap correct? Is there a reason you landed on 100 micro farad or is that a standard capacitor?
Yes, its to smooth any possible glitches during the swap, and may not be needed.
Its value is arbitrary. 100µF is just a standard, convenient value for an electrolytic capacitor.
 

Thread Starter

eb_12345

Joined Jan 26, 2024
16
Great. Let us know the results.
Yes, its to smooth any possible glitches during the swap, and may not be needed.
Its value is arbitrary. 100µF is just a standard, convenient value for an electrolytic capacitor.
I'm coming back to this project after working on other things for a while. Could you briefly explain what the resistors attached to the drains of the MOSFETs are doing. I haven't used MOSFETs before so still learning some of the basics
 

crutschow

Joined Mar 14, 2008
34,386
what the resistors attached to the drains of the MOSFETs are doing.
They are to pull the P-MOSFET gate low and turn it on when the opposite battery is removed.
The P-MOSFET is on when its source is at the battery voltage, and the gate is at ground potential (a Vgs negative voltage turns a P-MOSFET on).
 
Last edited:

Thread Starter

eb_12345

Joined Jan 26, 2024
16
They are to pull the P-MOSFET gate low and turn it on when the opposite battery is removed.
The P-MOSFET is on when its source is at the battery voltage, and the gate is at ground potential (a Vgs negative voltage turns a P-MOSFET on).
I know this is a bit of a late question but I know that the battery needs to be connected to the drain so that the M2 substrate diode blocks the current from the higher voltage Bat1 going into the lower voltage Bat2. I also know that in order for the P-MOSFET to turn off and on the Vgs needs to be greater than 0 or less than 0 respectively. However, I'm not sure I understand how this is controlled if the drain is connected to the battery, and not the source. Before the swap, is the source controlled because the current can flow through a path other than the MOSFET so that the source is then at the voltage of Bat2?
 

crutschow

Joined Mar 14, 2008
34,386
I'm not sure I understand how this is controlled if the drain is connected to the battery
A MOSFET can have either terminal act as the source, depending upon the relative voltages.
So when the gate is below both source and drain voltages by greater than the Vgs(th) value (for a P-MOSFET), then the current can flow in either direction.
 
Top