This Raspberry Pi reaper scares trick-or-treaters using new AI camera

Raspberry Pi
(Image credit: Eugene Tkachenko)

Most Halloween-based Raspberry Pi projects are all about fun ways to interact with them and this one is no exception! Maker and developer Eugene Tkachenko has put together a creepy reaper hanging from his tree that uses the new Raspberry Pi AI Camera to detect trick-or-treaters and deliver a proper spook when they're nearby.

Scaring People with AI: Raspberry Pi Ai Camera SONY IMX500. Halloween Setup! - YouTube Scaring People with AI: Raspberry Pi Ai Camera SONY IMX500. Halloween Setup! - YouTube
Watch On

The way the project works is simple in its concept but definitely took a bit of engineering to complete. The idea was to hang a creepy grim reaper decoration from a tree in his front yard. A camera is used to monitor the yard for passing trick-or-treaters. When they get close to the reaper, it activates—flashing LEDs inside and playing some eerie audio. It also has a couple of red glowing LEDs for eyes.

The project is built around an existing Halloween prop. This reaper decoration comes fitted with a button that has to be pressed to activate the lights and sound effects which isn't exactly ideal for startling trick-or-treaters. To resolve this, Tkachenko removed the button and replaced it with a relay connected to an ESP32. The ESP32 module can then be activated remotely over Wi-Fi when it received a UDP message over the Wi-Fi network.

The main board powering the operation is a Raspberry Pi 5, but the attached Raspberry Pi AI Camera can be used with older models of Pi as the Sony IMX500 handles all of the AI "smarts".  The Python code for the camera has been written to detect people, and so camera monitors the yard for people to pass by, which triggers a conditional test in the Python code that then sends a signal to the ESP32 when they're close enough to get spooked by the reaper hanging in the tree. If an animal or exceptionally convincing werewolf costume walked by, then the camera would not be triggered.

Tkachenko was kind enough to make this project open source so you can easily recreate it or make something like it for yourself at home. Not only does he delve into how the source code works, he also shared a link to all of the code he created over at GitHub. Be sure to check out the video on YouTube to get a good idea of how it all goes together.

If you want to get a closer look at this creepy Raspberry Pi project in action, head on over to Eugene Tkachenko's official YouTube channel.

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.