DIY Projects

Animate a Halloween Skeleton with a Raspberry Pi Pico and Servos

Animate a Halloween Skeleton with a Raspberry Pi Pico and Servos

A ₱200-ish Pico can make a cheap plastic skeleton wave, kick, and stare at trick-or-treaters with glowing eyes. That is why this Halloween build from the Raspberry Pi team is worth a look before October 31: it teaches servo control, sensor triggers, and LED wiring on one board, using a decoration you can buy for about £3.

What the Raspberry Pi team built

The starting point is a 90cm glow-in-the-dark skeleton that ships as ten loose parts: two per limb, one body, one head. The trick is choosing a “2D” skeleton where every joint swings in the same plane. Pop the limbs out of their pin-and-socket joints, screw a servo horn to each limb near the old joint, and mount the servos on a black-painted backing board of at least 45 x 21cm. Hips and shoulders get servos, so the skeleton can perform a few moves. Knees and elbows stay loose and flail on their own, which honestly looks better than stiff choreography.

A distance sensor makes the skeleton react when someone walks up, and a Raspberry Pi Pico runs the whole show. The full write-up, with photos and code, is on the Raspberry Pi news page.

Technical details that matter

Standard hobby servos expect a PWM signal at about 50Hz, with a pulse of roughly 1ms to 2ms setting the angle across a 180-degree range. The Pico‘s 3.3V GPIO pins can drive that signal wire directly, but the servos themselves want 4.8V to 6V, so power them from the VBUS pin (5V from USB) or an external supply, never from the 3V3 pin. Stick with 9g servos: bigger ones pull enough current to brown out the Pico over USB. Four servos moving at once is the moment this shows up, so a gotcha worth testing early is whether the Pico resets when all four sweep together.

Position each servo before you press the horn onto the shaft, otherwise a limb hits its end stop at the wrong angle. Joining four wires (power, ground, signal) is easiest with a solder joint and self-amalgamating tape. The eye LEDs use a three-wire strip: power, ground, and one data pin, so you can add as many LEDs as you like on a single GPIO.

Build it yourself

Grab a Pico or Pico W (any model works, the Wi-Fi is unused), four 9g servos, a distance sensor, and a strip of red LEDs. Write a MicroPython loop that sweeps a servo from 0 to 90 degrees when the sensor reads under 50cm, then wire it on a breadboard before you touch the skeleton. If your servo jitters, add a 100uF capacitor across its power pins. Pico boards and 9g servos are stocked at circuit.rocks, and the Book of Making 2027 project page lists the original parts.

Frequently Asked Questions

What does the animated skeleton use to move its limbs?

Four 9g hobby servos, one at each hip and shoulder, each screwed to a limb through a servo horn. A Raspberry Pi Pico sends each servo a 50Hz PWM signal, and knees and elbows are left loose to flail.

What parts and skills do I need to build it?

A Pico or Pico W, four 9g servos, a distance sensor, LED strip for the eyes, a 2D skeleton about 90cm tall, and a backing board of 45 x 21cm or larger. You need basic soldering, screwdriver work, and simple MicroPython.

What will I learn if I build this?

You will learn how PWM sets a servo angle, why servos need their own 5V supply instead of the 3.3V pin, how to trigger motion from a distance sensor, and how to mount mechanical parts so a microcontroller project survives real use.

This article was inspired by reporting from Raspberry Pi. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.