unstable ESC signal

i have easy setup but whit no easy reaction

i made through servo libarie succesfull ESC control whit the arduino uno

the problem is only when i leave the potmeter on 1 place i still hear,see and read jumping numbers that goes from arduino to ESC.

// control esc or constant value or through input pin A2
//myservo.writeMicroseconds(1200);  //set speed for ESC constant
//delay(150);
  val = analogRead(potpin3);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 10, 170);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
 Serial.print(val); 
   Serial.print('\n');
 delay(15);                           // waits for the servo to get there

the potmeter is connected Through pin A2 and it gets 5volt and gnd from the arduino i needed to set the map value to 10-170 because lower and higher the ESC got fault signal and stops working. For me not a big problem only when i set it on value and read the serial value 91 than jumps 100 and back down When i use writemicroseconds it works perfect and when i change delay to 15000, it jumps only once

so the potmeter voltage/resistance i not yet measured but possible this changes to mutch i use 5k Potmeter will this issue be gone whit 10K potmeter.

i think the problem is that whit the smallest changes in voltage from the arduino i get small changes in the potmeter value and big changes in ESC signal

Which Arduino? You might get a steadier pot signal using the 3.3V pin to power the pot and setting analogReference to EXTERNAL and connecting the AREF pin to 3.3V. Have you tried a 0.1uF capacitor from A2 to GND?

I have arduino uno. i don't think i get more stable voltage whit lower voltage. But that would be the problem for the variable voltage that goes to the potentionmeter. how lower it is how bigger the voltage change you can have.

But i saw also special codes you can use to stabilies the valua in the arduino script itself.