Skip to content
New: the week's best robot price drops, every Friday.Get it free →
My Robots

SunFounder PiDog calibration not working: causes and fixes

When SunFounder PiDog calibration fails, the usual cause is a servo that was not zeroed before it was screwed in, followed by a low battery, a loose servo screw or a bad cable between the Raspberry Pi and the Robot HAT. Below are the fixes from SunFounder's PiDog docs, FAQ and forum staff, cheapest first.

Researched by the robotsforthat team · updated Oct 29, 2026 · How we research

Find your code

Parts that fix this

Affiliate links. We may earn a commission at no cost to you.

Short answer

Charge the battery fully first, since SunFounder staff point to low charge when PiDog twitches or shuts down during calibration. Then run the calibration script from the examples folder on a flat surface and line each leg up with the acrylic ruler. If a leg or the head sits far off, calibration cannot pull it back: SunFounder says calibration only makes small adjustments, so that servo has to come out, be zeroed again and go back in. If the script runs but no servo moves at all, the problem is the connection between the Pi and the Robot HAT, and SunFounder support asks for photos.

What you seeLikely causeFix
Legs twitch, head tilts, then the Pi shuts down or SSH dropsBattery low, or a stuck servo drawing high currentCharge the battery fully (staff suggest overnight), then re-zero any servo stuck at an extreme angle
Walks unsteady or limps after calibrationAngles not matched to the ruler, low battery or loose screwsRerun calibration with the 60 or 90 degree ruler, charge fully, tighten servo screws
One leg or the head sits far off and calibration cannot fix itServo was not zeroed before assembly, or moved after zeroingRemove that servo, zero it again, refit the horn to match the paper manual, recalibrate
One servo pushes against the joint and gets hotServo fitted at the wrong angle and stallingPower off, remove it, re-zero and reassemble from the zeroing step in the manual
Calibration menu shows angle changes but no servo movesNo connection between the Raspberry Pi and Robot HAT, often an unsoldered headerCheck I2C, the 40 pin header and every cable; send photos of both boards to SunFounder support
Calibration works only sometimes, IMU or RGB init fail messagesBad RGB light board connection chained to the IMURun the test scripts, try the light board's other connector, ask SunFounder for a new board if it still fails
Zero button does nothing on an original PiDogOnly PiDog V2 has the zero buttonUse the servo_zeroing.py script on the original PiDog
Servo hums, shakes or jitters even after re-zeroingLoose horn screw or a faulty servoTighten the screw, swap the servo to another PWM port to test, contact SunFounder for a replacement

From SunFounder's PiDog docs (Servo Adjust, Calibrating PiDog, FAQ) and SunFounder forum replies from staff, checked October 29, 2026.

What to do next

Still broken?Repair or replace

If it keeps coming back, contact the maker support first, especially under warranty. Out of warranty, compare the repair quote with a new robot.

Partsrobot parts

Every robot model we track, with prices and running costs.

I own oneGet fix alerts

One email for recalls, bad updates and new fixes for robot. Nothing else.

Didn't find it?Ask about your robot

We read every question. When several owners ask the same thing, the answer goes on this page.

1. Charge the battery and check power (free)

Start here because it costs nothing. On the SunFounder forum, a PiDog owner on a Raspberry Pi 5 saw the head tilt, the legs twitch and the Pi shut down during calibration. SunFounder staff first asked if the battery was fully charged and suggested charging it overnight.

SunFounder's FAQ says to charge with a 5V 3A Type-C adapter. A red light means charging and it goes off when full. If both battery level lights are off, the battery needs charging. Calibrate with the Robot HAT's power switch on, not just with the Pi plugged in, because the HAT powers the servos.

Staff also say a servo stuck at an extreme angle can draw high current and cause the Pi to restart. If the Pi keeps dropping out on a full battery, look for a servo that is jammed at the end of its travel and go to step 5.

2. Run the calibration script the right way

SunFounder's calibration page says to set PiDog on a flat surface, open a terminal and run these two commands: cd ~/pidog/examples and then sudo python3 0_calibration.py.

The menu asks which ruler you have: press 1 for the 90 degree ruler or 2 for the 60 degree ruler. Place the acrylic ruler as the pictures show, press 1 for the first servo and use w and s to line it up, then press 2 and do the same. Repeat for servos 3 to 8 so all four legs are done.

Staff on the forum say the 60 degree ruler is only for the eight leg servos. Head position is by eye: with PiDog facing you, make the camera face you squarely. When you finish, run a walking example again. SunFounder suggests recording the servo angles so you can restore them later.

3. Check the cables and the Pi to HAT connection

SunFounder's moderator gives this order: confirm the servos are wired in the right order, zero them, check each is mounted at roughly the right angle, then run 0_calibration.py.

If the menu shows angles changing but nothing moves, SunFounder's FAQ says this likely points to the GPIO connection between the Pi and the Robot HAT, often poor soldering on the Pi's 40 pin header or the HAT's female header. Zeroing still works in that case because it runs on the HAT itself. Make sure I2C is on and check with sudo i2cdetect -y 1.

