Programming nano 33 IoT with no USB vcc

Hi, I want to program a nano 33 IoT whilst the board is powered by a battery. Presumably, powering the Arduino with a battery and then plugging in the micro usb at the same time will kill the board (maybe not?). Is it feasible to connect just the micro usb data pins (no vcc) to the Arduino's micro usb socket (whilst on battery power) and program it this way?

For example I could modify an existing micro usb cable, and remove the vcc pin.

If you connect a battery to Vin you would need to cut the USBvcc wire in the USB cable or remove the pin. You still need the GND (ground) connection.
Somewhat dangerous if you forget and use the wrong cable one day

Excellent, do you mean the micro usb vin? I plan on making an adapter of sorts so I am unable to use a regular usb cable.

Vin on the board.
What voltage is the battery?

Its a two cell lipo around 8v

In that case, you can connect the battery through a diode to Vin on the board and you won't need to cut or modify anything.

SB140, IN5817, or 1N5918 would be good

1 Like

Is the diode to prevent over-discharge?

Is the diode to prevent over-discharge?

No, it won't prevent overdischarge, it's there to protect the USB port and your computer.
If the battery voltage should ever drop below the USB bus voltage (5V) then the USB would send current into the battery and you don't want that to happen. The diode prevents that from happening.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.