Problem with HITEC HS HS7955TG Servo

Hi,

I’m having a problem with my servo. When I use this code below to control my servo angle, it works with the low load 9g servos (blue ones).

#include <Servo.h> 

Servo joint_1;
#define joyX A0
#define joyY A1
#define joint_1_pin 5

int xValue, yValue, pos; 
int joint_1_angle;

void setup() {
  Serial.begin(9600);
  joint_1.attach(joint_1_pin); 

  joint_1_angle = 90; 

  joint_1.write(90); 
}


void loop() {
  xValue = analogRead(joyX); 
  yValue = analogRead(joyY); 

  if (xValue < 500) {
    joint_1_angle = joint_1_angle - 1; 
  }
  else if (xValue > 600) {
    joint_1_angle = joint_1_angle + 1; 
  }
  
  joint_1.write(joint_1_angle); 
  
  Serial.print("xValue: "); Serial.print(xValue);
  Serial.print("  yValue: "); Serial.print(yValue); 
  Serial.print(" Servo Angle: "); Serial.println(joint_1_angle); 
   
  delay(1000/20);
}

When I connect it to the larger servo, there is a lot of noise and jitter. The servo still moves in the direction in which we control the angle with the joystick, however, it is very unstable. I am using a 5V 2A unregulated wall adapter. I’m guessing this issue is because the power requirements for this are much larger than the small servo.

Any insights to why this may be happening, and if there are any solutions?

Given that the servo has a stall current of over 4A your supply is definitely not adequate. And you should never run electronics from an unregulated power supply anyway. That can rapidly kill things.

Try batteries instead. 4 x AA NiMH rechargeables would be good.

Steve

4A? Perhaps SLA or LiFePO4 2S pack with high current connectors? Battery holders for AA's that can handle
4A reliably aren't easy to find in my experience.

MarkT:
4A? Perhaps SLA or LiFePO4 2S pack with high current connectors? Battery holders for AA’s that can handle
4A reliably aren’t easy to find in my experience.

That’s true. I’m so used to making my own packs that I forget about those wimpy spring holders with teeny thin wires which can cause their own problems.

Steve