Normal computer USB max current is much lower than needs of modern smartphone to charge while running, commonly needing ~2 amp chargers.
I want to be able to have my phone connected to my computer via usb for data purposes, but it maintain it charge.
Is it possible to do something like this to a usb cable, so instead of the 5v coming from computer, it comes from phone charger instead ?
simulate this circuitsimulate this circuit – Schematic created using CircuitLab