Author Topic: simple battery protection for 3xAAA vs USB  (Read 1366 times)

0 Members and 1 Guest are viewing this topic.

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
simple battery protection for 3xAAA vs USB
« on: May 22, 2019, 04:47:27 pm »
I've got a simple device that needs to be ultra-cheap. Think holiday decoration. It normally runs from 3xAAA batteries and runs fine on 4.5V. I'd like to add USB power to it, but want to make sure the batteries don't see the USB voltage and start to "charge" (It is not my intention to make a rechargeable device and these would be normal alkalines in most cases.)

I've came up with the circuit attached, but I see now it won't work properly because the body diode of the transistor will conduct current from USB power back to the battery. The effect is small when the batteries are new, but is big when the battery is partly discharged.

I probably would not use the transistor shown. Most likely would use a DMP1045, which is already in the BOM.

Anyway, trying to keep things cheap. I could ask people to remove the batteries when using a USB supply, but I am 100% sure that will result in hot, leaky batteries and unhappy users.


« Last Edit: May 22, 2019, 05:28:20 pm by djacobow »
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: simple battery protection for 3xAAA vs USB
« Reply #1 on: May 22, 2019, 05:40:28 pm »
I've succesfully used an identical circuit since 1999, but I used an IRF7205 in a SOIC package.

But the drain-source must be reversed, otherwise the intrinsic body diode may conduct under certain situations.

Haven't checked your Mosfet specs. Just make sure that it is fully enhanced at VGS= -4.5v
 
The following users thanked this post: djacobow

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: simple battery protection for 3xAAA vs USB
« Reply #2 on: May 22, 2019, 05:47:27 pm »
As stated, flip the MOSFET around. You can also use a regular diode rather than a Schottky, in order to cut cost and/or use the voltage drop to your advantage.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: djacobow

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
Re: simple battery protection for 3xAAA vs USB
« Reply #3 on: May 22, 2019, 06:12:00 pm »
That was it, folks! Transistor was reversed.

Yeah, the transistor I will use is pretty hard on at -4.5V.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: simple battery protection for 3xAAA vs USB
« Reply #4 on: May 22, 2019, 06:41:34 pm »
Wouldn't two diodes work?

For example PMEG2005CT (two diodes with common cathode per chip) , 20 cents each if you buy 100: https://www.digikey.com/product-detail/en/nexperia-usa-inc/PMEG2005CT215/1727-5188-1-ND/2531787
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
Re: simple battery protection for 3xAAA vs USB
« Reply #5 on: May 22, 2019, 06:46:44 pm »
Wouldn't two diodes work?

For example PMEG2005CT (two diodes with common cathode per chip) , 20 cents each if you buy 100: https://www.digikey.com/product-detail/en/nexperia-usa-inc/PMEG2005CT215/1727-5188-1-ND/2531787

Actually, one diode would work, as I have no concern about the batteries pushing current into the USB PSU. However, I want to maximize battery life, so don't want to take the voltage drop across the diode.
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
Re: simple battery protection for 3xAAA vs USB
« Reply #6 on: May 31, 2019, 09:26:52 pm »
In case anybody googles this thread in the future, I thought I would just say that, depending on the nature of the diode in the circuit, the resistor values will not work well.

What happened in my circuit was that reverse leakage through the schottky diode going into a 1 MOhm resistance was more than enough to raise the voltage at the gate of the transistor and turn it mostly off. This led to all sorts of weird behavior.

If I replace that pulldown with a 10k, problem goes away, as the gate hangs near zero and the transistor stays hard on. The extra current through the resistor wastes a bit of power, but this only happens when the external power is applied, not from battery (well, except for that reverse leakage through the diode.)

I love mistakes that I can fix without changing the board.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: simple battery protection for 3xAAA vs USB
« Reply #7 on: June 01, 2019, 01:11:10 am »
Just replace the Schottky diode with a regular one, in order to reduce leakage current. That can be of particular help if the device tends to be stored for long times.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
Re: simple battery protection for 3xAAA vs USB
« Reply #8 on: June 01, 2019, 03:01:22 am »
I might do that. It is slightly advantageous for me to change the behavior of my project when it is on battery vs USB power, and I thought i was being clever by measuring the voltage: 4.5V or less means battery, vs 5 minus the diode drop for USB. I don't need any other parts or a gpio pin. If I use a regular diode, the dead band between those basically goes away.

Still, I hate it when batteries run down when a device is not in use, so I'll give this some thought.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf