Upload new sketches through only data wires of USB

Hello everyone!

I am a beginner level hobbyist of electronics and this is my first time posting here. I have seen a few post around the internet similar to this one but the solutions or situations don't seem to apply well enough to my situation.

Question:
I would like to be able to charge a battery (powerbank) and upload sketches to my Arduino Nano through the same USB socket. Is it possible to only connect the Data + and - to the Arduino (and maybe ground) and still maintain communication or is this not possible? I could of course power the Arduino via the pins but then I would be left with one socket for power and one for data.

More thorough background:
I have a project making a lightsaber with an Arduino Nano and I have decided to try to power it using a powerbank ( GP Powerbank DIEM 2500 mAh). This has a micro usb port for charging the battery and a USB type A for retrieving power and I am planning to power my whole circuit with this output (including the Arduino Nano). I bought a micro USB socket (with a board) and was planning to solder the data wires of a mini USB to the board and plug that into the Arduino. Would that work at all? I would then solder the power and ground of a micro USB and connect that to the input of the powerbank. I've done some tests but haven't had much success but I wouldn't be suprised if that comes down to the cheap USB cables I've been tearing apart or my bad soldering skills.

Any help (from small tips to entirely new directions) is greatly appreciated. Thank you!

Yes, you should be able to down load with just the data lines and Gnd connected, and 5V power from elsewhere.
You can see here where VUSB connects to VCC on the USB/Serial chip (FT232), but 5V from elsewhere does also, and a diode separates the two.

Hi,
I have a number of projects where it is convenient to keep the project supply connected.
I use a USB extension lead that I have cut in the middle then rejoined all but the 5V leads, in fact I connect them to terminals so I can reconnect the PC 5V or insert a DMM to measure supply current.


Tom... :slight_smile:

CrossRoads:
Yes, you should be able to down load with just the data lines and Gnd connected, and 5V power from elsewhere.
You can see here where VUSB connects to VCC on the USB/Serial chip (FT232), but 5V from elsewhere does also, and a diode separates the two.

Alright! Thank you! I will get to prototyping right away.

TomGeorge:
Hi,
I have a number of projects where it is convenient to keep the project supply connected.
I use a USB extension lead that I have cut in the middle then rejoined all but the 5V leads, in fact I connect them to terminals so I can reconnect the PC 5V or insert a DMM to measure supply current.

@TomGeorge
So just to be clear you then use the cable to configure your Arduino projects and disconnect the 5V when relevant?

lasermite:
@TomGeorge
So just to be clear you then use the cable to configure your Arduino projects and disconnect the 5V when relevant?

Yes, only connect the 5V jumper when 5V USB is required by the project.
Disconnect when project is independently powered.
Tom,... :slight_smile:

Hey, all you USB cable makers! How about cables without the +5V wire, or make it switchable with a tiny switch in the device plug. Huh, Huh?

JCA34F:
Hey, all you USB cable makers! How about cables without the +5V wire, or make it switchable with a tiny switch in the device plug. Huh, Huh?

Get you hands dirty and make one yourself...

Oh, I have, using an "inline switch", but they are "kludgey" and the one with the right plug (mini or micro) is always busy on another project. I have a couple made for RPI with built in switch, but have "micro" plugs where most of my Arduinos are Nanos with "mini" sockets.

Hi,
Make it with the standard USB PC connectors, then ANY USB cable will fit.


Tom.... :slight_smile: