Problem with connecting 20kg servomotors with potentiometer

I am building a robotic arm with 4 servos controlled independently by 4 potentiometers and it is an upgraded version of the same project I had already built before, the only change is an upgrade in the servomotors. I have tested all the material independently and it all works, and the code is the same I used in the previous project, so I think the problem might be in the delay part in the code because the new servos are a bit slow, here is the code:

#include <Servo.h>

//servo 1 settings
Servo servo1;
const int servo1PotPin =A0;
const int servo1Pin =3;
int servo1Value;

//servo 2 settings
Servo servo2;
const int servo2PotPin =A1;
const int servo2Pin =4;
int servo2Value;

//servo 3 settings
Servo servo3;
const int servo3PotPin =A2;
const int servo3Pin =5;
int servo3Value;

//servo 4 settings
Servo servo4;
const int servo4PotPin =A3;
const int servo4Pin =6;
int servo4Value;

void setup() {
  servo1.attach(servo1Pin);
  servo2.attach(servo2Pin);
  servo3.attach(servo3Pin);
  servo4.attach(servo4Pin);

 }

void loop() {
  
servo1Value = analogRead(servo1PotPin);
servo1Value = map(servo1Value, 0, 1023, 0, 359);
servo1.write(servo1Value);

servo2Value = analogRead(servo2PotPin);
servo2Value = map(servo2Value, 0, 1023, 29, 94);
servo2.write(servo2Value);
 
servo3Value = analogRead(servo3PotPin);
servo3Value = map(servo3Value, 0, 1023, 0, 79);
servo3.write(servo3Value);

servo4Value = analogRead(servo4PotPin);
servo4Value = map(servo4Value, 0, 1023, 90, 179);
servo4.write(servo4Value);

delay (15);
 }

The thing is when I increase the delay time the servos only move a slight bit every step but if I decrease it they start going slowly to random points, what is strange because both the servos and potentiometers work perfectly on their own, the circuit is also ok.

Does anyone know how I could fix it?

Please post the working sketch.

Would you mind if I use Fritzing?

Start with a correct description of your project. A robot arm with 80 kg motors on it deserves much power, I think.

Please post link to the servo data sheet, state the characteristics of the power supply you are using, and post a photo of your setup.

For a 4x20 kgf-cm servos, the power supply should be rated for 12 Amperes, minimum, and perhaps higher depending on the servo stall current. Breadboards cannot be used for servo wiring, as the tracks will burn.

Sorry for the delay, I was running some tests and found out I was loosing 2 volts due to the wire resistance.

Thank you so much to everyone who tried to help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.