Why Is My Servo Jittering? Causes and Fixes

MG996R Metal Gear Servo - Quality RC Parts

A servo jitters when it gets a dirty signal, weak power, or a load it cannot hold. The fix depends on the cause: most jitter comes from low voltage under load, a worn extension lead, or a binding linkage, and each one has a different test. Work through the causes in order and test after each change, so you find the one fault instead of swapping parts at random.

Quick facts

Fact Value
Most common cause Low voltage under load (weak pack or thin extension lead)
Second most common cause Binding linkage or a servo arm hitting its end stop
Signal cause Loose plug, damaged lead, or a noisy long signal wire
Gear cause Stripped or worn gears, usually after a crash
Test that finds it Disconnect the pushrod. If the jitter stops, the fault is in the linkage. If it keeps jittering with no load, the fault is power, signal, or gears.
Cost of parts in this guide $5.99 to $23.99

Best first test in this guide

Best first test: disconnect the pushrod. It splits the fault in half in 30 seconds. If the servo holds still with no load, the linkage binds or the arm hits something. If it still jitters with no load, the problem is power, signal, or gears inside the servo.

Five criteria used to pick this test:

1. Speed: one test takes 30 seconds and needs no tools. 2. Certainty: it separates linkage faults from servo faults cleanly. 3. Cost: free, and it stops you buying parts you do not need. 4. Fit: it works on any servo, from a 9g micro to a 40 kg brushless. 5. Safety: it finds a stalling servo before the servo burns out its motor fighting a jammed linkage.

Best for: any servo that twitches, buzzes, or hunts at center or during travel. Not best for: a servo that does not move at all. That is a power or signal failure, not jitter, and it needs the dead-servo checks at the end of this guide.

What does servo jitter look like?

Jitter is a fast, small, uncontrolled movement around the commanded position. The servo twitches back and forth by a few degrees, buzzes while it does it, and never settles. Buzzing without movement is a servo stalled against a load. Hunting is a slower drift back and forth across center. All three point at the same short list of causes, and the tests below separate them.

Is low voltage causing the jitter?

Low voltage is the most common cause. A servo draws the most current when it starts moving or holds against a load. If the pack or the wiring cannot deliver that current, the voltage sags, the servo loses holding force, the load pulls it back, the voltage recovers, and the cycle repeats as jitter.

Test it: measure the receiver pack voltage under load, or swap in a freshly charged pack and test again. If the jitter stops, the pack was the fault. A 4-cell AA pack at 4.8V to 6V is the bench standard for centering and testing. A pack below 4.8V under load will make a healthy servo hunt.

Fix it: charge or replace the pack. If several servos share one pack, the pack may be fine for one servo and too weak for four. A switching UBEC rated above the servos’ combined draw fixes that. The 5A switch-mode UBEC at $10.99 suits small builds, and the 7A switch-mode UBEC at $12.99 suits builds with several standard-size servos. Both take 2S to 8S LiPo input. Match the UBEC to the load: add up the stall draw of the servos and pick a UBEC rated above it.

Is the extension lead causing the jitter?

A long, thin extension lead drops voltage under load, and the drop grows with length and current. A micro servo on a short lead never notices it. A standard-size servo on a long 26AWG lead does. A damaged lead does the same thing: a pin that is loose in its housing breaks contact for a fraction of a second, and the servo twitches each time it reconnects.

Test it: swap the extension for a short lead, or plug the servo straight into the receiver. If the jitter stops, the lead was the fault. Wiggle each plug while the servo holds center. A twitch when you wiggle a plug means that plug is loose or its crimp is bad.

Fix it: replace the lead. Use a shorter lead where you can, and use a heavier 22AWG lead for long runs and high-torque servos. The universal 6in 26AWG 5-pack at $7.49 suits short runs and micro servos. The JR-style 6in 26AWG 5-pack at $5.99 is the same job with JR-style plugs. The universal 12in 26AWG 5-pack at $8.49 reaches wing and tail servos in larger planes.

Is the linkage binding?

A binding linkage stalls the servo at part of its travel. The servo pushes, the linkage stops it, the servo buzzes and twitches against the bind, and the gears take the load. Common binds: a pushrod that flexes and catches, an arm that hits the servo case at full throw, a control horn that bottoms out, or a hinge that sticks.

Test it: disconnect the pushrod from the servo arm and move the surface by hand. It should move freely through its full travel. If it sticks, the bind is in the surface or the hinge, not the servo. Move the servo arm by hand through its travel with the power off. It should turn smoothly with no tight spot.

Fix it: straighten the pushrod and shorten it where you can. A short, straight pushrod does not flex. Set the linkage so the surface sits neutral with the arm at 90 degrees. Adjust the pushrod stopper, not the trim, to fix the center. If the arm hits the case, fit a shorter arm or move the pushrod to a hole closer to the servo center.

Is the signal wire picking up noise?

Long signal wires next to motor wires or ESC leads pick up electrical noise, and the servo reads that noise as small position commands. The result is a fine, fast twitch that does not change with load. It gets worse when the motor runs and stops when the motor stops.

Test it: route the servo lead away from the motor and ESC wires and test again. If the twitch follows the motor, the fault is noise, not the servo. A ferrite ring on the servo lead near the receiver also helps.

Fix it: keep servo leads away from high-current wires, keep them as short as the build allows, and do not coil a spare loop of servo lead next to the ESC. If the servo shares a long run with other wires, a twisted extension or a separate route is worth the effort.

Are the gears stripped?

Stripped gears are the crash fault. A servo that took a hit has one or more broken teeth, and the output jumps each time the broken teeth mesh. The signs: jitter that stays in one part of the travel, a dead spot where the servo does not respond, grinding noise, or play in the output shaft when you turn it by hand with the power off.

Test it: power off, turn the output shaft slowly by hand through its full range. A healthy servo turns smoothly with even resistance. A stripped servo has a loose spot or a catch at one point in the travel. Power on, command slow travel, and watch for a jump or a dead band.

Fix it: replace the servo. Gears are not worth rebuilding on a $15.99 standard servo or a $13.99 micro servo set. A metal gear servo resists stripping better than a plastic gear servo after a knock, which is why the MG996R metal gear servo at $15.99 is the usual pick for steering and other crash-prone jobs. The DS3218MG 20KG digital servo at $23.99 adds 270 degree travel and a waterproof metal gear case for wet or heavy jobs.

Could the servo driver or controller be at fault?

A 16-channel PWM driver such as the PCA9685 drives servos from a microcontroller instead of a receiver. Jitter from a driver usually means the controller is sending updates too fast, the power rail sags when several servos move at once, or the signal ground is not shared between the driver and the controller.

Test it: drive one servo from the driver with the others unplugged. If one servo holds steady and four jitter, the rail sags under load. If one servo jitters alone, check the signal ground and the update rate in the sketch.

Fix it: power the servos from a separate supply through the driver’s power terminals, share the ground between the driver and the controller, and keep the update rate at the standard 50 Hz. The PCA9685 16-channel PWM servo driver board 2-pack at $19.99 runs 16 servos from an Arduino or Raspberry Pi over I2C, and it needs its own servo power supply, not USB power, once more than one servo moves under load.

How the causes compare

Cause Symptom Quick test Fix
Low voltage Jitter under load, worse with several servos Fresh pack, test again Charge pack or fit a UBEC rated above the draw
Bad extension lead Twitch when the lead moves Swap for a short lead Replace the lead, heavier wire for long runs
Binding linkage Buzz with no movement, jitter at one point in travel Disconnect the pushrod Straighten pushrod, fix center with the stopper
Signal noise Fine twitch that follows the motor Route the lead away from motor wires Separate the wires, shorten the lead
Stripped gears Jump or dead spot at one point in travel Turn the shaft by hand, power off Replace the servo
Driver power sag Several servos jitter together Drive one servo alone Separate servo supply, shared ground, 50 Hz updates

Parts that fit this guide

In-stock parts ship from the New York, USA warehouse in 1-2 business days. Prices below are the live store prices verified on November 22, 2026.

MG996R Metal Gear Servo ($15.99)

MG996R Metal Gear Servo - Quality RC Parts

Standard-size metal gear servo at $15.99. Metal gears resist stripping after a knock better than plastic gears.

MG996R Metal Gear Servo

20KG Digital Servo, 270 Degree, Waterproof, Full Metal Gear, DS3218MG ($23.99)

DS3218MG 20KG digital servo with 270 degree rotation and metal gears

Waterproof digital servo at $23.99. It gives 20 kg of torque with 270 degree travel in a full metal gear case.

20KG Digital Servo, 270 Degree, Waterproof, Full Metal Gear, DS3218MG

Micro Servo SG90 / SG92R / MG90S ($13.99)

Micro servo SG90 SG92R MG90S, 9 gram, 3-wire JR plug

Micro servo set at $13.99. It covers the SG90, SG92R, and MG90S micro servos for small planes, cars, and pan-tilt mounts.

Micro Servo SG90 / SG92R / MG90S

Universal Servo Extension 6in, 26AWG, 5-Pack ($7.49)

Universal servo extension 6 inch, 26AWG, 5-pack

Extension leads at $7.49 for a 5-pack of 6in leads. Swap one in to test whether the old lead was the fault.

Universal Servo Extension 6in, 26AWG, 5-Pack

JR-Style Servo Extension 6in, 26AWG, 5-Pack ($5.99)

JR-Style Servo Extension 6in, 26AWG, 5-Pack - Quality RC Parts

Extension leads at $5.99 for a 5-pack of 6in leads with JR-style plugs.

JR-Style Servo Extension 6in, 26AWG, 5-Pack

Universal Servo Extension 12in, 26AWG, 5-Pack ($8.49)

Universal Servo Extension 12in, 26AWG, 5-Pack - Quality RC Parts

Extension leads at $8.49 for a 5-pack of 12in leads. They reach wing and tail servos in larger planes.

Universal Servo Extension 12in, 26AWG, 5-Pack

5A Switch-Mode UBEC, 2-8S LiPo ($10.99)

