It would seem that you have a faulty board. Near;y every nano board has this 1117 regulator. Its purpose is to take the voltage on VIn and drop it to 5V to power the nano.
The AMS1117 regulator on your board (which every nano has) may be faulty.
The AMS1117 needs about 6.5V on Vin to work and drop the voltage to 5V on the board.
If you apply 9V to Vin then the AMS1117 should drop it to 5V (which can be read on the 5V pin) for the Arduino to work.
If you apply 9V to Vin and then read 9V on the 5V pin of the nano then the ams1117 regulator on the nano is faulty or there is a short somewhere on the nano board.
This does happen with some of the "clone" made in China nano boards.
Our project uses an external regulator (lm7808) to drop a 12v supply to 8v so it can power the nano via Vin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
https://robu.in/product/arduino-nano-board-r3-with-ch340-chip-wo-usb-cable-solderedarduino-nano-r3-wo-usb-cable-soldered/ This is the nano I have. When I supply 9V to Vin, it does not work and the volts on the 5V pin also measures out to be 9V. It had a AMS1117 voltage regulator instead of LM7808. I tried to test out various volts supplied to Vin. Works with 6V - but the 5V pin also has 6V output then.
It works when I supply power through the USB port
It would seem that you have a faulty board. Near;y every nano board has this 1117 regulator. Its purpose is to take the voltage on VIn and drop it to 5V to power the nano.
The AMS1117 regulator on your board (which every nano has) may be faulty.
The AMS1117 needs about 6.5V on Vin to work and drop the voltage to 5V on the board.
If you apply 9V to Vin then the AMS1117 should drop it to 5V (which can be read on the 5V pin) for the Arduino to work.
If you apply 9V to Vin and then read 9V on the 5V pin of the nano then the ams1117 regulator on the nano is faulty or there is a short somewhere on the nano board.
This does happen with some of the "clone" made in China nano boards.
Our project uses an external regulator (lm7808) to drop a 12v supply to 8v so it can power the nano via Vin.
Thanks