0

I want to have a portable battery that I can charge either with a solar panel, or with a wall outlet. I'm lazy, so I don't want to manually switch any cables to make this happen. Also, the goal of this is to have this in a laptop bag, so I'd like to use USB cables to move the power around if possible.

The solar panel I'm considering is something like this, or similar: https://www.amazon.com/dp/B017GQ7OEA/_encoding=UTF8?coliid=I2EY30UJZO7DZ0&colid=2HAJQ8D4NL2LX

I'd want to wire it together with some kind of wall-plug USB charger. I can work with just a USB in - as long as I know the proper rating to get.

Essentially I want to do what this user wanted: Combining multiple cables to increase current? (laptop charger)

Except instead of getting more current, I want to be able to charge with one or the other supply without changing any cables.

Now, if I'm not crazy, the VBUS and GND in a male/female/female USB cable are just wired together, so as long as one is supplying power (and the other one isn't exploding) then the male cable should be able to charge my battery pack and this is a good idea. But how do I keep from blowing up / melting power source A while power source B is operating? What ratings do I need to look for from either charger when all they need to do is not carry any current when they aren't plugged in/unfurled?

5
  • Hardware design question are out of scope here at Superuser
    – Ramhound
    Commented Aug 2, 2017 at 1:52
  • maybe amazon.com/HIGHROCK-Female-splitter-adapter-Cable/dp/B00NIH0RLE Reviewer have mixed things to say might want to google a different USB female Y cable.
    – cybernard
    Commented Aug 2, 2017 at 2:13
  • And how do you plan to join solar panel with indoor AC outlet, where the sun doesn't shine? Commented Aug 2, 2017 at 2:14
  • this question should be moved to Electronics Commented Aug 2, 2017 at 2:45
  • But this site is for... power users...
    – Sam Bush
    Commented Aug 2, 2017 at 8:10

1 Answer 1

2

Two simple ways to do this:

  1. Use a SPDT or DPDT switch to select power source.

    Pro: simple, no loss of power

    Con: requires manual intervention

  2. Connect GND of both supplies together and insert an isolation diode in each VCC lead.

    Pro: no flipping switches

    Con: a diode drops VCC by ~0.6 V for an inexpensive junction diode, or ~0.45 for a Schottky diode, slowing (or stopping) charging

The DPDT switch is shown below. enter image description here

5
  • And why do you need to switch grounds? Commented Aug 2, 2017 at 2:10
  • @AliChen Besides the fact two power sources would have two difference reference grounds?
    – Ramhound
    Commented Aug 2, 2017 at 2:35
  • @Ramhound, and why would usually floating charger and totally stand-alone solar panel would have different reference grounds? You connect all grounds together to have a common ground, no? Commented Aug 2, 2017 at 3:29
  • 1
    I know nothing about the schematic for the charger or the solar panel so I cannot answer that question. Having the wrong reference ground be used in a circuit can really screw with ICs. Which is the reason this answer accurately describes the two options.
    – Ramhound
    Commented Aug 2, 2017 at 3:31
  • In addition, some AC mains power supplies have considerable RF, and possibly AC, leakage. To reduce risk of shock and to prevent RFI, it's good practice to isolate both lines. Commented Aug 2, 2017 at 4:18

Not the answer you're looking for? Browse other questions tagged .