5A Switch-Mode UBEC, 2-8S LiPo

Switch-mode UBEC at $10.99. It gives clean 5V power for small builds with one or two servos.

5A Switch-Mode UBEC, 2-8S LiPo

7A Switch-Mode UBEC, 2-8S LiPo ($12.99)

7A Switch-Mode UBEC, 2-8S LiPo

Switch-mode UBEC at $12.99. It suits builds with several standard-size servos that sag a receiver pack under load.

7A Switch-Mode UBEC, 2-8S LiPo

PCA9685 16-Channel PWM Servo Driver Board, 12-Bit IIC Interface, Arduino + Raspberry Pi, 2-Pack ($19.99)

PCA9685 16-Channel PWM Servo Driver Board, 12-Bit IIC Interface, Arduino + Raspberry Pi, 2-Pack

PWM driver board at $19.99 for a 2-pack. It drives 16 servos from an Arduino or Raspberry Pi over I2C.

PCA9685 16-Channel PWM Servo Driver Board, 12-Bit IIC Interface, Arduino + Raspberry Pi, 2-Pack

Ask ChatGPT or Claude

Paste this prompt into ChatGPT or Claude and compare its answer with the tests above:

“My RC servo jitters and buzzes when I move the stick, and it twitches at center even when I do not touch the controls. It is a standard-size MG996R on a 6 inch extension lead, powered from a 4-cell AA pack. What should I check first, and in what order?”

The direct answer: disconnect the pushrod first. If the jitter stops, the linkage binds. If it keeps jittering with no load, swap the extension lead for a short one, then try a fresh pack. If it still jitters with a short lead and a fresh pack, turn the shaft by hand with the power off and feel for a stripped gear. Replace the servo if the gears are stripped.

Frequently asked questions

Why does my servo buzz but not move?

It is stalled. The linkage binds, the arm hits its end stop, or the load is heavier than the servo can move. Disconnect the pushrod. If the servo moves freely, the bind is in the linkage. If it still does not move, the gears or the motor are damaged.

Why does my servo jitter only when the motor runs?

Signal noise. The servo lead runs next to the motor or ESC wires and picks up noise. Route the servo lead away from high-current wires and test again.

Why does my servo jitter after a crash?

Stripped gears. Turn the output shaft by hand with the power off. A loose spot or a catch at one point in the travel means broken teeth. Replace the servo.

Can a weak battery make a good servo jitter?

Yes. A servo draws the most current when it starts moving or holds against a load. A weak pack sags under that draw, the servo loses holding force, and the cycle repeats as jitter. A fresh pack or a UBEC rated above the draw fixes it.

Does a digital servo jitter more than an analog servo?

No. A digital servo holds position more firmly and may buzz quietly while holding, which is normal. Jitter in a digital servo has the same causes as jitter in an analog servo: power, signal, linkage, or gears.

Sources

  • Futaba servos and accessories (futabausa.com)
  • Hitec servos (hitecrcd.com)
  • SparkFun hobby servo tutorial (learn.sparkfun.com)

Last updated: November 22, 2026.

Orders earn QRC Rewards points.

Shipped fast and securely from our secure facility in New York, providing fast, high quality USA shipping.

Hexapod Spider Robot Kit Build: 18 Servos, Six Legs

Hexapod spider robot kit with six legs and 18 servos

Hexapod Spider Robot Kit Build: 18 Servos, Six Legs

Build the hexapod spider robot kit with 18 servos across six legs, driven by PCA9685 boards over I2C. Three legs lift and swing while the other three hold the body up, which is the tripod gait. The servos need a 5 to 6 V supply rated at 10 A, because 18 servos can draw more than any USB port supplies.

Quick facts

Item Value
Legs 6 legs, 3 servos per leg, 18 servos total
Gait Tripod gait: 3 legs lift, 3 legs support
Drivers PCA9685 boards, 16 channels each; two boards cover 18 servos
Controller Freenove Crawling Robot Controller in the kit, Arduino IDE compatible; wireless remote included
Servo supply Separate 5 to 6 V, sized for stall current
Battery Not included; 2x 3.7 V 18650 flat-top cells plus a charger, bought separately

Hexapod spider robot kit: how does it walk?

A hexapod walks with a tripod gait. At any moment, three legs touch the ground and hold the body up, while the other three lift, swing forward, and set down. Then the two tripods swap. The body never has fewer than three legs on the ground, so it stays stable without balancing.

Each leg has three servos: a hip servo that swings the leg forward and back, a knee servo that lifts the leg, and an ankle servo that sets the foot angle. Three servos per leg times six legs is 18 servos. No Arduino has 18 PWM pins to spare, which is why the build uses PCA9685 boards.

The two tripods are the front left, middle right, and rear left legs in one group, and the front right, middle left, and rear right legs in the other. Lift one tripod, swing it forward, set it down, then lift the other. That is the whole walk. Turning shifts the swing direction, and strafing shifts the foot targets sideways.

Why do 18 servos need two PCA9685 boards?

One PCA9685 drives 16 servos. Eighteen servos need two boards, with 16 channels on the first and 2 on the second. The boards share one I2C bus, so the wiring stays at two wires plus power. Set the first board to address 0x40 and the second to 0x41 with its A0 solder pad, then pass each address to its own library object.

Both boards share the same 50 Hz servo frequency, and each channel is independent. The sketch below creates two driver objects, one per address, and a helper that maps a servo number from 0 to 17 onto the right board and channel. The gait code then thinks in legs and joints, not in boards and channels.

The kit as shipped needs no PCA9685 at all: its own Freenove Crawling Robot Controller drives all 18 servos directly from ports 22 to 39, with the yellow servo wire to S, red to +, and black to -. The kit ships with a remote, and the kit controller plus its provided library handle the first walks. The PCA9685 wiring in this post is the path for builders who drive the servos from their own board instead of the kit controller. The kit tutorial also requires the batteries to be fully charged before assembly, with about 8.0 to 8.4 V across the two 18650 cells, and warns that wrong batteries can damage the servos.

How do you size power for 18 servos?

Size for stall current, not idle current. Eighteen servos starting or stalling together draw several amps, far more than any USB port or board regulator supplies. No single authoritative figure exists for the stall current of the servos in this kit, and the common SG90 stall figures disagree across resellers, so this post states no per-servo current number. Size generously and meter the rail on your own build.

Use a separate 5 to 6 V supply rated at 10 A or more for the servo rail, and feed it to the PCA9685 V+ terminals. A 5 V 10 A bench supply works on the bench. That 10 A rating is a planning rating with headroom, not a computed stall total. The kit itself runs from 2x 3.7 V 18650 cells, which is a separate power path from the PCA9685 servo rail in this post; do not feed the 18650 pack straight into the servo rail.

Add a large capacitor across each V+ terminal, 1000 microfarads or more, close to the board. Eighteen servos starting at once draw a sharp spike, and the capacitor absorbs it. Use thick wire for the V+ feed, because thin jumper wires drop voltage at 10 A and heat up. Never route servo current through the Arduino 5 V pin.

How do you assemble and test the legs?

Assemble one leg at a time and test it before you fit the next. Center each servo at 90 degrees with the sketch before you fit the horn, so the leg starts at its middle position. A horn fitted 30 degrees off center steals a third of that joint travel and the leg will never reach its full step.

Test the tripod gait with the body held up in your hand first. Lift the robot, run the gait, and watch the feet. Three feet should lift and swing while the other three stay still, then swap. If a leg swings the wrong way, its hip servo is reversed in the mapping, so flip its direction sign in the code, not the wiring.

Set the robot down only after the lifted test looks right. On the floor, start with short steps and low speed. A hexapod that steps too far tips forward, because the support tripod moves behind the center of mass. Short steps keep the body over its feet.

Wiring

Wire the build with the power off. Check every connection in the table before you connect any battery or USB cable.

From To Notes
PCA9685 board 1 VCC Controller 5 V or 3V3 Logic only; use 3.3 V on an ESP32 so the I2C pull-ups stay at 3.3 V
PCA9685 board 1 GND Controller GND and servo supply negative Common ground for all three
PCA9685 board 1 SDA Controller SDA I2C data; address 0x40, A0 pad open
PCA9685 board 1 SCL Controller SCL I2C clock
PCA9685 board 2 VCC Controller 5 V or 3V3 Logic only
PCA9685 board 2 GND Controller GND and servo supply negative Common ground
PCA9685 board 2 SDA Controller SDA Shared I2C bus; address 0x41, A0 pad bridged
PCA9685 board 2 SCL Controller SCL Shared I2C bus
Both boards V+ terminals Separate 5 to 6 V supply, 10 A or more Servo power only; thick wire, one feed per board
Board 1 channels 0 to 15 Servos 0 to 15 Legs 1 to 5 full sets plus one joint of leg 6
Board 2 channels 0 and 1 Servos 16 and 17 Remaining two joints of leg 6
Capacitor 1000 uF or more Across each V+ terminal and ground Absorbs the 18-servo start-up spike; mind the polarity

Power budget

Eighteen micro servos draw several amps while walking and far more if they all stall at once, so the supply must cover the walking current with margin, and the fuse or pack must survive the stall spike without cutting out mid-step. A 5 V 10 A bench supply is the bench choice. A battery pack needs the same current rating. The kit battery is 2x 3.7 V 18650 flat-top cells plus a charger, none of which are included.

The logic side draws only a few milliamps. The controller, the two PCA9685 chips, and the remote receiver run from the controller supply. The servo rail is separate, and only the grounds join. Never power the servos from the controller 5 V pin, and never feed the servo supply into the controller.

Heat matters at 10 A. Use thick wire for the V+ feeds, keep the runs short, and check the terminal screws after the first hour of walking. A loose screw at 10 A heats up and drops voltage, and the legs will jitter and stall.

