Kevin Corvisier
← Hexapod overview

Hexapod, part 1 of 4

Design & build

From the CAD model of a single leg to a robot with twenty servos, a sensor turret and an onboard computer: the mechanical design, the sensors, the power system and the small circuit board that ties the servos together.

CAD render of the hexapod from the front: six curved legs, a body with a cooling fan, and a pan-tilt head carrying a RealSense depth camera with a round lidar on top
The full CAD model. The head carries the depth camera, with the lidar on top.

Starting point

The hexapod started as a hobby and learning project. I wanted to get hands-on with sensors I hadn't used before, depth cameras and lidars, and to learn ROS 2 and machine learning on a robot of my own. I started in April 2023 by modelling a leg.

I took a lot of inspiration from other builders' hexapods: François Ubald Brien's Mildred, Matt Bunting's Dmitri and DerelictRobot's Orwell.

Mechanical design

Each leg has three Dynamixel XL430 servos: the coxa servo swings it forward and back, and the femur and tibia servos lift and extend it. The printed links bolt directly to the servo horns and cases, so the servos themselves are part of the structure. The tibia is a long, curved blade ending in a small foot tip.

Side view of one leg in CAD: a servo at the body end, a curved femur link to a second servo, and a long curved tibia ending in a foot tip
One leg in CAD: coxa servo at the body, curved femur, and the tibia blade. The link lengths are in part 2.

From the start I wanted a turret with a good camera on top. A hexapod suits that well: with three feet always on the ground, the body stays level and steady while it walks. The head pans and tilts on two more XL430s. The body is built in two levels: the leg servos bolt around the lower level, and the computer sits on the upper one, under the head.

CAD render of the hexapod from the rear: the Jetson Nano board visible inside the body, two Wi-Fi antennas, and a power switch on the side
From the rear: the computer inside the body (here the original Jetson Nano), its two antennas, and the main power switch.

Sensors

Both sit on the pan-tilt head, so the camera can look around without the robot turning.

Power & wiring

The servos want 11.1 V, while the original computer, a Jetson Nano, as well as the camera and the lidar, all run on 5 V. So everything starts from a 3S LiPo battery (11.1 V, 5200 mAh) and splits in two. The servos take the battery voltage directly, through a power hub. A buck converter steps the same supply down to 5 V, up to 4 A, for the Jetson. The Jetson then powers and talks to everything else over USB.

Power and data: the 11.1 volt LiPo goes through a switch to the power hub, which feeds the six legs and the neck, and a buck converter that supplies 5 volts to the Jetson Nano. The Jetson connects over USB to the RealSense, the RPLIDAR and the U2D2, which sends servo commands back through the hub. LiPo battery3S, 11.1 V, 5200 mAh Switch Power hubcustom PCB, 8 ports 6 legs3 × XL430 each Neck2 × XL430 Buck converter11.1 V → 5 V Jetson Nano B01ROS 2 in Docker RealSense D435idepth + colour + IMU RPLIDAR A1M8360° 2D lidar U2D2USB → servo bus 11.1 V 5 V, 4 A 11.1 V USB USB servo data
The original design, with the Jetson Nano. Thick coloured lines carry power, thin lines carry data. The U2D2 turns USB into the servos' serial bus, and its data line joins the battery power in the hub, so each leg receives power and commands on a single cable.

The servos chain together. Each leg is one cable from the hub to its coxa servo, then on to the femur and tibia servos. The head's two servos share the eighth port, the "neck". A U2D2 adapter from the Jetson provides the command line for the whole bus. At 1 Mbit/s, all twenty servos share it.

The power hub

Twenty servos on one bus need a clean way to distribute both 11.1 V and the data line, so I designed a small two-layer board for it in EasyEDA. It has eight B3B-EH-A 3-pin connectors, the same JST EH type the Dynamixel X-series uses, so the servo cables plug straight in. Two power connectors bring in the battery and pass the supply on to the buck converter.

PCB layout, top copper layer: a red copper pour over the board, two power terminal blocks labelled GND and 11.1V on the left, and eight 3-pin connectors CN1 to CN8
Top layer: the two power inputs on the left and the eight servo ports, CN1 to CN8.
PCB layout with copper pours hidden: a single trace links one pin of each of the eight connectors
With the copper pours hidden: one trace links the data pin of all eight ports. Power and ground run through the pours.

Computer & software platform

The first version ran on an NVIDIA Jetson Nano B01. Its JetPack 4.5 is based on Ubuntu 18.04, while ROS 2 Foxy targets Ubuntu 20.04, so ROS had to run inside a custom Docker container.

The robot now runs on a Jetson Orin Nano. Its JetPack is based on Ubuntu 22.04, so ROS 2 Humble runs natively, with no container in between, and there is far more GPU compute for perception and learned policies. For manual driving, an Xbox-style gamepad sends velocity commands, and its D-pad aims the head.

From there, the next step was making it walk: part 2 covers the kinematics and the gait controller.