How to allow one or multiple power sources - Page 1
Forum section: electronics / projects

author: WarFreak131
author_rank: Contributor
timestamp: January 29, 2021, 05:20:28 pm
content: I am building a project based around a GPS unit and some components which run on 12 volts.The GPS unit is a Neo-6M which can be powered by a Vin line or by a USB:https://www.amazon.com/Navigation-Positioning-Microcontroller-Compatible-Sensitivity/dp/B084MK8BS2/ref=asc_df_B084MK8BS2/?tag=hyprod-20&linkCode=df0&hvadid=416672656770&hvpos=&hvnetw=g&hvrand=35099324437887453&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9004220&hvtargid=pla-906486472275&psc=1&tag=&ref=&adgrpid=95587149724&hvpone=&hvptwo=&hvadid=416672656770&hvpos=&hvnetw=g&hvrand=35099324437887453&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9004220&hvtargid=pla-906486472275The voltage pin on the Neo-6M acts as a passthrough for the USB voltage, so 5V will appear on that line if I plug a USB cable in.Since I will be using a USB plug to power this, I also need a boost converter to bring it up to 12 V. For this, I am using an MT3608 boost converterhttps://opencircuit.shop/resources/content/bb13698a65e3e/crop/400-300/Boost-converter-module-2V-28V-MT3608.webpSimilarly, the Vin line on this acts as a pass through for the USB voltage, and a USB cable is not strictly necessary for the input voltage.I want the ability to power this circuit from one or the other, or both USB ports. If I plug the USB into the GPS, the boost converter should receive power on it's Vin line, and vice versa. If I plug both USBs in (and one is a slightly higher voltage than the other), I don't want to run the risk of reversing the current flow for one of the components.I've tried playing around with the circuit and adding diodes in different placed in different orientations, but I can't think of a layout that will let me do what I'm trying to do. Does anyone know how I can accomplish this?Thanks

author: phil from seattle
author_rank: Super Contributor
timestamp: January 29, 2021, 06:03:08 pm
content: Not sure I understand your question. The traditional approach is to use a schottky diode on each power feed leg to prevent current from flowing the wrong way. Does that not work for you? A PMOSFET can be used as well.

author: WarFreak131
author_rank: Contributor
timestamp: January 29, 2021, 07:21:04 pm
content: The issue is that if I put a diode on each power line, then if I plug one USB in, the other device will never be powered because it will be reverse biased.

author: WarFreak131
author_rank: Contributor
timestamp: January 29, 2021, 08:02:34 pm
content: Would something like the attached image work?If the GPS is plugged into the USB but not the boost converter, diode 3 will be forward biased. The voltage at the input of the boost converter will be approximately 4V. Diode 4 won't conduct. The 5V from the GPS that flows through diode 1 will be approx. 4 V at the Vin for the uC. Diode 2 won't conduct because it has 4V at the anode and cathode, so will not go into forward bias.If the boost converter is plugged in but not the GPS, the same will happen, just in reverse. Diode 4 will be forward biased. The voltage at the input of the GPS will be approximately 4V. Diode 3 won't conduct. The 5V from the boost converter that flows through diode 2 will be approx. 4 V at the Vin for the uC. Diode 1 won't conduct because it has 4 V at the anode and cathode, so it will not go into forward bias.If both are plugged in and both voltages are precisely equal, both the anodes and cathodes of diodes 3 and 4 will be equal, and neither will conduct. Diodes 1 and 2 will both conduct forwards but not backwards. If one voltage from one of the USBs is slightly higher than the other, diodes 3 and 4 will still not conduct because there isn't a great enough potential difference. But whichever voltage is slightly higher will cause either diode 1 or diode 2 to stop conducting.

author: gnuarm
author_rank: Super Contributor
timestamp: January 30, 2021, 02:04:32 am
content: Diodes 3 and 4 make no sense to me. What are they doing? Why not just connect all the power of the same voltage together??? Why are steering diodes needed at all? Will more than one power source be used?If you expect to have multiple power sources plugged in you need to either use diodes from the SOURCES, not from the board Vcc. The either source can power either board even when both are plugged in.I don't understand the system from the verbal description either, so someone needs to draw a diagram of the power sources and the power sinks.

author: WattsThat
author_rank: Frequent Contributor
timestamp: January 30, 2021, 03:05:28 am
content: QuoteWhy? What is the 12 volts needed for? You omitted that detail along with the mystery Uc shown in your drawing.You'll just get guesses until you provide the details.

author: gnuarm
author_rank: Super Contributor
timestamp: January 30, 2021, 03:17:49 am
content: Quote from: WattsThat on January 30, 2021, 03:05:28 amI recently worked on something like this where power from multiple sources were or'd together. We explored several options until we ended up with what we will be building at some point. If I knew what was needed I'd be happy to share, but the requirements are not clear to me. I don't understand the interconnections.