@GolamMostafa Why do you support the very bad idea to feed 12V to VIN to power the Arduino?
@wiresplus redesign the power supply to generate 5V and feed that to the 5V pin.
For reprogramming via a normal USB cable, you would have to disconnect it,
or use an USB cable with a cut/switched 5V line.