Why you didn't use an 1N4001?
Protection DiodesThe NCP1117 family has two internal low impedance diode paths that normally do not require protection whenused in the typical regulator applications. The first path connects between Vout and Vin, and it can withstand a peaksurge current of about 15 A. Normal cycling of Vin cannot generate a current surge of this magnitude. Only when Vinis 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.
The Nano doesn't use the Atmega16, and there's a blocking diode between the USB V+ and the 5V line. That's why the Nano's USB converter can't be powered from Vin, but just from the USB jack,