Build steps

  1. Unbox the kit and count the parts: frame, six legs, 18 servos, horns, screws, the Freenove Crawling Robot Controller, and remote. Confirm the battery is not included: buy 2x 3.7 V 18650 flat-top cells plus a charger, and fully charge them before assembly.
  2. Run the kit as shipped first if you can: load the provided code on the kit controller, calibrate the servos with the calibration graph in the kit tutorial, and walk it on the remote. The PCA9685 steps below are the own-board alternative, not the kit default.
  3. Center every servo at 90 degrees with the sketch before you fit any horn. Fit each horn at the middle position.
  4. Assemble one leg at a time: hip, knee, then ankle. Test each leg by hand for free movement before you fit the next.
  5. Fit the six legs to the body in the tripod groups: front left, middle right, rear left in one group, and the other three in the second group.
  6. Wire the two PCA9685 boards from the wiring table. Set board 1 to 0x40 and board 2 to 0x41 with the A0 pad.
  7. Connect the servos to the boards in order, 0 to 17, and connect the separate servo supply to both V+ terminals. Join the grounds.
  8. Upload the sketch below. Hold the body up and run the tripod gait. Confirm three legs lift and swing while the other three hold still, then swap.
  9. Set the robot on the floor and walk it forward in short steps. Shorten the step if it tips forward.

Code

Library: Adafruit PWM Servo Driver library. Board: Arduino IDE compatible controller. The sketch maps servo numbers 0 to 17 across two PCA9685 boards and runs a basic tripod gait. Tune the step size and the per-leg direction signs for your kit.

// Hexapod spider robot: 18 servos, 2 x PCA9685, tripod gait
// Board: Arduino IDE compatible controller.
// Library: Adafruit PWM Servo Driver (Adafruit_PWMServoDriver).
#include 
#include 

Adafruit_PWMServoDriver pwmA = Adafruit_PWMServoDriver(0x40);  // Servos 0-15
Adafruit_PWMServoDriver pwmB = Adafruit_PWMServoDriver(0x41);  // Servos 16-17

#define SERVOMIN 150   // About 730 microseconds at 50 Hz; calibrate per servo
#define SERVOMAX 600   // About 2930 microseconds at 50 Hz; calibrate per servo
#define SERVO_FREQ 50

// Legs 0-5, joints 0=hip, 1=knee, 2=ankle. Servo number = leg*3 + joint.
// Tripod 1: legs 0, 2, 4. Tripod 2: legs 1, 3, 5.
const uint8_t TRIPOD1[3] = {0, 2, 4};
const uint8_t TRIPOD2[3] = {1, 3, 5};

uint16_t angleToPulse(int angle) {
  return map(constrain(angle, 0, 180), 0, 180, SERVOMIN, SERVOMAX);
}

void setServo(uint8_t servo, int angle) {
  uint16_t pulse = angleToPulse(angle);
  if (servo < 16) pwmA.setPWM(servo, 0, pulse);
  else pwmB.setPWM(servo - 16, 0, pulse);
}

void setLeg(uint8_t leg, int hip, int knee, int ankle) {
  setServo(leg * 3 + 0, hip);
  setServo(leg * 3 + 1, knee);
  setServo(leg * 3 + 2, ankle);
}

void setTripod(const uint8_t legs[3], int hip, int knee, int ankle) {
  for (uint8_t i = 0; i < 3; i++) setLeg(legs[i], hip, knee, ankle);
}

void setup() {
  pwmA.begin();
  pwmA.setOscillatorFrequency(27000000);
  pwmA.setPWMFreq(SERVO_FREQ);
  pwmB.begin();
  pwmB.setOscillatorFrequency(27000000);
  pwmB.setPWMFreq(SERVO_FREQ);
  delay(10);
  // Park every servo at 90 degrees: legs centered, feet down.
  for (uint8_t s = 0; s < 18; s++) setServo(s, 90);
  delay(500);
}

void loop() {
  // Tripod gait, one step per cycle. Tune the angles for your kit.
  // Lift tripod 1, swing forward, set down.
  setTripod(TRIPOD1, 110, 60, 90);  // Lift and swing forward
  delay(300);
  setTripod(TRIPOD1, 110, 90, 90);  // Set down
  setTripod(TRIPOD2, 70, 90, 90);   // Push body forward
  delay(300);
  // Lift tripod 2, swing forward, set down.
  setTripod(TRIPOD2, 110, 60, 90);
  delay(300);
  setTripod(TRIPOD2, 110, 90, 90);
  setTripod(TRIPOD1, 70, 90, 90);
  delay(300);
}

Test and tune it

Hold the body up and run the gait. Three legs should lift and swing while the other three stay still, then swap. If a leg in the wrong tripod moves, its leg number is wrong in the TRIPOD table.

If a leg swings backward instead of forward, flip its hip direction sign in the gait code. Do not rewire the servo, because the mapping is the fault.

Set the robot down and walk it 3 feet. If it tips forward, shorten the swing from 110 degrees toward 100 degrees. Short steps keep the body over the support tripod.

FAQ

How many servos does a hexapod need?

Eighteen servos: three per leg times six legs. Each leg has a hip servo, a knee servo, and an ankle servo. One PCA9685 drives 16 servos, so this build uses two boards.

What is the tripod gait?

Three legs hold the body up while the other three lift, swing forward, and set down. Then the two tripods swap. The body always has three legs on the ground, so it stays stable without balancing.

Why does my hexapod jitter when it walks?

The servo supply sags under the start-up spike of 18 servos. Add a 1000 microfarad capacitor across each V+ terminal, check the supply current rating, and tighten the terminal screws.

Can I power 18 servos from USB?

No. Eighteen micro servos together draw several amps while walking and far more at stall. Use a separate 5 to 6 V supply rated at 10 A or more for the servo rail.

Does the kit include a battery?

No. The kit needs 2x 3.7 V 18650 flat-top cells plus a charger, none included, and the remote takes 1x 9 V battery or USB power. For the PCA9685 servo rail in this post, use a bench supply for indoor testing.

Parts used

Build it with the Hexapod Spider Robot Kit with Remote, Six Legs with 18 Motors, Arduino IDE Compatible, Walking and Crawling STEM Project (Battery Not Included) and the PCA9685 16-Channel PWM Servo Driver Board, 12-Bit IIC Interface, Arduino + Raspberry Pi, 2-Pack (two boards cover 18 servos; one board drives only 16). For a servo arm build without the driver board, see How to Build a Robot Arm with ESP32 and Servo Motors, and the arm build uses the same driver in Joystick Robot Arm: 4-Axis Control with PCA9685. For the servo signal behind the positions, see Digital vs Analog Servo Guide: Which Servo Holds Center.

Sources

Last updated: 2026-11-21. Search volume: not verified. Product links use the store short link form with the product ID; confirm the product slug at publish time.

Joystick Robot Arm: 4-Axis Control with PCA9685

4-axis joystick controlling a 4-DOF acrylic robot arm with claw

Joystick Robot Arm: 4-Axis Control with PCA9685

Control a joystick robot arm with a 4-axis joystick and a PCA9685 servo driver. The joystick gives three analog axes, X tilt, Y tilt, and Z twist, plus a momentary button on top, which the listing counts as the fourth axis. X maps to base rotation, Y maps to the shoulder, and Z twist maps to the elbow.

Quick facts

Item Value
Arm 4-DOF acrylic arm kit with claw, 4 SG90 servos in the With SG90 option
Joystick 4-axis potentiometer, 10 k, X Y tilt plus Z twist, top button; 3 analog outputs plus the button
Driver PCA9685, 16 channels, I2C address 0x40
Controller Arduino Uno R3, 5 V logic
Joints Base, shoulder, elbow, plus claw; 4 servos, no wrist joint
Servo supply Separate 5 to 6 V, sized for stall current

Joystick robot arm: what does each joystick axis control?

The joystick gives three analog signals, one per potentiometer, plus the top button. The X tilt controls the base rotation, so pushing the stick left and right spins the arm around its vertical axis. The Y tilt controls the shoulder, so pushing forward and back raises and lowers the upper arm. The Z twist controls the elbow, so twisting the stick bends the forearm. There is no fourth analog output on this joystick: the fourth axis in the product name is the momentary top button, and this arm kit has no wrist joint, so no wrist mapping exists. The button toggles the claw instead.

That mapping is a choice, not a law. If the twist feels wrong for the elbow, swap the elbow and shoulder assignments in the code. The mapping lives in three lines, one per joint, so changing it takes a minute. Keep the mapping you choose written on a card next to the joystick until it becomes habit.

The top button toggles the claw. Press once and the claw closes, press again and it opens. A toggle suits a claw, because holding a button down while the arm moves is awkward. The sketch debounces the button with a 200 ms debounce interval, so one press never registers as two.

How do you map a joystick reading to a servo angle?

Each joystick axis is a 10 k potentiometer, so the Uno analog pin reads 0 to 1023. Center is near 512. The sketch reads the pin, subtracts the center, and applies a dead zone of about 30 counts so a resting stick sends no motion. Outside the dead zone, the reading maps to a small angle step per loop, not to an absolute angle.

Relative control suits an arm. The stick sets the speed and direction of each joint, and the joint holds its position when the stick centers. Absolute control, where the stick position equals the joint angle, is simpler to code but twitchy in practice, because a small stick move swings the joint a long way.

Each joint has a safe angle range in the sketch. The base runs 0 to 180 degrees, the shoulder 30 to 150 degrees, and the elbow 30 to 150 degrees. The claw runs 20 to 160 degrees. Those limits keep the arm from driving its own joints into the table or past the servo end stops. Adjust them for your arm after the first test, and write the final numbers down.

How do you wire the joystick and the PCA9685?

The joystick has three analog outputs, one per potentiometer, plus a button output. The X and Y potentiometers end in solder tabs on the sides of the base, so solder wires to them and meter each wire before you connect it. The Z potentiometer comes prewired: red and white are the reference ends and black is the wiper. Wire each potentiometer as a voltage divider across the 5 V supply and read the wiper on an ADC pin: X wiper to A0, Y wiper to A1, and Z wiper (black wire) to A2. The top button has two blue wires: connect one to digital pin 2 and the other to ground, and use INPUT_PULLUP, so a press reads LOW.

