element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Circuit Protection
  • Technologies
  • More
Circuit Protection
Forum Can I have multiple powersources Powering one device if I use diodes?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Circuit Protection to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 72 subscribers
  • Views 5574 views
  • Users 0 members are here
  • voltage
  • power
Related

Can I have multiple powersources Powering one device if I use diodes?

Sean_Miller
Sean_Miller over 4 years ago

I have a lithium ion battery powered device that I would like to allow plugging in a wall wart to power it as well.

 

If I put a diode on the lithium ion battery, would this prevent causing an issue to the battery when I connect the device to the wall wart supply?

 

Thanks,

Sean

  • Sign in to reply
  • Cancel

Top Replies

  • genebren
    genebren over 4 years ago +8
    Sean, I typically place a schottky diode inline with each potential power source. In this case, there are three potential sources of input to the voltage regulator (AP2127). V+ (D1G$3) is the charger input…
  • Andrew J
    Andrew J over 4 years ago +6
    Sean, I don’t know the set up you have, but if it is currently powered by a battery and you can modify it to add a diode AND you want to power it with a wall wart which implies you need to alter it to…
  • milosrasic98
    milosrasic98 over 4 years ago +5
    As genebren already said, using Schottky diodes is the way to go because of their low drop voltage. This principle is also used for power switching on some of the Arduino boards. I made a circuit similar…
  • Jan Cumps
    Jan Cumps over 4 years ago

    It usually does protect. It will prevent any current flowing toward your battery.

    Wether it stops your device from being powered by the battery is another question. That depends on the voltage levels of the wall supply and the battery.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • genebren
    genebren over 4 years ago

    Sean,

     

    I typically place a schottky diode inline with each potential power source.

    image

    In this case, there are three potential sources of input to the voltage regulator (AP2127).

    • V+ (D1G$3) is the charger input (5 volts) that can power on the circuit to charge the battery
    • .unlabeled input (D1G$1) is a switch inline with the Li-Ion cell, that can power on the circuit - This is a momentary switch, that allows the circuit to power on long enough to verify proper battery voltage levels.  If everything is OK a boost converter is enabled which output is shown as +5V (D1G$2).  The highest voltage input (either V+ or +5V) will override the Li-Ion (through switch) input.

     

    This approach prevents any of the sources from becoming a load to the others by having a reversed diode in the path.

     

    I have used this approach several times (including on commercial devices) with no issues or problems.

    • Cancel
    • Vote Up +8 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew J
    Andrew J over 4 years ago

    Sean,

     

    I don’t know the set up you have, but if it is currently powered by a battery and you can modify it to add a diode AND you want to power it with a wall wart which implies you need to alter it to have a DC jack to take the wall wart plug then it may be easier.  DC Jacks tend to come with 3 pins, one of which is a switchable ground.  This ground is connected to the battery ground and when a DC plug is inserted it automatically disconnects the battery.  When the DC plug is removed, it remakes the contact to the battery.

     

    Take this example - Product LinkProduct Link - in the datasheet you will see the 3-pin diagram with pin 2, connected to pin 3 (sorry, I’m on my iPad and can’t copy).  All you would need to do is solder pin 1 to Vin at the same point as the battery, pin 3 to Vout at the same place as the battery; desolder the ground pin of the battery connector from Vout (where you just soldered pin 3) and resolder it to pin 2 of this connector.

     

    As I say, it depends on what you can do to your circuit.

     

    EDIT: back on my computer.  Here's a circuit I'm creating:

     

    image

     

    J2 will be for banana plug sockets from, say, a bench top supply; J1 is the connector for a DC barrel Jack.  J1 Pin 1 is Vin; J1 Pin 3 is Vout.  In your case J2 is your battery and its Pin 2 would have been connected to the same point as pin 3 on J1.

    • Cancel
    • Vote Up +6 Vote Down
    • Sign in to reply
    • Cancel
  • milosrasic98
    milosrasic98 over 4 years ago

    As genebren already said, using Schottky diodes is the way to go because of their low drop voltage. This principle is also used for power switching on some of the Arduino boards. I made a circuit similar to this recently and it worked great for lower power devices, but struggled on something more power hungry like the Raspberry (due to the drop on the 5V rail and the 7805 not being able to handle such current).

    image

     

    Milos

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
  • Sean_Miller
    Sean_Miller over 4 years ago in reply to Andrew J

    That is a slick design for the jack.

     

    Would you be able to pull the plug and the contacts remake the battery circuit before disconnecting the plug voltage?  That is, could you pull the plug and the device stay on?

     

    Sean

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew J
    Andrew J over 4 years ago in reply to Sean_Miller

    Hi Sean,

    Sorry for the delay, I went to bed!!

     

    That’s a good question and I don’t know the answer.  I believe they are designed so that pin 2 is disconnected from pin3 before pin 1 and pin 3 connect but I don’t know for sure - you may need to test or google or perhaps someone else reading this knows for sure.  If it does break before make then even though measured in small milliseconds, there’s likely to be at least a glitch on the circuit.  However, if you think about things like a laptop, Arduino, other dual powered device they usually stay active on a power switch - I don’t know if they have something else in circuit to cope with that temporary disconnect, a capacitor perhaps??

     

    I’m going to have to look further into that as it is an interesting question.  It’s not something I need for my circuit but it’s good to know!

     

    I would add that you may still want a diode on pin 1 of your battery (referring to my schematic) to prevent any potential charging attempt or damage if something fails.  One thought I had here was the reverse leakage current of the diode - it feels like you want something with as low a leakage current you can find.  Further, because the diode will be reverse biased with the DC plug in it will have a reverse recovery time: that would want to be as small as possible.

     

    Again, maybe someone else can confirm if I’m talking rubbish.

     

    I should also add that you wouldn’t want your battery connected at the same time as an external supply as it will still draw from your battery - that’s just a waste.  These jacks are specifically designed for use in a dual battery/DC barrel jack circuit.  It’s probably worth searching for example circuits and more information.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew J
    Andrew J over 4 years ago in reply to Andrew J

    I remembered I had a circuit that I could test with.  I tied two 9V batteries in series to get 18V and tied into a board-to-wire terminal alongside a DC jack that I can use a 15V wall wart with.  The build follows the schematic I showed above and I have no diode in front of the battery:

     

    image

    The batteries are in series with my multimeter reading current draw.  In the image both the wall wart and batteries are attached.  In this scenario, 0Amps are being drawn by the battery; when only the battery is connected 70mA are drawn.  So what happens when I have the batteries attached and plug in the wall wart:

    image

    You can see a voltage drop from 18V to 0V and back up to 15V.  It's not clean due to the nature of making the DC jack connection which will bounce somewhat.  That is taking circa 110ms to complete.

     

    When I remove the plug:

    image

    You can see a voltage drop from15V to circa 3V and back up to 18V.  This is taking circa 20ms to complete.

     

    Ok, so these are not definitive tests but do give an idea of what is happening.  If you need to ensure your device remains constantly powered I think you should look at solutions for that scenario.  I still believe having the battery/DC Jack connected together is the right answer so as not to draw power from the battery when the wall wart is connected.

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
  • Sean_Miller
    Sean_Miller over 4 years ago in reply to Andrew J

    Great tinkering and data!!!!!!!!!  You are awesome!

     

    I wonder how big of a capacitor it would take to handle the dips. 

     

    Clearing off the kitchen table now and breaking out my tackle boxes.  :-)

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew J
    Andrew J over 4 years ago in reply to Sean_Miller

    In all honesty Sean I'm reaching the limit of my knowledge.  I think you'd need a LARGE capacitance to keep the voltage held up sufficiently.  Using formula I = C * ( dV/dT) which would show you how much voltage would change for a given current/capacitance.  Using my values above:  I=0.07; t = 0.04 and, say, C= 0.0001 (100uF), then  V = (0.07 * 0.04) / 0.001 = 28V.  That is, voltage would drop 28V over 40ms.  You can plug your own values in but I think you'd find C would need to be quite large. 

     

    I wasn't really thinking that a capacitor was the way to go, and large capacitance on the input would bring different problems to resolve, but perhaps look for solutions to help maintain the voltage if you absolutely must retain power across a switch of supply.  There are ICs that would do this, e.g. https://www.analog.com/media/en/technical-documentation/data-sheets/4412fb.pdf  That may give you some clues for searching for similar parts.

     

    Perhaps your batteries are re-chargeable and there's a charge unit that would do this for you??  Maybe the answer is to use two diodes and keep the battery connected permanently - it may be that when the wall wart is connected, it's only the diode reverse leakage that is depleting the battery and that you could live with that rate of drain.  A Schottky might have 5mA - 10mA leakage but a low voltage drop; a signal diode might have 50uA but a larger voltage drop (you must choose a diode suitable for the power dissipation you expect of course.)  The wall wart would need to have a higher voltage (by the diode forward voltage I think) than the battery in order to reverse bias the diode in front of the battery.

     

    We really need someone with more experience on this thread now image  This has gotten very interesting though so it would be good if you could feedback what, if anything, you chose to do.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • Sean_Miller
    Sean_Miller over 4 years ago in reply to Andrew J

    I hooked up my power supply and battery with a diode to my o-scope.  I disconnected the power supply and reconnected with the trigger on to see how it behaved.  Just had an LED and a 1k resistor as the load.  Didn't see a flicker in the LED and the voltage simply shifted as expected.

     

    Looks like that will do the trick for me.

     

    As far as the battery draining due to being connected still, my theory is that since the power supply is a higher voltage than the battery, there is no potential for current flow to occur.  But perhaps real world is different than on paper.

     

    See ya',

    Sean

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube