Problem with servo

i'm having a problem with my servo and potentiometer, when I connect my potentiometer to a different power supply(out of arduino), the signal get a lot of spikes and jam my servo, but when I connect the potentiometer to the arduino power supply, the servo refuses to move

  • Does the servo power supply have its GND connected to the Arduino GND .

  • Always show us a good schematic of your proposed circuit.
  • Show us good images of your ‘actual’ wiring.
  • In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.
  • Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.

thanks man