Seamlessly switching between batteries

ScottWang

Joined Aug 23, 2012
7,409
Why, sure. That is exactly what I'd like to do. But here's a recap of how the circuit is supposed to work:
  1. Bank B should be used before Bank A. That is, Bank B can be considered as the main battery bank, and Bank A as the reserve battery bank.
  2. Bank A only kicks in when Bank B is disconnected
  3. Bank B provides all power while it is connected
  4. Measurement of Bank A should be possible regardless of Bank B's connection state.

Then again, here's a thought. Maybe it is best if Bank A's connection state can also be controlled by the MCU. This because Bank B will eventually discharge to an unpractical level, but won't let Bank A go active (according to my circuit in post #55) until it is disconnected.

So the following circuit should let the MCU switch to Bank A when Bank B has discharged to an unacceptable level:

This circuit allows the MCU to enable Bank A for measurement purposes, and keep it enabled if it meets programmed criteria. I know it has a lot of parts in it, but (unless I'm mistaken) it does exactly what I want it to do.

What do you think?

EDIT: I've just corrected a fatal flaw in my original schematic, having to do with Q3 and Q5 connection to ground.
EDIT: Batteries polarity orientation corrected.
The polarity of the batteries are ok?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
Indeed. I submit this as evidence in the case for my preference of "primitive" solutions like the latching relay.
In retrospect, your latching relay proposal was indeed practical and simple. At least when compared with my own solution. But I have to admit that I have a strong bias towards solid state.

I've had enough experience with relay contacts working at low voltages to know that they'll start giving you trouble after a year and a half or so when working in humid environments.

Somehow the contacts' surface becomes coated with a very thin layer of oxide and begin to conduct unreliably.
 

strantor

Joined Oct 3, 2010
6,798
I've had enough experience with relay contacts working at low voltages to know that they'll start giving you trouble after a year and a half or so when working in humid environments.

Somehow the contacts' surface becomes coated with a very thin layer of oxide and begin to conduct unreliably.
What kind of relays gave you this trouble? The old clear-case ice cube or octal control relays? Those aren't sealed. They even get fine dust inside in dusty environments. Have you experienced the same with hermetically sealed relays?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
The old clear-case ice cube or octal control relays?
those type exactly ... and yes, they're note hermetically sealed ... but it's not just my mistrust of their hermeticity (or of their contacts conductance) that makes me prefer solid state. It's also their sluggish response and their power draw when changing states.
 

crutschow

Joined Mar 14, 2008
34,470
I've had enough experience with relay contacts working at low voltages to know that they'll start giving you trouble after a year and a half or so when working in humid environments.

Somehow the contacts' surface becomes coated with a very thin layer of oxide and begin to conduct unreliably.
To avoid that you need to use small signal relays which typically have gold plated contacts to avoid corrosion and the high contact resistance you saw.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
Revisiting this project, here's my latest version. It's identical to the one at post #57 but I'm posting it here again to avoid going back and forth between messages to have a look.

1680699224381.png

Here's my boggle:
- R1 is there to switch on both Q1 and Q6 when battery bank B is disconnected (its connector is represented by the contacts listed as S1 to S4)
- Since power draw is critical in this application, I assigned it a value of 6M, which *should* be enough to turn said transistors on.
- The problem I see is that the circuit will work just fine when battery bank B is connected, because it will immediately take over battery bank A. Effectively switching Q1 and Q6 off. BUT it will not work so well when bank B is disconnected because Q1 and Q6's gates will again be pulled high through R1. And at 6M this will surely take a while. So what will happen is that my circuit (the MCU) will briefly lose power and become reset.

Question: Is there a better way to drive Q1 and Q6 so that bank switchover is effected much more quickly and glitch-free (I'm already visualizing serious transients during the act of connection and disconnection) while keeping power draw during normal operation to a minimum?

EDIT: C1 is there to supposedly mitigate transients between switchovers. But I'd like to get rid of that as well because its internal resistance will also draw some power during normal operation.
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,170
You could make it necessary to activate a switch in order to remove the battery so the switching would happen before it is disconnected. It could be a switch on the battery compartment door, or a latch that prevents battery removal, or something related to unlocking the connector, but as long as the user had to do something mechanically interlocked with physical removal, you should be all set.
 

drjohsmith

Joined Dec 13, 2021
852
Revisiting this project, here's my latest version. It's identical to the one at post #57 but I'm posting it here again to avoid going back and forth between messages to have a look.


Here's my boggle:
- R1 is there to switch on both Q1 and Q6 when battery bank B is disconnected (its connector is represented by the contacts listed as S1 to S4)
- Since power draw is critical in this application, I assigned it a value of 6M, which *should* be enough to turn said transistors on.
- The problem I see is that the circuit will work just fine when battery bank B is connected, because it will immediately take over battery bank A. Effectively switching Q1 and Q6 off. BUT it will not work so well when bank B is disconnected because Q1 and Q6's gates will again be pulled high through R1. And at 6M this will surely take a while. So what will happen is that my circuit (the MCU) will briefly lose power and become reset.

Question: Is there a better way to drive Q1 and Q6 so that bank switchover is effected much more quickly and glitch-free (I'm already visualizing serious transients during the act of connection and disconnection) while keeping power draw during normal operation to a minimum?

EDIT: C1 is there to supposedly mitigate transients between switchovers. But I'd like to get rid of that as well because its internal resistance will also draw some power during normal operation.
Can you remind us why you want this "split" power arrangement,
it would be usual to supply just the 16 volts to the unit, and then use a simple DC:DC the 16v to 3v3, and isolating the 3v3 from the transients,

e.g. https://www.analog.com/en/products/maxm17632.html

and then ideal diodes/ controller

https://www.analog.com/en/products/ltc4357.html

will lower your losses, and probably your costs,
certainly the board will be a lot smaller,
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
Well, it turns out that my worries were much ado about nothing ... I found out that the circuit's big fat cap (470µF@16V) can keep the circuit alive for more than 5 seconds if all power is removed. That gives plenty of time for the gates of Q1 and Q6 to fully charge up... so bank switching is being done easily and glitch-free :)
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
Hello, people ... I just thought that the least I can do now is have the courtesy of informing everyone that the circuit is performing exactly as wanted and expected, and it's saving me lots and lots of headaches. Not to mention the huge advantage that's given the device that it's currently running on.

I could've never been able to come up with a solution (well, maybe I could have ... but it would've taken me the hell of a lot longer) if it weren't for everyone that got involved and helped me in this thread. So, many many thanks to all.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,257
Update:

Thanks to the help provided by the generous members of this forum in another thread, I was able to use all of the series connected batteries in the banks without splitting them into two voltages. That is, the 6.4V output voltage no longer exists in the diagram, which now looks like this:

1686676831514.png

Quick question, Q1 and Q6 are now being pulled high to 16V through R1. Unfortunately, the nFets that I'm using state that their gates work in the ±8V range. Would 16V damage the transistors even if the gates are being pulled high by a very high impedance resistor? (10 Megs) ?
 
Top