Author Topic: LM1117 Priority OR Circuit  (Read 1425 times)

0 Members and 2 Guests are viewing this topic.

Offline hal9001Topic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: 00
LM1117 Priority OR Circuit
« on: December 10, 2022, 11:45:26 am »
Hello,
I have a circuit that I want to accept power from a 12v power supply or 3v battery. The power supply has priority. Assume 3v battery is always plugged in.
1 ) If 12v supply plugged in then I dont want 3v battery power used. LM1117 regulates 3.3V output.
2 ) If 12v is not plugged in then I want 3v battery to be used and no current wasted through LM1117 output pin.

Does my circuit achieve this? Does the LM1117 have reverse current protection on the output pin to not get damaged or consume current from the 3v battery in case 12v supply is not present?



Cheers!
« Last Edit: December 10, 2022, 11:54:10 am by hal9001 »
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5119
  • Country: ro
  • .
Re: LM1117 Priority OR Circuit
« Reply #1 on: December 10, 2022, 12:44:02 pm »
You would probably want a diode from regulator output to regulator input or a plain diode with very low forward voltage after output pin... if the input voltage goes below output voltage, the regulator may not be happy.  But with diode between output and input, then voltage from battery would go back into the mosfets and mess things up.
An ideal diode after the output capacitor of the regulator would probably be easier.


But there's much better parts out there for what you want to accomplish.

For example, look at ideal diodes or OR controllers at distributors like Digikey, Mouser, Farnell/Newark, RS-Components etc

OR Controllers, Ideal Diodes : https://www.digikey.com/en/products/filter/power-management-pmic/or-controllers-ideal-diodes/758


some examples of  2 input > 1 output :

TPS2115PW  AUTOSWITCHING POWER MULTIPLEXER 
TSSOP : https://www.digikey.com/en/products/detail/texas-instruments/TPS2115PW/526042
8SON : https://www.digikey.com/en/products/detail/texas-instruments/TPS2115ADRBR/1843509

datasheet https://www.ti.com/lit/ds/symlink/tps2114.pdf

The TPS211x family of power multiplexers enables seamless transition between two power supplies, such as a
battery and a wall adapter, each operating at 2.8-5.5 V and delivering up to 1 A. The TPS211x family includes
extensive protection circuitry, including user-programmable current limiting, thermal protection, inrush current
control, seamless supply transition, cross-conduction blocking, and reverse-conduction blocking. These features
greatly simplify designing power multiplexer applications

