Pages: [1]   Go Down
Author Topic: Arduino Mega 2560 disable USB power  (Read 838 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm, yeah I was thinking about that. Is usb communication unaffected by the absence of the V+ connection?
« Last Edit: February 01, 2013, 11:18:49 am by mozqwe » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: February 01, 2013, 11:27:38 am by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thx for the help.

Cheers.
Logged

Pages: [1]   Go Up
Jump to: