I want to solder a male usb port to my Pi, so that it can be a little dongle computer. However, if I power it with a powerbank, and while it is still being powered, plug it into another power source over the soldered usb connection, will I fry it, since it is being powered twice on the same port? Thanks!
As Dougie has commented the ports are joined together.
It is extremely inadvisable to connect the outputs of 2 switch mode power supplies together.
The results are unpredictable. It is unlikely to damage the Pi and in the best case power will only be drawn from a single supply - the higher voltage causing the other to ramp down.
Normal USB gadgets are designed to be powered by the computer to which they are connected.
I suggest 3 options:
- Power the Pi from the computer - whether this is feasible depends on the Pi current requirements and/or the computer.
- Isolate the 5V line so the Pi will not attempt to power the computer.
This should allow normal USB gadget operation if plugged into a power source.
I would use a Schottky diode (as I did with the very early Pi to prevent them being back-powered by USB - except the other way round).
An "ideal" diode (using a MOSFET) would be better - as used in most Pi models, but not Pi0 or Pi4.
- Ignore the 5V from the computer - by not connecting the 5V line.