ICL7673CPAZ  (this one's even available in DIP8 package) :

SOIC https://www.digikey.com/en/products/detail/renesas-electronics-america-inc/ICL7673CBAZA-T/1034565
DIP https://www.digikey.com/en/products/detail/renesas-electronics-america-inc/ICL7673CPAZ/936255
https://www.renesas.com/us/en/document/dst/icl7673-datasheet

The Intersil ICL7673 is a monolithic CMOS battery backup circuit that offers unique performance advantages over conventional means of switching to a backup supply. The
ICL7673 is intended as a low-cost solution for the switching of systems between two power supplies; main and battery backup. The main application is keep-alive-battery power
switching for use in volatile CMOS RAM memory systems and real time clocks. In many applications this circuit will represent a low insertion voltage loss between the supplies
and load. This circuit features low current consumption, wide operating voltage range, and exceptionally low leakage between inputs. Logic outputs are provided that can be used
to indicate which supply is connected and can also be used to increase the power switching capability of the circuit by driving external PNP transistors.





Some examples of ideal diodes

LMLM66100 5.5-V, 1.5-A 79-mΩ, Low IQ Ideal Diode With Input Polarity Protection  : https://www.digikey.com/en/products/detail/texas-instruments/LM66100DCKT/10273182
datasheet:  https://www.ti.com/lit/ds/symlink/lm66100.pdf

The chip enable works by comparing the CE pin voltage to the input voltage. When the CE pin voltage is higher than VIN, the device is disabled and the MOSFET is off. When the CE pin voltage is lower,
the MOSFET is on. The LM66100 also comes with reverse polarity protection (RPP) that can protect the device from a miswired input, such as a reversed battery.

or

MAX40200 Ultra-Tiny Micropower, 1A Ideal Diode with Ultra-Low Voltage Drop : https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/MAX40200AUK-T/7392218
The MAX40200 is an ideal diode current-switch that drops so little voltage that it approaches an order of magnitude better than Schottky diodes. When forward-biased and enabled, the MAX40200
conducts with as little as 85mV of voltage drop while carrying currents as high as 1A. Typical voltage drop is 43mV at 500mA, with the voltage drop increasing linearly at higher currents. The MAX40200 thermally protects itself, and any downstream circuitry, from overtemperature conditions. When disabled (EN = low) the MAX40200 blocks voltages up to 6V in either direction, making it suitable for most
low-voltage, portable electronic devices.


Also.... if you can use something better than 1117, some 1117 regulators (depends on manufacturer) will be unstable if the output capacitor doesn't have ESR within a specific range, for example most often that range is 0.1 ohm and 1 ohm, so those particular models will be unstable with ceramic capacitors (unless you add a 0.1ohm or higher resistor in series with the output capacitor.

 
The following users thanked this post: mycroft, ledtester, hal9001

Offline magic

  • Super Contributor
  • ***
  • Posts: 6984
  • Country: pl
Re: LM1117 Priority OR Circuit
« Reply #2 on: December 10, 2022, 01:22:05 pm »
1117 already has an internal Vout→Vin diode which will drain the battery together with R1. It may also cause the P-FETs to turn off until VDD decreases somewhat below VBat.

Internal feedback resistors of the 1117 will drain the battery too.


Not 100% sure, but it looks like an accurate ideal diode circuit (like those listed above) may be a necessity here.

Alternatively, a completely different approach could be to put 1N4148 at the output of the regulator, replace the battery with something rechargeable and add a resistor in series with it to limit charging current. There is a few devils in the details, but perhaps it's workable and may (or may not) be cheaper.
 
The following users thanked this post: hal9001

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2104
  • Country: us
Re: LM1117 Priority OR Circuit
« Reply #3 on: December 10, 2022, 03:35:29 pm »
I think you only need M2.  If the regulator is on, M2's body diode will prevent current from flowing back into the battery.  But current can't flow the other way because the body diode will never be forward biased.  M1 doesn't add anything.

However, your mosfet probably won't work.  It has a maximum GS threshold voltage of 4V.  So it may never turn on with a Vgs of 3V.  You need to find one with a maximum threshold voltage of about 1.5V or less.  The threshold is where the mosfet just begins to conduct, so you need some headroom above that.

You could test the regulator to see if current flows back through it.  Connect the 3V positive battery terminal to the output of the regulator through a 10K resistor, with everything connected up, including the 12V supply powered down.  You should get no voltage at the regulator input, and ideally no voltage drop across the resistor, although there may be a little if there's a voltage divider feedback in the regulator.

But the simplest solution might be to use the adjustable version of the regulator, set it to 3.9V, and put a diode in its output to bring the voltage back down to 3.3V.  Then I think the circuit should switch automatically with no problem.

Edit:  I forgot about the 4.7K pulldown resistor.  That should be disconnected when doing the reverse current test of the regulator.

« Last Edit: December 10, 2022, 04:56:38 pm by Peabody »
 
The following users thanked this post: hal9001

Offline magic

  • Super Contributor
  • ***
  • Posts: 6984
  • Country: pl
Re: LM1117 Priority OR Circuit
« Reply #4 on: December 10, 2022, 07:29:13 pm »
1117 and 317 regulators leak from OUT to IN, guaranteed, see National's datasheet. Maybe there are some that don't, but most fixed regulators still have a feedback network from OUT to GND, so output diode (or "ideal diode" circuit) is almost unavoidable.

Problem with the M2 circuit as drawn is when input voltage is ~2V - enough to turn M2 off, but not enough to power the load. The load will experience brownout when the external supply ramps up. M2 needs to be controlled by some sort of comparator, detecting that output from the regulator goes higher than the battery. Inclusion of an output diode means that the comparator may have a fair bit of offset and still protect the battery from charging.

Alternatively, use battery technology that can tolerate charging.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2104
  • Country: us
Re: LM1117 Priority OR Circuit
« Reply #5 on: December 10, 2022, 09:54:22 pm »
I would expect the 12V source to pass through 2V pretty rapidly.  Perhaps a somewhat larger output capacitor would cover any glitch.  Also, even if the mosfet turns off too soon, its body diode will supply the load at 2.4V at worst.  I think it would be worth trying it as is just to see how well it works.
 

Offline hal9001Topic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: 00
Re: LM1117 Priority OR Circuit
« Reply #6 on: December 11, 2022, 11:21:11 am »
You would probably want a diode from regulator output to regulator input or a plain diode with very low forward voltage after output pin... if the input voltage goes below output voltage, the regulator may not be happy.  But with diode between output and input, then voltage from battery would go back into the mosfets and mess things up.
An ideal diode after the output capacitor of the regulator would probably be easier.


But there's much better parts out there for what you want to accomplish.

For example, look at ideal diodes or OR controllers at distributors like Digikey, Mouser, Farnell/Newark, RS-Components etc

OR Controllers, Ideal Diodes : [url]https://www.digikey.com/en/products/filter/power-management-pmic/or-controllers-ideal-diodes/758[/url]


some examples of  2 input > 1 output :

TPS2115PW  AUTOSWITCHING POWER MULTIPLEXER 
TSSOP : [url]https://www.digikey.com/en/products/detail/texas-instruments/TPS2115PW/526042[/url]
8SON : [url]https://www.digikey.com/en/products/detail/texas-instruments/TPS2115ADRBR/1843509[/url]

datasheet [url]https://www.ti.com/lit/ds/symlink/tps2114.pdf[/url]

The TPS211x family of power multiplexers enables seamless transition between two power supplies, such as a
battery and a wall adapter, each operating at 2.8-5.5 V and delivering up to 1 A. The TPS211x family includes
extensive protection circuitry, including user-programmable current limiting, thermal protection, inrush current
control, seamless supply transition, cross-conduction blocking, and reverse-conduction blocking. These features
greatly simplify designing power multiplexer applications

ICL7673CPAZ  (this one's even available in DIP8 package) :

SOIC [url]https://www.digikey.com/en/products/detail/renesas-electronics-america-inc/ICL7673CBAZA-T/1034565[/url]
DIP [url]https://www.digikey.com/en/products/detail/renesas-electronics-america-inc/ICL7673CPAZ/936255[/url]
[url]https://www.renesas.com/us/en/document/dst/icl7673-datasheet[/url]

The Intersil ICL7673 is a monolithic CMOS battery backup circuit that offers unique performance advantages over conventional means of switching to a backup supply. The
ICL7673 is intended as a low-cost solution for the switching of systems between two power supplies; main and battery backup. The main application is keep-alive-battery power
switching for use in volatile CMOS RAM memory systems and real time clocks. In many applications this circuit will represent a low insertion voltage loss between the supplies
and load. This circuit features low current consumption, wide operating voltage range, and exceptionally low leakage between inputs. Logic outputs are provided that can be used
to indicate which supply is connected and can also be used to increase the power switching capability of the circuit by driving external PNP transistors.





Some examples of ideal diodes

LMLM66100 5.5-V, 1.5-A 79-mΩ, Low IQ Ideal Diode With Input Polarity Protection  : [url]https://www.digikey.com/en/products/detail/texas-instruments/LM66100DCKT/10273182[/url]
datasheet:  [url]https://www.ti.com/lit/ds/symlink/lm66100.pdf[/url]

The chip enable works by comparing the CE pin voltage to the input voltage. When the CE pin voltage is higher than VIN, the device is disabled and the MOSFET is off. When the CE pin voltage is lower,
the MOSFET is on. The LM66100 also comes with reverse polarity protection (RPP) that can protect the device from a miswired input, such as a reversed battery.

or

MAX40200 Ultra-Tiny Micropower, 1A Ideal Diode with Ultra-Low Voltage Drop : [url]https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/MAX40200AUK-T/7392218[/url]
The MAX40200 is an ideal diode current-switch that drops so little voltage that it approaches an order of magnitude better than Schottky diodes. When forward-biased and enabled, the MAX40200
conducts with as little as 85mV of voltage drop while carrying currents as high as 1A. Typical voltage drop is 43mV at 500mA, with the voltage drop increasing linearly at higher currents. The MAX40200 thermally protects itself, and any downstream circuitry, from overtemperature conditions. When disabled (EN = low) the MAX40200 blocks voltages up to 6V in either direction, making it suitable for most
low-voltage, portable electronic devices.


Also.... if you can use something better than 1117, some 1117 regulators (depends on manufacturer) will be unstable if the output capacitor doesn't have ESR within a specific range, for example most often that range is 0.1 ohm and 1 ohm, so those particular models will be unstable with ceramic capacitors (unless you add a 0.1ohm or higher resistor in series with the output capacitor.

Many thanks for such a detailed post!!

1117 already has an internal Vout→Vin diode which will drain the battery together with R1. It may also cause the P-FETs to turn off until VDD decreases somewhat below VBat.

Internal feedback resistors of the 1117 will drain the battery too.


Not 100% sure, but it looks like an accurate ideal diode circuit (like those listed above) may be a necessity here.

Alternatively, a completely different approach could be to put 1N4148 at the output of the regulator, replace the battery with something rechargeable and add a resistor in series with it to limit charging current. There is a few devils in the details, but perhaps it's workable and may (or may not) be cheaper.

Thanks magic!

I think you only need M2.  If the regulator is on, M2's body diode will prevent current from flowing back into the battery.  But current can't flow the other way because the body diode will never be forward biased.  M1 doesn't add anything.

However, your mosfet probably won't work.  It has a maximum GS threshold voltage of 4V.  So it may never turn on with a Vgs of 3V.  You need to find one with a maximum threshold voltage of about 1.5V or less.  The threshold is where the mosfet just begins to conduct, so you need some headroom above that.

You could test the regulator to see if current flows back through it.  Connect the 3V positive battery terminal to the output of the regulator through a 10K resistor, with everything connected up, including the 12V supply powered down.  You should get no voltage at the regulator input, and ideally no voltage drop across the resistor, although there may be a little if there's a voltage divider feedback in the regulator.

But the simplest solution might be to use the adjustable version of the regulator, set it to 3.9V, and put a diode in its output to bring the voltage back down to 3.3V.  Then I think the circuit should switch automatically with no problem.

Edit:  I forgot about the 4.7K pulldown resistor.  That should be disconnected when doing the reverse current test of the regulator.



Thanks Peabody!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf