I'm working on an embedded project, where I use arduinos as a "sensor shield" for RaspberryPi (I have model B).
The problem is, that the RaspberryPi's USB port is not powerfull enough to drive WiFi adapter and arduino with sensors. The solution is easy, I will power the sensors externally, not through the RPi.
But I was wondering, is it possible to power whole Arduino externally (through Vin) and use the USB only for serial communication.
To clarify, I know how to solve my problem - use some other mean of communication, than USB - GPIO serial, I2C, wireless, etc... I'm just interested if the whole thing will work, with USB cable which has 5V lead cut, for example.
The main issue I can see with this is, that the USB<->Serial chip is powered through USB only, then it will now work.
-
Any particular Arduino?Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2014年12月09日 09:37:56 +00:00Commented Dec 9, 2014 at 9:37
-
I'm using Nano v3 and Mini, but I'm looking for general solution preferably.jnovacho– jnovacho2014年12月09日 11:47:25 +00:00Commented Dec 9, 2014 at 11:47
-
The general solution is to stick to bare MCUs, since each board's power circuitry is slightly different.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2014年12月09日 11:56:39 +00:00Commented Dec 9, 2014 at 11:56
3 Answers 3
If you provide power to the Arduino through Vin
this will disconnect USB power through the MOSFET switch.
There are a couple of alternative solutions to the question that I think are worth mentioning.
Use a data only USB cable or manually cut the VCC and GND wires of the cable.
Remove the USB poly fuse from the arduino board.
Connect external power to one of the input pins to measure the voltage. This measurement can then be used to determine if the external power is connected and is providing sufficient voltage. If it does the USB power should not be use anyways, otherwise an if statement can be used to disable the code that turns devices that draw power. USB power will still be used to power the arduino board itself. It also has a limitation in that because the power supply could provide insufficient current it could draw the remaining required current from USB.
-
Suggestion #1 didn't seem to work for me, which was really confusing. I'm working with a 3D printer scenario running Marlin on the Arduino. When I power on the printer/power supply, everything connects like it should when using an unmodified cable. But, when I try the cable without the VCC & GND wires, nothing will connect. Could the RAMPS board not be powering the serial bus or something? Kinda scratching my head on this one.Erutan409– Erutan4092017年04月21日 13:41:12 +00:00Commented Apr 21, 2017 at 13:41
-
1Only cut VCC and keep ground connected. AFAIR it won‘t work with GND connectedNitek– Nitek2018年07月15日 05:55:52 +00:00Commented Jul 15, 2018 at 5:55
-
The FTDI chip requires power from the USB side to operate so suggestion 1 will not workRob Jolley– Rob Jolley2019年04月17日 12:59:33 +00:00Commented Apr 17, 2019 at 12:59
Just cut the VCC
line (usually red) in the USB cable.
There are four wires in a USB cable:
- Ground
- VCC
- Data +
- Data -
You cannot send data along without a reference ground as you need a potential difference. Hence you must keep the ground connected and just snip the power line (red VCC
).
Note that this is not usually necessary as VIN
is favoured over USB power.