Go Down

Topic: Arduino Mega 2560 disable USB power (Read 1 time) previous topic - next topic

mozqwe

Hello is there a way to force power supply only from external source and use the usb connection only for programming purposes on a mega 2560 rev3? Thx

retrolefty


Hello is there a way to force power supply only from external source and use the usb connection only for programming purposes on a mega 2560 rev3? Thx


That is how the mega2560 board works already. If there is both USB and external DC power available to the board, the auto-voltage selection circuit uses the external DC power and isolates the USB power via a FET switch.

Lefty

mozqwe

The thing is that I would like to have the arduino shutdown as soon as I unplug the external power supply. The way it works by default, as you have described, is that it auto selects the power source so this means that if both the usb and the external supply are plugged in when I unplug the external supply the arduino remains on because it receives power from the usb. I would like to have it off in this situation.

retrolefty


The thing is that I would like to have the arduino shutdown as soon as I unplug the external power supply. The way it works by default, as you have described, is that it auto selects the power source so this means that if both the usb and the external supply are plugged in when I unplug the external supply the arduino remains on because it receives power from the usb. I would like to have it off in this situation.


That would take some hacking of the board, or possibly get a spare USB cable and hack into it and install a on/off switch on the USB +5vdc wire, or just leave it cut open so that only the USB ground, D+, and D- wires run to the arduino end of the USB cable.

Lefty


mozqwe

#4
Feb 01, 2013, 05:16 pm Last Edit: Feb 01, 2013, 05:18 pm by mozqwe Reason: 1
Hmmm, yeah I was thinking about that. Is usb communication unaffected by the absence of the V+ connection?

retrolefty

#5
Feb 01, 2013, 05:24 pm Last Edit: Feb 01, 2013, 05:27 pm by retrolefty Reason: 1

Hmmm, yeah I was thinking about that. Is usb communication unaffected by the absence of the V+ connection?


Don't know for sure, I've never tried it. The USB ground, and two data lines are all that's need for the USB to function, assuming the USB device has it's own +5vdc voltage source and it's power source ground it wired to the USB ground wire. But possibly the PC side needs to see a minimum amount of current flow to decide that something is trying to attach when you plug the cable into the PC?

You may have to wire say a 50 or 100 ohm resistor from the USB +5vdc wire to the USB ground wire on the PC side of the USB cable where you cut the +5vdc USB wire open. That should work for sure.

Lefty

mozqwe


Go Up