The main goal of this project is to control a servo motor with an Arduino.
I have a 12V 5Ah power supply connected to the Arduino. The servo is connected to 5V and GND on the Arduino.
When using this setup with the Arduino connected via USB, everything works fine. As soon as I disconnect the USB and use the power supply, the servo starts to randomly move.
After searching a bit on the web, I think a solution would be to have a dedicated circuit to power the servo motor and the Arduino.
Power Supply --> Voltage Regulator (5V) --> Servo Motor
Power Supply --> Arduino (12V)
Would this work?
Would a simple parallel connection from the power supply to the voltage regulator and Arduino be enough or more components needed?