Arduino project. USB+external power source - works fine. No USB - everything goes crazy
In addition to my comment regarding the requirement that the voltage on the Arduino Nano's \$V_{IN}\$ power pin must at all times be 7&nbsp;&ndash;&nbsp;12&nbsp;VDC, here are some additional troubleshooting suggestions.


When troubleshooting a power supply problems, do not use a voltmeter. ALWAYS use a digital storage oscilloscope (DSO) (preferred), or an analog storage oscilloscope with sufficient storage persistence (if you don't have a DSO), to observe the power supply's voltage versus time behavior over a sensible time period&mdash;e.g, 200&nbsp;&ndash;&nbsp;500 milliseconds. 
Using a DSO, observe the unregulated voltage at the Nano's \$V_{IN}\$ power input pin. Ensure \$V_{IN}\$ never drops below the regulator's minimum input voltage, which for the Arduino Nano would be 7&nbsp;VDC (see the data sheet for the Arduino Nano). Ensure this unregulated voltage does not exhibit unacceptable problems such as: large voltage spikes; large ripple; the voltage occasionally exits the 7&nbsp;&ndash;&nbsp;12&nbsp;VDC window, etc.
Using a DSO, observe the voltage at the Nano's 5&nbsp;VDC and 3.3&nbsp;VDC power output pins WHILE YOUR SOFTWARE IS RUNNING. Ensure the voltage at the 5&nbsp;VDC output power pin is between 4.95&nbsp;&ndash;&nbsp;5.05 VDC (see the LM1117 data sheet), and the voltage at the 3.3&nbsp;VDC power output pin is between 3.267&nbsp;&ndash;&nbsp;3.333&nbsp;VDC (see the LM1117 data sheet). Check for the presence of large voltage spikes, voltage droops, excessive ripple, etc.&mdash;i.e., anything that is abnormal on a DC power supply rail that could cause the Arduino or the surrounding circuitry to "hickup": spontaneous resets, analog-to-digital conversion failures, etc.


One last comment. The Arduino Store webpage for the Arduino Nano gives conflicting values for the required voltage range for VIN.  The "Tech Specs" section states VIN's required range is 7&nbsp;&ndash;&nbsp;12&nbsp;VDC, which seems sensible (correct) to me. But the "Documentation > Power" section claims VIN's required range is 6&nbsp;&ndash;&nbsp;12&nbsp;VDC. That 6&nbsp;VDC spec is BELOW the LM1117IMPX-5.0's spec'd dropout of 6.2&nbsp;VDC (see the LM1117 data sheet), which is risky business for a production product. If VIN droops below 6.2&nbsp;VDC even a little bit, you get "unspecified behavior" from the Nano's LM1117IMPX-5.0 voltage regulator.