High-Tech Halloween Decorations
Wednesday 08 October 2025
This is a project I've wanted to build for a good 10 years, but could never figure out a good way to keep electronics working inside an actual pumpkin. Now I have a 3D printer, that becomes a non-issue.
Model
I'm far from good enough at 3D modeling to model a pumpkin. I bought the printer to print tools, brackets and cases so if it's not square, I probably can't model it. I found a really nice pumpkin model on Printables here. I scaled this up 200x to get more or less the biggest pumpkin my printer can handle.
Electronics
Once it's complete, I want to put this in an area where I don't have a socket, so it needs to be battery powered. It's also not somewhere I can keep an eye on all night so I'd rather not put anything expensive in there. To that effect (and based on what I already had in my parts dump), I chose the following components:
The idea is, these parts will allow me to run the thing completely off batteries, not care if it gets stolen, and still do some interesting things. I connected everything together, then moved onto writing some code.
Code
Initially, I've just set up a motion activated fire effect. The code is super simple, but at a high level the Arduino will sit doing nothing until the PIR detects motion. It'll run my fire effect all the time that the motion is ongoing, and for 10 seconds afterwards before it turns off again.
#include <Adafruit_NeoPixel.h> #define LED_COUNT 10 #define LED_PIN 6 #define PIR_PIN 2 Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); uint32_t fire_orange = strip.Color(232, 50, 0); void setup() { pinMode(PIR_PIN, INPUT); strip.begin(); strip.show(); attachInterrupt(digitalPinToInterrupt(PIR_PIN), motion, RISING); } void motion() { while (digitalRead(PIR_PIN) == HIGH) { fire(); } int start = millis(); while (millis() < (start + 10000)) { fire(); } strip.clear(); strip.show(); } void fire() { strip.fill(fire_orange, 0, LED_COUNT); strip.setBrightness(random(1, 40)); strip.show(); delay(100); } void loop() {}
Results
I'm pretty happy with the result for one evening of work. Given more time and parts I'd like to switch to an Arduino that supports low power mode to gain battery life. The current setup draws around 30mA at idle so will burn through batteries pretty quickly. Given infinite power, I'd also like to make the fire effect permanent and do something more interesting on motion, but that's one for another year when I have mains power nearby.