Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The simplest motion-activated Arduino Halloween prop uses a PIR sensor to detect a change in infrared radiation and switch on the Arduino board’s built-in LED. Get that sensor-to-LED version working first; then, if you want a moving effect, add a positional micro servo with its own suitable power supply and a shared ground with the Arduino. The examples below explain the parts and wiring, but the combined prop and illustrative sketch have not been established as a tested build.

What do you need to build a motion-activated Arduino prop?

Start with a digital PIR motion-sensor module and a compatible Arduino board. A PIR sensor responds to changes in infrared radiation in its field of view and provides a digital output; it does not report how far away someone is or count visitors. The sensor’s actual supply-voltage range and pin order depend on the specific module, so check its labels and documentation before wiring.

LED-only prototype

  • An Arduino board. The UNO R4 Minima is one documented example, not a requirement.
  • A three-pin digital PIR module that is compatible with the board’s logic and supply voltage.
  • A USB power source appropriate for the Arduino, plus a breadboard and jumper wires.
  • The board’s built-in LED, which provides a simple indication that the sensor output has changed.

This first version has no moving parts and avoids the additional power and mechanical issues introduced by a motor. Adafruit’s Arduino PIR example connects a PIR output to D2, reads it with digitalRead(), and controls the board LED. Its particular 5 V wiring is an example for that setup, not a universal pinout or voltage recommendation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Optional moving effect

To make a lightweight prop element move, add a positional micro servo, a mounting bracket or hinge, and a separate supply rated for the chosen servo. The servo can swing a small cutout or similar lightweight element; it should not be expected to lift a load beyond the motor’s documented limits. Check the servo’s own voltage and current requirements rather than assuming a battery pack or the Arduino can supply them.

Popular on Amazon
Silkland 40Gbps USB C 90 Degree Right Angle Adapter 2 Pack, 240W USB4 | Male to Female Extender, 8K@60Hz, Thunderbolt 4/3, Steam Deck, ROG Ally, MacBook, Switch 2, iPhone 18/17/16/15, Quest 3 VR
  • 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
  • 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
  • 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
  • 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
  • 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.

Optional sound

Sound is a separate subsystem. Adafruit’s Halloween Scream Box uses an Audio FX Sound Board and a speaker matched to its output variant, but that project does not contain an Arduino. An Arduino-controlled sound addition needs a specified interface and its own verified wiring and code; the Scream Box is inspiration, not an interchangeable Arduino wiring plan.

How does a PIR sensor trigger a Halloween prop?

A PIR module detects changes in infrared radiation across its sensing area and signals a change through its digital output. The Arduino reads that signal and can respond by switching an LED or commanding a servo; the sensor itself does not tell the sketch a visitor’s distance.

When a person moves across a PIR sensor’s field of view, the sensor may change its output state. In the basic example, the Arduino reads the output as HIGH or LOW and turns the built-in LED on for HIGH and off for LOW. For a prop, the same reading can be used to begin an action, such as moving a servo to a chosen position.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Range and viewing angle are model-specific. Adafruit specifies up to 20 feet (6 meters) and 110° × 70° for its particular PIR module; those figures do not describe every PIR sensor. If the project must detect presence at a measured distance rather than motion, a PIR is not the right sensor by itself.

How do you wire the PIR sensor to an Arduino?

With power disconnected, identify the VCC, OUT, and GND labels on your exact module. For Adafruit’s documented 5 V example, VCC goes to 5 V, GND to Arduino GND, and OUT to digital pin D2; other modules can use a different pin order or voltage range.

Also popular on Amazon
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
  1. Read the module labels and ratings. Confirm which pin is supply, output, and ground, and check the permitted supply voltage and output behavior in the module documentation. Do not assume that a three-pin sensor uses the same left-to-right order as another module.
  2. Connect ground and supply. With the board unpowered, connect the sensor’s GND to Arduino GND and its VCC to a voltage the sensor supports. The 5 V connection below applies to Adafruit’s cited example only.
  3. Connect the output. Connect PIR OUT to D2 if you are following the sketch below. If you choose another digital pin, update the pin number in the code to match.
  4. Power the Arduino and let the PIR settle. Adafruit advises waiting 30–60 seconds for its PIR test setup to stabilize. Treat that as guidance for the cited setup, not a guaranteed warm-up time for every sensor module.
  5. Observe the LED response before adding a servo. Move across the sensor’s view and watch whether the output indication changes. If the built-in LED behaves opposite to your expectation, check the output logic and sketch rather than rewiring based on assumptions.

Adafruit’s PIR guide describes its sensor test setup and stabilization advice. Follow the documentation for the module you actually have if its pin labels, supply range, or controls differ.

What Arduino sketch can test motion before you add a servo?

First upload a small sketch that reads D2 and mirrors the PIR output on the built-in LED. It gives you a straightforward way to check sensor wiring and detection before a motor or prop mechanism complicates troubleshooting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const int pirPin = 2;
const int ledPin = LED_BUILTIN;

void setup() {
  pinMode(pirPin, INPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  int motion = digitalRead(pirPin);
  digitalWrite(ledPin, motion == HIGH ? HIGH : LOW);
}

This is an illustrative version of the documented read-and-indicate approach, not a claim that a particular board, sensor, and wiring combination has been tested together. If the Arduino IDE or board package reports a compatibility issue, check the documentation for that board and sensor rather than assuming all boards use identical pin behavior.

Keep this test in place until the sensor responds reliably in the intended setup. A servo can draw enough current to cause resets or erratic behavior if powered incorrectly, and adding it too early makes it harder to tell whether a fault is in the sensor, sketch, supply, or mechanism.

How do you add a servo without powering it from an Arduino pin?

The Arduino pin carries the servo’s control signal; the servo motor needs a suitable power source of its own. Connect the servo supply’s negative terminal to Arduino GND as well as to the servo ground, so the control signal and motor supply share a reference.

Also popular on Amazon
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  1. Choose a servo and supply as a pair. Use the servo documentation to select a supply with the correct voltage and adequate current capability for that motor and its load. The available data does not establish a universal servo voltage or current rating.
  2. Connect the control signal. Connect the servo signal wire to a digital output such as D5. The example sketch below uses D5.
  3. Connect motor power separately. Connect the servo’s power wire to the positive output of the appropriate external supply and its ground wire to that supply’s negative terminal.
  4. Join the grounds. Connect the external supply’s negative terminal to Arduino GND. Do not connect the external supply’s positive terminal to an Arduino GPIO.
  5. Check the wiring before powering up. Confirm the servo’s wire functions from its own documentation; wire colors are not a substitute for checking the specific model.

For the UNO R4 Minima, Arduino specifies an 8 mA-per-GPIO rating in its datasheet, modified October 21, 2026, and advises external power for servos. Arduino states: “Never connect devices that draw higher current directly to a GPIO.” That figure applies to this board’s GPIO specification; it is not a general current rating for every Arduino model or a motor-power budget.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Adafruit’s servo guide shows the Servo.h library building blocks attach() and write(). Its example page is framed around CircuitPython servo use, so it should not be mistaken for a complete Arduino prop circuit; use the Arduino code below as an original illustrative sequence and check library support for your board.

How can the sketch move a prop only when motion begins?

Use a change from LOW to HIGH as the trigger, rather than commanding the servo continuously while the PIR output remains HIGH. The following sketch illustrates that logic with a chosen home position, action position, and cooldown; the angles and timing are design settings that must be adjusted for the actual prop and mechanism.

#include <Servo.h>

const int pirPin = 2;
const int ledPin = LED_BUILTIN;
const int servoPin = 5;
const int homeAngle = 20;
const int actionAngle = 80;
const unsigned long cooldownMs = 3000;

Servo propServo;
int previousMotion = LOW;
unsigned long lastAction = 0;

void setup() {
  pinMode(pirPin, INPUT);
  pinMode(ledPin, OUTPUT);
  propServo.attach(servoPin);
  propServo.write(homeAngle);
}

void loop() {
  int motion = digitalRead(pirPin);
  digitalWrite(ledPin, motion == HIGH ? HIGH : LOW);

  bool risingEdge = (motion == HIGH && previousMotion == LOW);
  bool cooldownExpired = (millis() - lastAction >= cooldownMs);

  if (risingEdge && cooldownExpired) {
    lastAction = millis();
    propServo.write(actionAngle);
    delay(700);
    propServo.write(homeAngle);
  }

  previousMotion = motion;
}

Replace the example angles with positions that suit the particular servo and prop. A servo’s commanded angle is not a promise that a mounted mechanism can safely reach that angle: the arm, hinge, linkage, and prop can bind before the motor reaches its commanded position. Begin with the prop disconnected, find positions that move freely, and only then attach a lightweight element.

The delay(700) pauses the sketch while the effect runs. During that pause the loop does not check for another sensor transition, so a new event can be missed. A more responsive prop can use a non-blocking timing approach, but it still needs a clear state sequence: detect a new event, move to the action position, wait using elapsed time, return home, and rearm only after the input has gone LOW. The cooldown in this example is not a sensor or manufacturer specification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
BENFEI USB C Hub 5-in-1 with 4K HDMI(Certified), 100W Power Delivery, 3 USB-A, Silicone Cable, Aluminum Case Compatible with MacBook Pro/Air, iPad Pro, iMac, iPhone 15 Pro/Pro Max, XPS, Thinkpad
  • Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
  • Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
  • 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
  • 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
  • Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.

Why does a motion-activated prop trigger repeatedly or fail to trigger?

Start with the PIR output and wiring, not the moving mechanism. A sensor that has not settled, a mismatched supply, incorrect pin order, or an output pin connected to the wrong Arduino input can all make the expected response absent or confusing.

If there is no trigger

  • Verify VCC, OUT, and GND against the specific module’s labels and documentation.
  • Confirm that the sensor’s supply voltage is compatible with the connected power pin.
  • Allow the sensor to stabilize after power-up; Adafruit’s cited setup recommends 30–60 seconds.
  • Move across the sensor’s field of view and observe whether the output or built-in LED changes.
  • Check that the sketch’s input number matches the pin receiving PIR OUT.

If it triggers repeatedly or stays active

Some PIR modules expose sensitivity and retrigger controls; others do not. On Adafruit’s adjustable PIR, the H jumper retriggers while movement continues, while the L setting is non-retriggering. Those jumper labels and options should not be assumed to exist on other modules.

For a sketch-level response, trigger on a LOW-to-HIGH transition, add a cooldown if the effect needs recovery time, and require a LOW reading before rearming. Whether a continued HIGH should retrigger depends on the prop’s desired behavior and the sensor module’s own output mode.

If the servo twitches, resets the board, or stalls

  • Recheck the servo supply’s voltage, current capability, and polarity against that motor’s documentation.
  • Confirm the servo supply ground and Arduino GND are connected together.
  • Keep motor current off the Arduino GPIO; the pin is for the control signal.
  • Disconnect the prop from the servo horn and check whether the servo moves freely without a binding load.
  • Inspect for loose jumper wires or an unintended connection between external supply positive and an Arduino pin.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Should the prop use an LED, a servo, or sound?

Choose the effect that matches the complexity you are prepared to manage. An LED is the simplest proof of motion detection; a servo adds a power supply and mechanical design; sound adds a separate board, speaker matching, and integration work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Effect What it adds Main constraint
Built-in LED A visible confirmation that the PIR output is being read. Limited to a light-based indication; simplest first stage.
Positional servo Movement of a lightweight prop element in response to a trigger. Requires separate motor power, common ground, and a mechanism that does not bind.
Sound board and speaker An audio effect can be part of a Halloween scene. Requires compatible board and speaker selection plus a separately specified Arduino interface if Arduino control is desired.

Build one effect at a time. Verify the PIR and LED first, add and check the servo without a prop load, then attach the lightweight moving piece. If you decide to add sound, treat it as its own electrical integration rather than assuming an Arduino-free sound-box project supplies the missing control design.

Also popular on Amazon
𝟒𝐏𝐚𝐜𝐤 𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐝 USB to USB C Adapter,Type-C Female to A Male Charger Converter for iPhone 18 Charger,iWatch Ultra SE 9 10,iPhone 17 Pro Max 16 15 14,Samsung S25,AirPods,iPad,Car,Xbox
  • 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
  • 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
  • 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
  • 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
  • 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.

What should you check before placing the prop?

A working sensor-and-servo arrangement is not automatically suitable for every location. The materials here do not establish a weatherproof rating, runtime, total project cost, or performance result for the combined prop, so the enclosure, power arrangement, and operating conditions need to be selected for the actual installation.

  • Keep the servo’s movement path clear of fingers, loose wires, and anything that could catch in the linkage.
  • Secure the sensor and Arduino so movement of the prop does not pull on their wires or alter the sensor’s view.
  • Use a lightweight moving element and mechanically stop or limit travel where the prop design requires it.
  • Check the sensor’s documented field of view and mounting orientation for the intended approach path.
  • Recheck module ratings, board revision, and library support when selecting parts, because specifications and compatibility are specific to those components.

Adafruit’s PIR/servo jump-scare example uses a HalloWing and CircuitPython, while its Halloween Scream Box is Arduino-free. They can offer ideas for effects, but neither should be presented as proof that this Arduino wiring and illustrative sketch have been built and tested as a combined prop.

Frequently Asked Questions

Can a PIR sensor tell how close someone is to the prop?

No. A PIR module signals changes in infrared radiation rather than returning a distance measurement. If the effect must depend on a measured proximity, select a sensing approach that provides distance data and design its interface separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I leave a motion-activated Arduino prop running outdoors?

The cited component examples do not establish an outdoor or weatherproof rating for the combined build. Check the enclosure and each component’s environmental ratings before using the prop outside.

Will the prop count each person who walks past?

Not reliably: a PIR output represents motion activity, not a visitor identity or count. People passing close together or moving during a continuing detection can be indistinguishable to a simple trigger-and-cooldown sketch.

Can I use the HalloWing jump-scare project code on an Arduino?

Not as a direct substitute: that example is based on HalloWing and CircuitPython. Arduino code and wiring need to match the selected board, sensor, servo library, and power arrangement.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of November 8, 2026 12:27 am GMT.