The PCA9685 connects over I2C. Connect its VCC to the Uno 5 V pin, its GND to ground, its SDA to A4, and its SCL to A5. Connect the separate 5 to 6 V servo supply to the V+ screw terminal, and join the supply ground to the Uno ground. The servo plugs go on channels 0 to 3: base, shoulder, elbow, and claw.

Keep the joystick wires short and away from the servo power wires. Servo current spikes can couple into long analog wires and make the joints jitter. If a joint trembles with the stick centered, widen the dead zone from 30 to 50 counts before you change anything else.

How do you tune the arm so it moves smoothly?

Start with slow steps. The sketch moves each joint by at most 1 degree per 20 ms loop, which is about 50 degrees per second at full stick deflection. That is fast enough to feel responsive and slow enough to stay controllable. Raise the step to 2 degrees only after the arm tracks well at 1 degree.

Load changes everything. An empty claw moves freely, but a loaded claw sags the shoulder and elbow servos. Test with the load you plan to lift, not empty. If the shoulder sags under load, raise the servo supply from 5 V to 6 V, which adds torque, or reduce the load. Do not raise the supply above the servo 6 V rating for SG90 servos.

If the arm oscillates, the steps are too large or the dead zone is too small. Lower the step size first. If one joint alone oscillates, check its pulse calibration, because a pulse past the servo end stop makes the servo fight its own gears and buzz.

Wiring

Wire the build with the power off. Check every connection in the table before you connect any battery or USB cable.

From To Notes
Joystick VCC Uno 5 V 10 k potentiometers, 5 V logic
Joystick GND Uno GND Common ground
Joystick X wiper Uno A0 Base rotation, analog 0 to 1023; solder tabs on the base, meter before soldering
Joystick Y wiper Uno A1 Shoulder, analog 0 to 1023; solder tabs on the base, meter before soldering
Joystick Z wiper, black wire Uno A2 Elbow, analog 0 to 1023; red and white are the reference ends
Joystick top button, blue wires Uno digital pin 2 and GND Claw toggle; INPUT_PULLUP, press reads LOW
PCA9685 VCC Uno 5 V Logic only, a few milliamps
PCA9685 GND Uno GND and servo supply negative Common ground for all three
PCA9685 SDA Uno A4 I2C data
PCA9685 SCL Uno A5 I2C clock
PCA9685 V+ screw terminal Separate 5 to 6 V supply positive Servo power only; size for stall current
PCA9685 channel 0 Base servo Signal, V+, GND
PCA9685 channel 1 Shoulder servo Signal, V+, GND
PCA9685 channel 2 Elbow servo Signal, V+, GND
PCA9685 channel 3 Claw servo Signal, V+, GND; toggled by the top button

Power budget

The logic side draws only a few milliamps from the Uno 5 V pin: the joystick potentiometers and the PCA9685 chip. The servo side draws whatever the servos demand. Four micro servos moving together draw on the order of 1 A under light load, and far more when they start or stall together.

Use a separate 5 to 6 V supply rated at 3 A or more for the V+ terminal. Never power the servos from the Uno 5 V pin. The Uno regulator supplies about 500 mA from USB, and a single stalled micro servo can exceed that. The board will reset and the arm will drop. No authoritative TowerPro datasheet publishes an SG90 stall current, so do not size the supply from a single stall number: the 3 A rating above is a planning rating with headroom, and meter your own servos if you need an exact figure.

Add a 470 to 1000 microfarad capacitor across V+ and ground at the terminal. The servos draw sharp spikes when they start moving, and the capacitor absorbs them. Without it, the rail sags and every joint jitters at once.

Build steps

  1. Assemble the 4-DOF acrylic arm kit with the claw. Fit the 4 SG90 servos and confirm each joint moves freely by hand before you power anything. Buy the With SG90 option: the Arm Only option ships as acrylic parts and screws with no servos.
  2. Mount the PCA9685 near the arm base. Connect the four servos to channels 0 to 3 in base, shoulder, elbow, and claw order.
  3. Wire the joystick to the Uno analog pins and the button to digital pin 2 from the wiring table.
  4. Wire the PCA9685 I2C pins and the separate servo supply. Join the supply ground to the Uno ground. Leave the servo supply off for now.
  5. Install the Adafruit PWM Servo Driver library. Upload the sketch below with the servo supply still off.
  6. Switch the servo supply on. The arm should park at its home position: base 90, shoulder 90, elbow 90, claw open.
  7. Push the stick in each direction and confirm the right joint moves. Press the top button and confirm the claw toggles. Calibrate the pulse limits per joint until no servo buzzes at its ends.

Code

Library: Adafruit PWM Servo Driver library. Board: Arduino Uno R3. Each joystick axis drives one joint in relative steps, and the top button toggles the claw. The joystick has three analog axes, so the claw is the only joint on the button; the kit has no wrist joint.

// Joystick robot arm: 4-axis joystick + PCA9685, 4 servos
// Board: Arduino Uno R3. Library: Adafruit PWM Servo Driver.
#include 
#include 

Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40);

