I don't trust feeding a hard 5V into an output.
I would like to see a technical discussion, not the answer that it's safe.
The second question is if it's still safe if USB power is / becomes connected as well.
So the first question is why is it safe? I would like to see a technical discussion, not the answer that it's safe.
Protection DiodesThe NCP1117 family has two internal low impedance diode paths that normally do not require protection when used in the typical regulator applications. The first path connects between Vout and Vin, and it can withstand a peak surge current of about 15 A. Normal cycling of Vin cannot generate a current surge of this magnitude. Only when Vin is shorted or crowbarred to ground and Cout is greater than 50 µF, it becomes possible for device damage to occur. Under these conditions, diode D1 is required to protect the device.
It is not an output. It is simply a pin connected to the processor's power line.
The output of a regulator is the emitter of a transistor. The rest of that transistor that is the collector and base when unpowered are at a lower potential and so you have in effect a reverse biased diode protecting the regulator just like the normal reverse polarity protection diode in series with the barrel jack.
The Arduino has a switch that protects the USB power in that case, but not the 5V rail. However you are connecting two regulators together, both are trying to maintain a steady voltage so you might think they would fight, which indeed they do. But the capacitors on the two regulators prevent serious oscillation and the output does not oscillate. Basically the regulator with the highest reference voltage wins and the other one winds itself down to that level.
Maybe - just maybe one possibility but you never can tell - the trick is to read the datasheet?
There is a concern about back-feeding the USB port if it is connected as well as a 5 V supply. There is absolutely no suggestion that this can damage the UNO itself; transfer of power beyond 500 mA in either direction might trip the polyfuse.
The concern is that if the external 5 V is higher than the USB 5 V, you might "back-feed" the USB port on the PC or laptop. This is in itself, a valid concern as there seem to be reports of USB ports being damaged in this fashion.The point against this being likely however, is that many or most powered USB hubs do in fact, connect the accessory 5 V supply rated at something like 2.5 A directly to the 5 V terminal on all outputs and the input because without the accessory 5 V supply, the input must feed those outputs and you do not want to insert any device - such as a diode - which will cause a voltage drop.So given the relative number of Arduino UNOs (some even genuine) and powered USB hubs, I feel if this were a frequent problem, it would be announced to a far greater audience than this forum!
Do not short out Vin![/quotr]"Because that would be bad."
How can something that is lower, wind down (even 'more' lower)?