On Sun, 2019-01-20 at 15:35 -0800, Ace Path wrote:
If you desolder the 5v pin from the usb cable on
the usb hub, it will
no longer be powered by your computers usb port, but can still
communicate with it (keep the gnd connected!). Then you can either
solder on a port or a wire(I used a wire since i dont have many micro
USB ports on hand which I would have preferred, and connect it to a
power bank. Woila! Rechargeable battery powered usb hub in 5
minutes
Don't try this at home!
Usually active 4-port USB hubs are inexpensive, too and they usually
could be used as an active or passive USB hub, without the need of a
switch to connect or disconnect +5V aka VCC aka VBUS coming from the
computer. Instead of cutting of the connection from the computer's
power, a diode might do the trick. OTOH a diode, such as a 1N4007 drops
the voltage, which could become an issue. However, your solution with
the cut off power still requires a wall wart with proper regulation, or
you anyway at least need to add a 5.1V Zener diode, since adding a
voltage regulator could be tricky, too.
In the end DIY is time consuming and is asking for trouble. You
probably won't damage your hardware, but much likely the DIY thingy
won't do the job in all (or at least most) cases. Better buy a cheap
active USB hub that was tested to work in all (or at least most) cases
by a computer magazine, such as the
https://www.reichelt.de/usb-2-0-4-port-hub-with-power-supply-unit-delock-61…
.
I missed that you are using a battery instead of a wall wart, so
voltage regulation doesn't matter. It's still not worth the effort.