A hobby-servo quadruped moves its leg motors inward to reduce unwanted body motion

robotics, quadruped, servos

This is the read-only HTML version. For the full Visual Space experience, open the app.

quadruped, servo mechanism — I

quadruped, servo mechanism — I
quadruped, servo mechanism — I

Source: DIY hobby servos quadruped robot on Hackaday.io · Miguel Ayuso Parrilla

leg design, gait control

Miguel Ayuso Parrilla’s Raspberry Pi quadruped connects Python kinematics to 12 hobby servos. Its later leg redesign tackles a problem that equations alone don’t remove: heavy motors moving far from a joint can disturb the body with every quick step.

Award badge 1
🤯 1
🎉 1

Getting a robot’s feet to the right coordinates is only part of making it walk well. Miguel Ayuso Parrilla’s DIY hobby-servo quadruped on Hackaday.io began as a physics undergraduate’s way to move beyond paper problems and learn control theory through hardware. The project documents both a working kinematic walking model and a later mechanical revision aimed at reducing the disturbance caused by swinging heavy leg motors.

The original setup uses a Raspberry Pi 4, an Arduino Mega, 12 hobby servos and an IMU, with commands coming from a PS3 DualShock controller over Bluetooth. It’s a learning platform rather than a field-ready robot—and its most useful lessons sit where the mathematical model meets the physical machine.

Moving the motors changes what the body feels

In his November 1, 2022 update, Ayuso Parrilla describes an earlier arrangement with the lower-leg motor at the femur joint. He reports that the mechanism lacked robustness and that moving a substantial motor mass far from the leg’s rotation axis disturbed the body during fast movements, making control harder.

The revised mechanism puts both the femur and tibia motors on the coxa frame, nearer the axis where the leg swings from the body. The important change isn’t simply a different leg shape: it concentrates the heavy components closer to that axis. This addresses the moving mass mechanically, rather than leaving the controller to compensate for all of it.

Ayuso Parrilla reported improved performance in a July 29, 2022 progress note, and the November update describes greater agility as the benefit of the new arrangement. The available excerpts don’t include comparative measurements, so that improvement remains a creator-reported result rather than a quantified benchmark.

Python chooses the pose; calibrated servos have to deliver it

The original software, mostly written in Python 3, combines a walking loop with a kinematic model. It accepts body-pose and foot-position commands as well as walking speed and direction. The Arduino handles signal input and output, separating that work from the Raspberry Pi’s higher-level calculations.

Kinematics connects the desired geometry to joint angles. It doesn’t, by itself, account for the forces that keep a moving robot balanced. That distinction explains why relocating motor mass matters even when the model already places the feet correctly.

There’s another translation step between those calculated angles and the real joints: each servo needs calibration. In the August 1, 2020 calibration log, Ayuso Parrilla describes disconnecting the servo outputs from their horns, commanding the zero positions and then reassembling the legs. Software offsets provide the finer adjustment afterward.

His angle-to-pulse conversion uses a straight-line relationship with a slope and an offset. The offset aligns the joint’s zero position; a different servo may also need a different slope, which he estimated from several angle-and-pulse measurements. A correct inverse-kinematics calculation can still produce the wrong physical pose if this mapping is wrong.

Builder Marc added a useful practical detail in a November 2021 comment: he slowly moved individual joints with a joystick, recorded their usable travel and limited commands before sending them to the Arduino. He warned that the servos could break printed parts. Those limits were his build modification, not an established feature of the original software.

The later PCB prepares for more feedback

The November 2022 update also introduces a connection board designed around a Teensy 4.1, rather than the original Arduino Mega arrangement. Its listed interfaces include an I²C connection for a BNO055 orientation sensor, 13 servo connections split across four power supplies, 13 analog inputs intended to read servo potentiometers, and battery-voltage sensing.

Those connections make room for additional measurements; they don’t establish that a complete feedback controller was running. Likewise, the August 27, 2020 foot-sensor proposal was explicitly an early design with measurement problems, intended to support a future force-aware model.

Power deserves attention too. The original overview assigns one converter to each group of three servos because Ayuso Parrilla gives a peak demand of up to 4 A per servo. For the later board, he specifically warns against simultaneously powering the Teensy through its 5 V pin and USB supply.

Treat the code as a starting point, not a finished kit

The September 15, 2020 simulation log describes using PyBullet mainly to debug the mathematics. It points to the V1_PCsimulation branch of the robot repository, including an example that can run without the physical robot.

There are version caveats worth keeping beside that invitation. After a commenter reported a simulated robot flipping over, Ayuso Parrilla’s July 2022 reply suspected simulation or URDF configuration problems and promised more stable code. In November 2022—the latest development log supplied here—he still described the public model as primitive, with improved code needing cleanup before release.

The useful lesson is to separate three jobs: calculating a foot position, translating it into a calibrated and bounded joint command, and managing the forces produced when the leg actually moves. This quadruped makes all three visible. Its later redesign is a reminder that better walking can begin by moving a motor, not just by adding another equation.

Source: DIY hobby servos quadruped robot

Robotics

3 Followers

Bring mechanisms, electronics and software together. Share robots and prototypes, compare sensing and control approaches, document experiments, and work through the practical challenges of building machines that act in the world.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.