One Saturday, one ESP32 board, and a cardboard box is enough to scare your whole barkada. Cytron Technologies published a guide for a “Haunted Box” built on their Maker ESP32 board, and Adafruit’s Halloween roundup flagged it as a motion-triggered prank anyone can finish in a weekend.
What they built
A PIR sensor watches the doorway. When someone walks past, the ESP32 fires three things at once: a servo motor jerks the lid or a prop, an RGB LED stick flashes red, and a connected laptop plays horror audio. Nothing in the chain is exotic. It is a sensor in, three outputs out, which is exactly the pattern behind many thesis-level alarm and automation builds.
Parts and cost reality
The shopping list is short: one ESP32 board, one PIR module (the common HC-SR501 runs on 5V and detects motion out to roughly 3 to 7 meters), one micro servo, one addressable RGB LED stick, jumper wires, and a box. Budget a few hundred pesos for the sensor, servo and LED stick combined if you already own the ESP32. The tricky part is power: servos draw current spikes when they move, so share a common ground and avoid pulling servo power from a weak USB port, or the board will brown out right at the scare. Give the PIR about 30 to 60 seconds to settle after power-up before you test it, or it will fire randomly.
Spend your Sunday on this
Saturday is for wiring: PIR output to one GPIO pin, servo signal to a PWM-capable pin, LED stick data to a third. Sunday is for code and tuning. Add a cooldown of about 5 seconds so the box does not retrigger on the same person, and test the servo angle with the lid closed before gluing anything. Start from the Cytron guide linked in the Adafruit post, then swap the laptop audio for a DFPlayer Mini if you want the box to run standalone. Boards, servos and jumper wires are available at circuit.rocks.
Frequently Asked Questions
How does the Haunted Box detect people?
A PIR motion sensor watches the area. When it senses movement it raises a GPIO pin, and the ESP32 then triggers the servo, the red RGB LED stick and the laptop audio.
What parts and skills does the Haunted Box need?
An ESP32 board such as Cytron’s Maker ESP32, a PIR module, a micro servo, an RGB LED stick, jumper wires and a box. Basic wiring and beginner Arduino-style code are enough.
What will I learn if I build this?
You will learn how to read a digital sensor input, drive a servo with PWM, control addressable LEDs and add a cooldown timer. You also practice power budgeting, a skill thesis and robotics projects constantly need.