If calibration works only some of the time and prints init fail messages for the RGB strip or IMU, one owner fixed it by testing parts one at a time. SunFounder's FAQ gives cd ~/pidog/test && sudo python3 imu_test.py for the IMU and cd ~/pidog/test && sudo python3 rgb_strip_test.py for the light board. In that thread, staff sent a new light board when swapping cables did not help.

4. Tighten loose servo horns and screws (free)

SunFounder's FAQ lists tight servo screws as one of four checks when PiDog walks unsteadily, along with installing servos at 0 degrees, matching the ruler and charging the battery.

Power off first. Check that each horn sits fully on its shaft and that the small screw through the horn is snug. A horn that slips will drift out of calibration each time the leg takes weight. Be careful not to drop a screw into the body: a SunFounder staff member warns the battery is strong enough to cause a short.

5. Re-zero a servo that was fitted at the wrong angle

This is the most common real cause. SunFounder's Servo Adjust page says servos ship at random angles, and a servo assembled at a random angle can move erratically, stall and burn out. A staff member explains that calibration can only make small electrical adjustments for mechanical misalignment, so a leg that is far off must be rebuilt.

On the original PiDog, the docs say to run cd ~/pidog/examples and then sudo python3 servo_zeroing.py, plug the servo into the P11 port, let it turn to 0 degrees, and keep the cable plugged in and the power on until the servo is fixed with its screw. Do not turn a powered servo by hand. If the arm went on at the wrong angle, pull it off and push it back on.

On PiDog V2, SunFounder staff say: power on the Robot HAT, press the zero button twice quickly, plug the servo into a PWM pin and it returns to zero. Keep it plugged in while you fix it in place. You do not need to unplug the other servos: staff say to re-zero only the wrong ones, then run calibration for all servos again.

Several owners found the head or one leg did not match the paper manual. Staff fixed a stuck head servo by removing the screw, taking the horn off, pressing the zero button, refitting the horn with the head facing forward and running 0_calibration.py again.

6. Know the V2 differences

SunFounder's FAQ says the original PiDog works with the Raspberry Pi 3B+, 4B and Zero 2 W but not the Pi 5. PiDog V2 supports the Pi 3, 4, 5 and Zero 2 W and has an improved Robot HAT, servo driver and power for the Pi 5.

V2 has a zero button on the Robot HAT that sets the servos to 0 degrees without a script. The docs say V2 owners can skip the Servo Adjust page, but a SunFounder moderator clarified that V2 still zeroes every servo during assembly, starting at step 11 of the V2 manual. Calibration with 0_calibration.py is required on both versions.

7. When a servo is really bad and how to get a replacement

A servo is likely faulty when it still hums, shakes or will not hold position after you have zeroed it, tightened it and charged the battery. A simple test from SunFounder staff is to move it to a different PWM pin. If the problem follows the servo, the servo is the problem. If every servo fails at once, suspect the HAT, the Pi or the header instead.

Email SunFounder support at [email protected]. In forum threads staff ask for your order number and shipping address, clear photos of the boards and a short video of the problem. The assembly page also says to contact that address about missing or damaged parts. A SunFounder staff member wrote that replacement Metal Gear Pro servos sell for about $9.99 each.

Questions people ask

Why won't my PiDog calibrate?

Usually a servo was not zeroed before it was screwed in, so it sits too far off for the calibration script to fix. Remove that servo, zero it again with servo_zeroing.py or the V2 zero button, refit it and rerun 0_calibration.py.

How do I run the PiDog calibration?

SunFounder's docs say to put PiDog on a flat surface and run cd ~/pidog/examples, then sudo python3 0_calibration.py. Choose 1 for the 90 degree ruler or 2 for the 60 degree ruler and adjust each leg with w and s.

Do I need to calibrate PiDog V2?

Yes. SunFounder's FAQ says calibration is required for both versions. V2 has a zero button for zeroing servos during assembly, but you still run the calibration script after the build.

Why is my PiDog shaking or jittering?

SunFounder's FAQ points to servos not installed at 0 degrees, angles that do not match the ruler, a low battery and loose servo screws. Charge fully and tighten the screws first, since those are free.

Why does my PiDog shut down during calibration?

SunFounder staff suggest a battery that is not fully charged, or a servo stuck at an extreme angle drawing high current. Charge the battery overnight and re-zero any servo jammed at the end of its travel.

How do I re-zero a PiDog servo after it is built?

Remove the servo's screw and horn, zero it with sudo python3 servo_zeroing.py on the original PiDog or a double press of the zero button on V2, then refit the horn so the part matches the paper manual.

How do I get a replacement PiDog servo?

Email [email protected] with your order number, photos and a short video of the problem. A SunFounder staff member wrote that replacement Metal Gear Pro servos sell for about $9.99.

Maker says 15+, great with a parentSunFounder GalaxyRVRSix wheels, a camera eye and NASA style suspension.About $130Check price
Best for 12+ or with a parentOtto DIYA small robot that walks, dances and dodges walls.Check price
12+ELEGOO Smart Robot Car Kit V4.0Follows lines, avoids walls and drives from an app.$66 to $80Check price
Cyber Monday is Nov 30Get the Cyber Monday prices on robot kits the day they drop

We check prices every morning and compare them with each model's 2026 low. One email when real deals land, plus our 5 minute Friday roundup. Unsubscribe anytime.