Steering Servo Issues on PiCar-X with Pi 5

I am encountering the same issues as the individual from this post, but there was no solution in the comments.

I’m running into an issue with the front steering on my PiCar-X (using a Raspberry Pi 5). I’m currently working with the 2.move.py example from the picar-x/example folder.

Issue:

  • When I initialize the car in Python with px = Picarx(), the front wheels immediately turn sharply to the right, even before any commands are issued.

  • When I try to use px.set_dir_servo_angle(0) in Python, the wheels still point far to the right.

  • When I attempt to zero the steering using the physical zero button, the wheels again immediately turn to the right.

  • For comparison, I successfully zeroed the camera tilt and pan servos using the same method.

Additional Details:

  • The car does not move forward when executing px.forward() commands because the wheels are offset.

  • Using negative angles (e.g., -35) only moves the wheels slightly left; the range seems misaligned.

  • The problem seems specific to the steering servo; the tilt/pan servos work as expected.

  • I suspect a combination of servo assembly offset and the broken zero button is causing the software to misinterpret the true center of the steering servo.

If necessary, I can provide a video of a live demonstration of where the issue is occurring.
I purchased this kit around 3 weeks ago. It is the Robot Hat V4 Version.

To better assist you with your servo assembly issue, we recommend providing a short video showing the problem. This will help us analyze and resolve it more effectively.

Based on common assembly issues, it is very likely that the servos were not correctly zeroed before being mounted. Please follow the correct servo zeroing procedure below to ensure proper assembly:

1.Power on the Robot HAT.

2.Press the ZERO button briefly.

3.Connect the servo cable to the PWM pin. You will see the servo move to its zero position.

4.Do not disconnect the servo at this point. First, mount and secure the servo according to the assembly instructions, then disconnect the cable.

Repeat steps 3 and 4 for each remaining servo, zeroing and mounting them one at a time.

Following these steps carefully will help prevent misalignment and ensure your servos function correctly.

Nevermind!! I fixed it. My issue was I didn’t completely unmount the servo when trying to zero it. Thank you for the assistance :slight_smile: