DEV Community

Cover image for Build Your Own Rocky: A Raspberry Pi 5 AI Robot That Talks
circuitrocks
circuitrocks

Posted on • Originally published at blog.circuit.rocks

Build Your Own Rocky: A Raspberry Pi 5 AI Robot That Talks

What happens when you give a Raspberry Pi a voice, seven servos, and the personality of a fictional alien engineer?

Leviathan Engineer answered that by building Rocky, the crab-like robot from the 2026 film Project Hail Mary (based on Andy Weir's novel). In the story an ordinary science teacher has to survive in deep space with help from Rocky. This home-built version recreates Rocky's rocking, scuttling movement and lets you hold a real conversation with it, which makes it a fun capstone or robotics-club project for anyone who wants to pair mechatronics with speech AI.

What's inside the build?

The brains are a 4GB Raspberry Pi 5. Movement comes from seven hobby servos wired through a PCA9685 driver HAT, a 16-channel, 12-bit PWM board that talks to the Pi over I2C on just the SDA and SCL pins. Seven servos pull far more current than the Pi's 5V rail can safely deliver, so the build adds a separate power supply for the motors and keeps logic and servo power sharing a common ground. An internal microphone and a small speaker handle the back-and-forth voice. On the software side, the maker installed Claude Code directly on the Pi to glue it all together: it captures speech, generates a reply in Rocky's clipped speaking style, then runs text-to-speech so the robot answers out loud. Because a language model is doing the reasoning, Rocky can respond to things that were never hard-coded, like returning a fist bump on request.

Try it yourself

Start small before committing to seven servos. Wire one servo to a PCA9685 breakout, set the I2C address (default 0x40), and sweep it with the Adafruit ServoKit library to confirm your wiring and power are solid. Once a single channel behaves, scale up one channel at a time and only then bolt everything into the body. If a servo jitters, check that your external supply shares a ground with the Pi; that is the usual gotcha. The full write-up is in issue 167 of the Raspberry Pi Official Magazine, and a Raspberry Pi 5 plus a PCA9685 HAT is all the hardware you need to start experimenting.


Originally published on blog.circuit.rocks.

raspberrypi #rpi #singleboardcomputer #linux #circuitrocks

Top comments (0)