Hello all,
I have tried powering an arduino and servo with one battery and it worked just fine. However recently I made a 3D printed case for this project and I bought all the components again to make everything fit in the case. However for a strange reason I can't power the servo and the arduino at the same time with the new layout. It is the same circuit, the arduino works fine on both scenarios but it resets when I am not using the usb cable. Why is this happening? Could it be because of the data pins of the USB?
Link of the images
Thank you for your help
Apparently the battery cannot supply enough current for the servo, the voltage is sagging low enough to reset the Arduino, what kind of battery?
It's a 18650 3.7v 2200mah. The battery works fine when it is powering the servo and arduino in the first image I posted on the links, however when I change it to the other circuit (second image, which is exactly the same circuit but using wires instead of a circuit board) it doesn't work properly.
Thank you for your reply!
The Nano is designed to work on 5V, 3.7V might be enough to barely keep it running but when you throw the servo load on (which initially may be more than 1000 mA) the voltage is probably sagging below 3V, not high enough to keep the Arduino from resetting.
It looks like that battery in part of a power bank with a step up and USB plug. These can power servos unless they are high torque and/or heavily loaded.
@rojascan, is the servo unloaded on both circuits?
Hi,
Why do you want the flying leads rats nest to work?
The solder is not the best, and simply soldering wire to pins without any insulation is asking for trouble.
The board assembled version is more stable and once you mount those electro caps properly it will probably be very reliable.
A schematic of your project will help and a read of http://forum.arduino.cc/index.php/topic,148850.0.html with respect to posting images will be good too.
Tom.. 
vinceherman:
@rojascan, is the servo unloaded on both circuits?
Yes, the servo is unloaded on both circuits. And as you said the battery is part of a powerbank with a step up and a usb plug.
TomGeorge:
Why do you want the flying leads rats nest to work?
Basically, I want to put everything in a 3D printed box I have made and you're right about insulation, I will insulate everything with a silicone glue gun but I wanted to test everything first.
@vinceherman thank you for posting the pictures 
I think the problem was in the USB plug that probably needed the data pins to work well (?) I bought a TP4056 and replaced the other charger module with the TP4056 and now everything is working fine.
Thank you very much for all your replies and advice. 
Awesome that you got it working.
I am not sure why you saw different behavior with the same powerbank.
Could the battery have become discharged between the 2 attempts?
Using a different charger likely means that you charged the battery and tried again.
Anyway, congrats on getting it working!