Simple Battery / External Power Supply Automatic Switchover Circuit

Hi All,

Just wanted to share a simple little side project/modification I’ve been working on. I’ve got a little battery powered heat sealer, which works great but it sure does chew through the batteries and NiMHs don’t provide enough voltage.

My goal is to provide power from an external DC Power Supply, but I want to retain the ability to run it from batteries - I figure this is a pretty common situation for a lot of applications, so figured I’d share it here. With a bit of extra work you could throw on a charging circuit, adapt it for a LiPo and voila - an auto change-over circuit that charges your batteries while plugged in, and switches to battery power when disconnected. There are dedicated ICs for this, but I prefer the fully analogue approach, particularly because the parts are available locally.

I opened up the heat sealer and drew up the schematic:

A quick check with the multimeter showed the battery voltage drops from 9v down to ~7v when powered on. I ran the element from my lab supply set to 7v and it pulled about 2.2A. At 9v I nearly let the smoke out with 3.3A! It worked ok at 6v but wasn’t great.

So I’m going to need a supply capable of at least 15W and about 7v - not very common. I considered using a buck converter and just using a 12v plugpack, but there’s not enough space inside for the regulator, I’d still have the issue of possible reverse current through the batteries or the regulator, and it wouldn’t stop the batteries providing current while power was attached.

Often you can get away with just diodes on each line like graham showed here when you know the PSU voltage will always be higher than the battery voltage. The tricky part in my case is that both power sources overlap in voltage - the 6xAAs will range from ~5v when nearly flat and dumping current, to ~10v when fully charged, but I don’t want any significant current being pulled from the batteries if the PSU is connected - no matter what the battery voltage.

A relay was out of the question due to space limitations.

After a bit of mulling over it, I came up with this simple circuit modification: https://tinyurl.com/y5zq2dfl

The PSU diode serves a dual purpose - reverse current protection for the PSU, and it keeps the P channel MOSFET on when a PSU is not connected - else the battery would be bouncing between on and off or the MOSFET would be in its saturation region and limiting current significantly (and also getting very hot). The diode on the battery line is just to prevent reverse current through the batteries, while the 10k pull-down resistor means that as soon as V_psu is disconnected, the FET turns on and power is provided by the batteries.

Note that you don’t want a FET with a super low Gate Source Threshold voltage - in this case we want something with a threshold voltage more than the maximum difference between our batteries (~9.9v max) and our PSU (~7.5v). So we’re looking for a Vgs of > 2.5v, but less than the minimum supply voltage of ~5v. If the Vgs threshold voltage is less than this and our batteries will start to drain even with external power connected, too high and the batteries won’t be able to fully discharge.

If you were going to power electronics from something like this, it’d be a good idea to include a capacitor to smooth out the switchover transients. In my case I can get away with it, because the heating element is just a bit of wire so who cares if it has a bit of a voltage spick or dip.

Here are the parts I’m intending to use:

(These are a bit pricey, but I already have one laying around and I can set it to 7.5v - perfect! With the 2.25A continuous supply limit, this should be able to keep up with the heat sealer’s demands. I could also add a buffer cap on the supply side to help it out with inrush current, but that just adds unnecessary complexity for this application.)

https://www.jaycar.com.au/6a10-6a-1000v-diode/p/ZR1024
These diodes have a low forward voltage and can handle up to 6A! Given I’m running more than 2A through these, I want the lowest forward voltage possible, to minimise heating. The R6 package is a little big, but it still fits easily enough so it does the job. :slight_smile:

https://www.jaycar.com.au/2-1mm-bulkhead-male-dc-power-connector/p/PS0522

Got a better idea? Let me know :slight_smile: How would you have handled this?

3 Likes

Hi Oli,

Looks sick! Amazing writeup and circuit diagrams.

Regards,
Liam.

3 Likes

A Cap being almost a short circuit at switch on would probably increase the inrush current if it is being caused by the lower cold resistance of the heating element. A suitable thermistor would be more appropriate if this causes any problems. Or increase the PSU capability which would probably be the best way to go.
Inrush on the primary side of the PSU is a different beast, If a problem, can be minimised once again with a suitable thermistor in the active supply or other soft start method.
Cheers Bob

3 Likes

Yep, if I did go this route I was think a relatively low impedance resistor on the input, and maybe a ~200k discharge resistor across the legs

2 Likes

I have a 5V 14A supply that I have not put into service yet. Quoted cold start inrush 50A, on the primary side I assume. Input voltage range is quite wide so a low value permanent resistor may do, otherwise I will have to locate a suitable thermistor. This supply will eventually be switched by a timer and the last thing I need is continual tripping of circuit breakers. Care is needed as both these solutions will involve hot components.
Cheers Bob

3 Likes

Pretty happy with how it turned out. You’d never know it’d been modified.

Ended up needing to run it at 9v due to more reaistance in real life than in the simulation. Probably mostly due to the very narrow gauge wiring from the factory.

Don’t tell the girlfriend I was using the stove! :wink: Gotta work where I can in an apartment.

3 Likes

Nice work, thanks for sharing. Good solution to a tricky problem. Just watch those diodes - about 10% of the device’s power will be diverted to heat them up instead! You might be better off with Schottky’s, given that a tiny bit of reverse leakage isn’t going to hurt anything.

For posterity, one might reconsider the dismissal of a relay solution. Given the requirements, it happens to offer quite a neat path. They’re typically only about 20mm cubed, so might end up being space competitive with the various discretes required in the FET solution.

For example, the Omron G5LE-14-DC6 could be wired with the battery supplying the load via the normally closed contacts, and the PSU connected to the relay coil and the load in parallel. When the PSU is connected, the relay will energise, disconnecting the battery. Any backfeeding is short-lived, which batteries and PSUs will tolerate.

Would need some validation, but potentially a single component solution!

Note I picked the DC6 variant before I saw you switched to 9V. The DC6 would tolerate 7.5V happily, and 9V as long as it doesn’t get too hot, but you might want to pick a 9V rated variant to be sure.

5 Likes

Yeah, tricky to tell from the photos but there’s only about 10mm of space inside in any location. The 6xAA take up about half the available space, and the heater wire has its own support structure underneath. I did find some micro relays when I was looking, but they couldn’t handle breaking the DC current and I liked the MOSFET design for its versatility in other applications.

Re the diodes, yep with 2A and half a volt drop they’re dumping an entire Watt as heat. Can get away with it because it’s only on for about 10-20s in the absolute extreme (and that’s when the batteries are nearly flat), and usually at least 30min dead time - plenty for the heat to dissipate.

Definitely something to be very mindful of in a continuous application!

Edit:
Re the relay’s small enough to fit - this is the kind of thing I found, but it couldn’t handle the current:

https://www.jaycar.com.au/12v-spst-dil-reed-relay/p/SY4032

Mind you, having just looked again, one of these probably would have done it:

https://www.jaycar.com.au/12v-dpdt-dil-mini-relay/p/SY4059

3 Likes

Even though Oliver’s project is complete, he could have used a barrel jack with a battery disconnect when a plug is plugged in,

3 Likes

Ah yep I looked for one but couldn’t find one. I don’t think that one does? I did look at it, but it was too big to fit - like the relay.

1 Like

Hi Oliver,

Thanks for putting this up! Were all of your solder joints done with the helping hand (nice work!).
I bet you will get a lot of use out of it :smiley:

If anyone newer to electronics wants to look into the amazing world of MOSFET’s I would take a look at this link.

Liam

1 Like