How to Build a Raspberry Pi-Powered Zombie Arm for Halloween

Raspberry Pi-powered Zombie Arm
(Image credit: Tom's Hardware)

Halloween is my favorite time of the year and what better way to spend it than creating animatronics with a Raspberry Pi to scare trick or treaters. This year I’m building a series of smart devices for my porch on Halloween. I’ve always wanted to build a zombie arm that jumps out as people walk by - and we’ll show you how to do it with a bit of pneumatics, a relay, and a Raspberry Pi. 

What You’ll Need For This Project

How To Build a Zombie Arm for Halloween with a Raspberry Pi

1. Set up your Raspberry Pi. If you don’t know how to do this, check out our story on how to set up your Raspberry Pi for the first time or how to set up a headless Raspberry Pi (without monitor or keyboard).

2. Install git as necessary, and clone the repository to your Raspberry Pi.

cd ~/
sudo apt-get update && sudo apt-get -y install git
git clone

3. Descend into the cloned repository and run the installation command to install all lower-level and python-based requirements for the project to work.

cd ~/zombie_arm
make install

4. Attach your pneumatic control valve to a small piece of wood. This is entirely optional, but I like to have everything secure in one place. 

(Image credit: Tom's Hardware)

5. Attach your relay module to a small piece of wood. Once again, this is entirely optional.

(Image credit: Tom's Hardware)

6. Wire the negative end of your 12v power supply together with two small strands of wire using a wire nut or WAGO connector.

(Image credit: Tom's Hardware)

7. Attach the two negative wires coming from the wire nut / WAGO connector to the left-most ports of channels 4 and 3 or your relay.

(Image credit: Tom's Hardware)

8. Attach a few inches of wire to each terminal of your pneumatic control valve; each end should have a positive and negative wire coming from it.

9. Attach the positive ends of both wires coming from the pneumatic control valve together with the positive end of the 12v power supply. You can use wire nuts or a WAGO connector to do this.

10. Attach the negative ends of the wires coming from the pneumatic control valve to the middle port of channels 4 and 3 of the relay

(Image credit: Tom's Hardware)

11. Wire the 12v and ground pins from your relay to GPIO pins 4 and 6 on the Raspberry Pi.

12. Wire channels 4 and 3 from the relay to GPIO pins 8 and 10 on the Pi. 

(Image credit: Tom's Hardware)

13. Attach 3 quick connect adapters to the ports on your pneumatic control valve, and 2 to the ports on your pneumatic cylinder.

14. Attach two polyethylene tubes from your pneumatic control valve to each end of your pneumatic cylinder. 

(Image credit: Tom's Hardware)

15. Attach a source of compressed air to the input of your pneumatic control valve.

(Image credit: Tom's Hardware)

16. Test your system by using the manual push valves on the pneumatic control valve; the cylinder should actuate.

(Image credit: Tom's Hardware)

17. Drill a hole in your halloween zombie arm and hot glue it to the end of the cylinder

18. Set up the Wyze camera or Raspberry Pi camera. For this project you can substitute a simple motion sensor, but I wanted to make use of person recognition to trigger the hand, so I’m using a Wyze Cam V2 (V3 also works) to handle the detection.

(Image credit: Tom's Hardware)

19. Flash the custom RTSP firmware to your Wyze camera using this tutorial. Installing RTSP support allows us to connect to the camera and grab frames directly with Python.

20. Get the RTSP URL value from your Wyze application, and edit the RTSP_URL variable in the Makefile to point the Raspberry Pi to your camera. You can find the RTSP URL in the “Advanced Settings” section of your Wyze application on your phone.

nano Makefile
# Edit the file with your RTSP URL from your camera

21. Plug in your 12 volt power supply

(Image credit: Tom's Hardware)

22. Test the system by running the make run command. It should boot up and move the arm as a test to start, then only activate the arm when a person is detected. If your movements are backwards, reverse the two hoses going to the cylinder.

make run

(Image credit: Tom's Hardware)

23. Mount your system in a place where it can scare friends and family.

The majority of these components are not waterproof, so mount them in a way that they’ll stay dry. In addition, a pneumatic cylinder can be a dangerous component depending on how much pressure it’s given. To stay safe, set your regulator to the smallest amount of pressure required to move the arm, and make sure the arm has plenty of room away from people. Happy Halloween!

Ryder Damen
Freelance Writer

Ryder Damer is a Freelance Writer for Tom's Hardware US covering Raspberry Pi projects and tutorials.