Arduino project. USB+external power source - works fine. No USB - everything goes crazy : <p>I have this circuit:</p>

<p><a href="https://i.stack.imgur.com/JOhiC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JOhiC.jpg" alt="enter image description here"></a></p>

<p>It is a simple project - a focus system for a taken lens and anamorphic adaptor. I have three pots. The first one I use as a manipulator. The second is used to get the position of the continuous rotation servo (JX DC6015 Mod) - motor#1. The third pot is used to control the position of the other continuous rotation servo (JX DC6015 Mod) - motor#2. There are also some buttons and diodes for calibration purposes. Motor#1 rotates the taken lens and motor#2 rotates the adaptor. </p>

<p>Well, let's look at the circuit. I also have there a 1N4007 diode and a 47uF cap. I use this scheme because the circuit even didn't turned on when I tried to power it from a battery. Now at least it turns on. But let's leave it aside for a moment. </p>

<p>The main problem is that everything works perfect when I use an external AC-DC adaptor (or battery) with Nano's USB connected to my laptop. As soon as I unplug the USB cable the system goes crazy. In case it is connected to the AC-DC adaptor it just starts rotating servos several turns CW and then backwards. In case it is powered just with a battery the servos just rotates CCW or CW very fast and never stop. </p>

<p>It looks for me like I have a GND loop problem. I tried to decouple my pots by adding 3 caps for each pot connecting a signal pin with GND, but things went even worse. It didn't work even with USB connected to Arduino. Servos rotated CW and CCW changing the direction very fast.</p>

<p>I tried two other Arduino controllers, but it was all the same. </p>

<p>I've tested all the GNDs. They are all connected together.</p>

<p>Then I decided to try to isolate VCC and GND from servo putting NME0505SC between power source and Arduino. But it didn't help as well. </p>
