As I understand it, when you power the Arduino from an external supply, the serial functions do not work. The Serial pins only work when the Arduino is powered by USB.
I came up with a possible solution, was wondering if anyone has already tried it though:
I'm thinking of cutting a USB cord and abandoning the power supplied by the computer. This is on 2 of the 4 pins. Leave them disconnected.
Next, provide the +5v wires on the arduino side of the cut plug with an external supply of +5v. Tie GND from the PC side of the cut USB cable and the external 5v supply.
This should, in theory, provide the arduino with 5V on the USB cord and enable serial routines, while having the data lines of the USB still connected to the PC. This way, (I hope) when the computer is off the arduino can run from the external power supply. When the computer is on, that will not change but serial routines should be available on the arduino.
Has anyone tried it this way before? In theory it seems it would work correctly, but was wondering if anyone has attempted this yet.
catatung:
As I understand it, when you power the Arduino from an external supply, the serial functions do not work. The Serial pins only work when the Arduino is powered by USB.
That is not correct. The serial functions still work either by wiring external TTL voltage level comm wires to pins 0 and 1, or by USB if plugged into a PC, even if using external power. You must have some misunderstanding.
I came up with a possible solution, was wondering if anyone has already tried it though:
I'm thinking of cutting a USB cord and abandoning the power supplied by the computer. This is on 2 of the 4 pins. Leave them disconnected.
Next, provide the +5v wires on the arduino side of the cut plug with an external supply of +5v. Tie GND from the PC side of the cut USB cable and the external 5v supply.
This should, in theory, provide the arduino with 5V on the USB cord and enable serial routines, while having the data lines of the USB still connected to the PC. This way, (I hope) when the computer is off the arduino can run from the external power supply. When the computer is on, that will not change but serial routines should be available on the arduino.
Has anyone tried it this way before? In theory it seems it would work correctly, but was wondering if anyone has attempted this yet.
Again I think you are over thinking the issue and seeing a problem that doesn't exist. If an arduino has both USB power and external power avalible at the same time the on-board auto-voltage selector circuit uses the external power via the on-board +5vdc voltage regulator and turns off the USB +5vdc via a mosfet switch. The USB chip still gets power in either case and communication can still happen either by using the USB link to a PC or using pins 0 and 1 to an external TTL serial device. The arduino comm capablities and it's powering options are two totally seperate things that are in no way interdependent on each other.
"The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high."
"The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high."
Ah, but you failed to mention you were talking about a Nano board in your post title or first posting Vs any of the standard shield based format Arduino boards. Lets look at the Nano's version 3 schematic.
Looking at the schematic the FTDI chip uses power named +5V, the same power name as the 328P shows, so if the 328P has power when using external Vin power via the on-board +5vdc regulator, both the 328p and the FTDI appear to be powered up and functional. There is a isolation diode shown (D1) connecting USB voltage and +5V voltage but that would not cut off power to the FTDI So the statement they make:
"The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high."
appears indeed to be in error, or the statement applies to an earlier version of the Nano that might have had a different voltage arrangement, or this schematic has fundemental errors in how the power is actually used Vs what it shows? As I don't own a Nano I can only go this far in analysis of what reality is Vs what is stated and shown in the documentation. So again from what I see in the schematic it appears to me that USB serial should still be functional even if using Vin to power the board.
Thanks for the breakdown guys.. I did quickly try it while powering it from a 12V source to the external connector, and I received a "USB Device Not Recognized" error. I removed the external power but still received the same error until I disconnected the USB and reconnected it. I will try it again to see if it was just a mishap. If I get the same behavior again I guess it is safe to say while using it normally and powered by the external power connector I wouldn't be able to communicate to/from a computer using the onboard USB/Serial converter. If that is the case, instead of wiring a max232 or some kind of FTDI chip to the pins 0/1, I think my initial proposed solution makes more sense and is a cleaner design (powering the USB pins with an external +5v source).
I will keep you guys posted on my findings. BTW, the nano board I have is a V3.
Well it's taken me awhile but I've gotten to a point where I can test this. I've powered the board from a 7805 5v output direct to the 5V pin on the arduino... From what I see even though this is usually taken as an output, it's parallel to 5V supply on the board so power could be provided on this pin as well. The arduino turns on and works as expected. I have observed 3.3V at the 3v3 pin while doing this. According to the docs:
"The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high."
this should indicate the FTDI chip is powered and the USB connection to computer should be functional. I would just need to create a special USB cable that has the +5v wire disconnected. I'm not sure what would happen if two separate 5v power supplies were routed to the nano at the same time in parallel. I would assume that it would just provide more current but being two separate supplies I'm not sure.
I am confused however at one thing. I powered the nano by the VIN pin with +12V. I checked the 3v3 pin and I observe 3.3v available at this pin when powered this way also. From the docs I quoted above, this should not be. Perhaps this means the FTDI chip is powered in all circumstances and USB connectivity is available to a PC in either scenario of power delivery? I assume the GND from the USB cable would need to be left connected if using an external 3v source.