#define SERVOMIN 150   // About 730 microseconds at 50 Hz; calibrate per servo
#define SERVOMAX 600   // About 2930 microseconds at 50 Hz; calibrate per servo
#define SERVO_FREQ 50

const int JOY_X = A0;  // Base
const int JOY_Y = A1;  // Shoulder
const int JOY_Z = A2;  // Elbow
const int BTN_PIN = 2; // Claw toggle, INPUT_PULLUP

const uint8_t CH_BASE = 0, CH_SHOULDER = 1, CH_ELBOW = 2;
const uint8_t CH_CLAW = 3;

// Safe joint ranges in degrees. Adjust for your arm after testing.
const int LIM[4][2] = {{0, 180}, {30, 150}, {30, 150}, {20, 160}};
int angle[4] = {90, 90, 90, 20};  // Start parked, claw open
bool clawClosed = false;
unsigned long lastBtnMs = 0;

uint16_t angleToPulse(int a) {
  return map(constrain(a, 0, 180), 0, 180, SERVOMIN, SERVOMAX);
}

void setServo(uint8_t ch, int a) {
  pwm.setPWM(ch, 0, angleToPulse(a));
}

// Read one joystick axis and return a step of -1, 0, or +1.
int readStep(int pin) {
  int v = analogRead(pin) - 512;  // Center is near 512
  if (v > 30) return 1;           // Dead zone of 30 counts
  if (v < -30) return -1;
  return 0;
}

void moveJoint(uint8_t ch, int step) {
  if (step == 0) return;
  angle[ch] = constrain(angle[ch] + step, LIM[ch][0], LIM[ch][1]);
  setServo(ch, angle[ch]);
}

void setup() {
  Serial.begin(115200);
  pinMode(BTN_PIN, INPUT_PULLUP);
  pwm.begin();
  pwm.setOscillatorFrequency(27000000);
  pwm.setPWMFreq(SERVO_FREQ);
  delay(10);
  for (uint8_t ch = 0; ch < 4; ch++) setServo(ch, angle[ch]);
}

void loop() {
  moveJoint(CH_BASE, readStep(JOY_X));
  moveJoint(CH_SHOULDER, readStep(JOY_Y));
  moveJoint(CH_ELBOW, readStep(JOY_Z));

  // Top button toggles the claw, debounced by 200 ms.
  if (digitalRead(BTN_PIN) == LOW && millis() - lastBtnMs > 200) {
    lastBtnMs = millis();
    clawClosed = !clawClosed;
    angle[CH_CLAW] = clawClosed ? LIM[CH_CLAW][1] : LIM[CH_CLAW][0];
    setServo(CH_CLAW, angle[CH_CLAW]);
  }
  delay(20);  // About 1 degree per 20 ms at full deflection
}

Test and tune it

Center the stick and confirm all joints hold still. A joint that creeps with a centered stick has a joystick reading outside the dead zone. Widen the dead zone from 30 to 50 counts.

Move each joint to both ends of its range. A servo that buzzes at an end is past its mechanical limit. Lower the limit in the LIM table for that joint until the buzz stops.

Pick up a light object with the claw and hold it for 30 seconds. If the shoulder sags, raise the servo supply from 5 V to 6 V or reduce the load. Do not exceed the SG90 6 V rating.

FAQ

Which joystick axis controls which joint?

X controls the base, Y controls the shoulder, and Z twist controls the elbow. The top button toggles the claw. There is no fourth analog axis and no wrist joint on this kit: the fourth axis in the product name is the top button. Swap the assignments in the code if another mapping feels better.

Why does the arm jitter when the stick is centered?

The joystick reading sits outside the dead zone, or servo current spikes are coupling into the analog wires. Widen the dead zone to 50 counts and keep the joystick wires away from the servo power wires.

Why does the arm drop when I power it on?

The servos have no holding torque until the sketch parks them, and the Uno 5 V pin cannot hold them under load. Power the servos from the separate V+ supply and let the sketch park the arm at startup.

Can I use MG996R servos on this arm?

Only if the arm frame and the supply suit them. An MG996R draws up to 2.5 A at stall on 6 V, so four of them need a far larger supply than four SG90 servos. Check the arm kit servo mounts first.

How do I stop a joint from hitting the table?

Set its safe range in the LIM table in the sketch. The shoulder and elbow limits of 30 to 150 degrees keep the arm from driving its joints into the table or past the servo end stops.

Parts used

Build it with the 4-Axis Joystick Potentiometer with Momentary Top Button, 10K, X Y Tilt plus Z Twist, for Arduino, ESP32, and Robot Projects, the PCA9685 16-Channel PWM Servo Driver Board, 12-Bit IIC Interface, Arduino + Raspberry Pi, 2-Pack, and the 4-DOF Acrylic Robot Arm Kit with Claw for Arduino, Unassembled, SG90 / UNO / Rocker Options. For a servo arm build without the driver board, see How to Build a Robot Arm with ESP32 and Servo Motors, and the servo signal behind the positions is Digital vs Analog Servo Guide: Which Servo Holds Center.

Sources

Last updated: 2026-11-21. Search volume: not verified. Product links use the store short link form with the product ID; confirm the product slug at publish time.