I am a bit confused with what is going on with the power pins.
If I am using the Arduino (UNO) - for instance - it is connected to the USB port and I "talk" to it via the USB.
It gets power from the USB.
All is good.
When the project starts to get bigger, external power is needed to power it.
As the UNO has a 12v 2.1mm plug, that is pretty good too.
But then I run in to problems when I am talking to it with external power and without external power.
Again: In a perfect world, I wouldn't make these mistakes, but still: They happen and I don't get why.
Well, I kind of do, and want to find out the underlying problem.
Say it needs external power.
I have found that I MUST power it up via the external power first, before plugging in the USB.
If I do it the other way around, as soon as I connect the external power, it won't talk to the PC.
This is very annoying when I have the comms window open and I am checking signals and realise I haven't powered up the main supply.
If I do that WHILE the comms window is open, I need to reboot to get it talking again. (Ok, maybe newer IDEs have fixed that. I don't know.)
I have another project too and I keep forgetting to apply power to it. But this is an NANO and its power is a whole different ball game.
Where as the UNO has a built in regulator which can handle (say) up to 15v in and happily run the board; doing that on a NANO is fatal.
There is a 5V pin, and a V - In pin.
I connect 5v to the 5V pin and there is 5 volts on the V - In pin.
But if I am plugged into the PC USB and then supply the external power, it is like the UNO, and the comms port is useless.
You hear the USB removed / inserted sounds played, so I am guessing that when it sees the external power it "swaps" to that and then when it goes, if the USB power is there, it switches back to it.
All well and good. But why does it have to "disconnect" and "reconnect" the USB side of things?
Rebooting the PC from doing the mistake is annoying - and yes, I guess I should now know better. Alas that threshold hasn't been reached yet.
And I am curious to what is going on, and if there is a "work around"?