Skip to main content
Skip to content
Log in
Federated from deveco.io@drjonea@deveco.io View Original
cover image · 1280×720
Blog Post

Animatronic Head: Radar Tracking, LED Eyes and Eased Servos on a Pico RP2040

A clear plastic skull that turns to stare at you, with no camera inside. A 24 GHz radar sees straight through the plastic, an RP2040 decides who to look at, two servos move the head with eased, predator-like motion, and LED eyes change colour as you get closer. Open source C++, with a three-part video series.

DR
Dr Jon EA
@drjonea·Nov 9, 2026· 5 min read·#rp2040
0 views
Animatronic Head: Radar Tracking, LED Eyes and Eased Servos on a Pico RP2040

What it does

Walk into the room and the head wakes up, turns, and follows you. Move quickly and it snaps towards you. Stand still for 30 seconds and it gets bored and dozes off. It tracks up to three people at once, and the eyes show what it's thinking.

It started as a Halloween prop. It turned into a test bed for the three things every animatronic needs: sensing, natural movement and behaviour.

The hardware

  • Brain: Waveshare RP2040-Zero (the code also runs on a Pico or Pico 2), on my ReXP1 Neck PCB
  • Sensing: Keywave KW307 24 GHz radar, over UART. It reports distance and angle for up to three people across a 120° field of view, moving or still
  • Movement: two MG995 servos on a pan-tilt bracket, with their own 5 to 6 V supply and a shared ground
  • Eyes: two 7-LED WS2812B discs. The centre LED is the pupil and the outer six are the iris
  • Head: a clear plastic skull from a supermarket, on a 3D printed case

Three things worth stealing for your own builds

1. Radar instead of a camera. Radar goes through plastic, fur and fabric, so nothing on the outside gives the sensor away, and there's no image processing. The KW307 hands you a distance and an angle per person, which is exactly what a head needs to aim.

2. Servo easing. Servos accelerate flat out and stop dead, which is why hobby robots look robotic. Easing curves fix that. A sine in-out curve looks calm and natural, for waking up or turning to someone standing still. An exponential-in curve speeds up hard and stops abruptly: that's the strike when a target moves. Same servo, same angle, a completely different creature.

3. A state machine for behaviour. Radar data arrives by interrupt. The callback just stores it and returns: never move a servo inside an interrupt. The main loop runs a state machine (asleep, watching, hunting) that looks at how fresh the data is and how far the target has moved, then picks the next move and its easing curve.

The eyes run off the same data: the iris colour shows distance, the number of lit LEDs shows how many people it can see, and a pulsing pupil means it's asleep.

Lessons from the build

  • A simple L bracket won't hold an MG995. Mine snapped almost at once.
  • Don't heat neodymium magnets into a print. They lose their magnetism for good above about 80 °C.

Code, videos and write-ups

The same radar, easing and state machine code now drives my next animatronic, a snowman that watches the room and waves. If you build your own head, I'd love to see what it does when it wakes up.

DR
Written by
Dr Jon EA
@drjonea
YouTuber and Udemy author. Though formerly Director of Architecture at multiple companies, I now enjoy my time building embedded, IoT and Robotics projects to share.
Attachments

Comments

Replies to this content are sent to the original instance.

No replies received yet.