NEW: RoboRover Core is live! Educational robot base with USB-C rechargeable battery, sensors, OLED + Wi-Fi — ready for projects. 🤖

Orders via Akis Express or Box Now (before 12 PM) Mon–Fri ship same day. Cyprus Post orders ship next working day. 🚀

Kypruino Interactive Spooky Pumpkin: Build a motion activated Halloween themed pumpkin with lighting and sound effects!

Glowing pumpkin cover photo.

Team Robo |

In this project, we will build a motion-activated Halloween pumpkin using a Kypruino, a PIR motion sensor, the Kypruino’s onboard NeoPixels, and its onboard buzzer.

When someone walks past the pumpkin, the motion sensor triggers a flickering orange light effect while the buzzer plays the first four seconds of the Halloween theme. The transparent 3D-printed shell allows the light to spread through the pumpkin, creating a soft candle-like glow.

This guide is written so that beginners can follow along. You do not need advanced electronics experience, but you should be comfortable connecting a simple sensor, uploading an Arduino sketch, and assembling a small 3D-printed enclosure.

Project Resources: Source Code & 3D Printing Files.

The completed motion-activated Halloween pumpkin, combining a transparent printed shell, flickering NeoPixels, and sound.

The completed motion-activated Halloween pumpkin, combining a transparent printed shell, flickering NeoPixels, and sound.

What the project does

The pumpkin waits for someone to pass nearby. When motion is detected, it begins a short light-and-sound sequence before returning to its idle state.

  • Motion detection: a PIR sensor detects movement in front of the pumpkin
  • Candle-style lighting: the onboard NeoPixels flicker in warm orange and red tones
  • Sound effect: the onboard buzzer plays the opening of the Halloween theme
  • Automatic reset: after the sequence ends, the pumpkin waits for the next movement
  • Hidden electronics: the Kypruino, sensor, and wiring are mounted inside the shell
  • USB-C power: a rear opening allows the pumpkin to remain powered without removing the electronics

The result is a reusable Halloween decoration that reacts to people instead of remaining as a static prop.


Components needed

For this build, you will need:

The project uses the Kypruino’s built-in NeoPixels and buzzer, so no separate LEDs or sound module are required.


How the system works

PIR motion detection

A Passive Infrared, or PIR, sensor detects changes in infrared radiation. People and animals naturally emit infrared energy, and the sensor reacts when a warm object moves across its detection area.

When movement is detected, the sensor sends a digital signal to the Kypruino. The program then begins the light-and-sound sequence.

NeoPixel flicker effect

The Kypruino’s onboard NeoPixels illuminate the pumpkin from inside. Their brightness changes randomly during the effect, producing a flicker similar to a candle flame.

Onboard buzzer

While the NeoPixels flicker, the onboard buzzer plays the first four seconds of the Halloween theme. Once the sequence finishes, the lights turn off and the pumpkin waits for another movement.


The Kypruino

The Kypruino acts as the brain of the project. It reads the signal from the PIR sensor and controls both the light and sound effects.

Like a standard Arduino-compatible board, it can read inputs from sensors and control outputs such as LEDs, buzzers, and motors. The Kypruino also includes several useful components directly on the board, including:

  • NeoPixel LEDs
  • Onboard buzzer
  • General-purpose buttons
  • Additional connection ports
  • USB-C programming and power

Because the NeoPixels and buzzer are already built in, the project requires very little external wiring.


The PIR motion sensor

The PIR motion sensor detects movement by sensing changes in infrared radiation. When a person or animal moves in front of it, the output pin changes state and triggers the pumpkin.

Typical features of the sensor include:

  • Detection angle: approximately 100°
  • Detection range: up to approximately 7 metres
  • Operating voltage: approximately 4.5–12 V
  • Adjustments: sensitivity and trigger-delay potentiometers

The exact detection distance depends on the sensor settings, mounting position, room temperature, and surrounding environment.


Designing and 3D printing the pumpkin

The model was created to make it easier to install and power the electronics.

  1. A flat internal base was added so the Kypruino could be mounted securely with holders.
  2. A hole was added at the back of the shell so the USB-C cable could reach the board.
  3. A dedicated holder for the PIR sensor was created at the pumpkin's "nose" area, for better motion detection.

You can download our modified model from the project GitHub repository.

Showing the inside of the pumpkin.

Showing the inside of the pumpkin.

Choosing the filament

Print the pumpkin using transparent or translucent PLA or PETG. This allows the light from the NeoPixels to spread through the shell instead of shining only through the eyes and mouth.

A thinner or lighter-coloured shell generally allows more light to pass through. However, the walls should still be strong enough to support the electronics and repeated handling.

Preparing the printed parts

After printing:

  1. Remove any supports and loose material
  2. Check that the USB-C cable fits through the rear opening
  3. Test the Kypruino’s position on the base
  4. Confirm that the PIR sensor can be mounted in the nose opening
  5. Check that the shell closes
The transparent printed shell allows the onboard NeoPixel light to spread through the pumpkin and create a soft glow.
The transparent printed shell allows the onboard NeoPixel light to spread through the pumpkin and create a soft glow.

Wiring the project

Place the Kypruino inside the pumpkin with its USB-C port facing the rear cable opening. Make sure the onboard NeoPixel and buzzer switches are enabled.

Connect the PIR sensor using three male-to-female DuPont wires.

PIR Sensor Pin Connects to Kypruino
VCC 5V
GND GND
OUT D7

Power is supplied through the USB-C cable entering through the hole at the back of the pumpkin.

The PIR sensor should face through the pumpkin’s mouth or another large opening. This gives it a clearer view of the surrounding area and improves motion detection.

We used double-sided tape to secure the Kypruino and sensor. Screws or standoffs can also be used for a more permanent installation.

Wiring diagram showing the PIR sensor connected to 5V, GND, and digital pin D7 on the Kypruino.

Wiring overview showing the three connections between the PIR motion sensor and the Kypruino.

Installing the Arduino library

Before uploading the code, install the required NeoPixel library in the Arduino IDE.

  1. Open the Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries...
  3. Search for Adafruit NeoPixel
  4. Install the library

The sketch also uses the standard Arduino tone functions to play the melody through the onboard buzzer.


Uploading the code

Connect the Kypruino to your computer using the USB-C cable. Open the Arduino IDE, select the correct board and port, then upload the Halloween pumpkin sketch.

The PIR sensor is connected to:

const int PIR_PIN = 7;

The Kypruino’s onboard NeoPixels are connected internally to:

const int PIXEL_PIN = 8;

The onboard buzzer is connected internally to:

const int BUZZER_PIN = 9;

You can find the complete code in our GitHub repository.


Understanding the program

1. Waiting for movement

During normal operation, the Kypruino continuously checks the signal from the PIR sensor. The NeoPixels and buzzer remain off until movement is detected.

2. Starting the flicker effect

When motion is detected, the NeoPixels turn orange and red. Their brightness changes randomly to create the appearance of a flickering candle.

The brightness varies approximately between:

75 and 255

3. Playing the theme

At the same time, the onboard buzzer plays the first four seconds of the Halloween theme.

4. Cooldown and reset

After the sequence finishes, the lights turn off. The project then waits through a short cooldown period before allowing the PIR sensor to trigger the effect again.

This prevents one movement from repeatedly restarting the sequence.


Assembling the pumpkin

Once the circuit and code are working correctly, install the electronics inside the printed shell.

  1. Place the Kypruino on the flat internal base
  2. Position the PIR sensor behind the mouth or another suitable opening
  3. Connect the sensor to 5V, GND, and D7
  4. Turn on the Kypruino’s NeoPixel and buzzer switches
  5. Route the USB-C cable through the rear opening
  6. Secure the board, sensor, and loose wires
  7. Close the pumpkin and test the detection range

Avoid placing wires directly in front of the NeoPixels, as they may create visible shadows through the transparent shell.

You may also need to adjust the PIR sensor’s sensitivity and delay settings after assembly. Start with a short delay and moderate sensitivity, then test the pumpkin from the distance at which it will normally be used.


Testing the project

After assembly, place the pumpkin on a table and connect the USB-C cable.

  1. Wait briefly for the PIR sensor to stabilise
  2. Walk in front of the pumpkin
  3. Check that the NeoPixels begin flickering
  4. Listen for the short melody from the buzzer
  5. Wait for the cooldown period
  6. Move in front of the sensor again to confirm that it can re-trigger

If the pumpkin triggers too easily, reduce the PIR sensitivity. If it does not detect movement reliably, check that the sensor lens has a clear view through the pumpkin opening.

The finished pumpkin during its motion-triggered sequence, with the transparent shell producing a soft candle-like glow.

What students can learn

This project introduces several useful STEM concepts:

  • Digital input from a motion sensor
  • PIR motion detection
  • NeoPixel colour and brightness control
  • Randomised lighting effects
  • Generating notes using a buzzer
  • Sequencing multiple outputs in code
  • Cooldown and retrigger timing
  • 3D-printing enclosures for electronics
  • Mounting, wiring, and cable management

It also demonstrates an important engineering idea: adding a sensor can turn a static object into an interactive system that responds automatically to its surroundings.


Possible extensions

  • Experiment with different NeoPixel colours, transitions, or gradients
  • Create additional flicker patterns or lighting sequences
  • Try different melodies or sound effects
  • Add a small speaker for richer audio
  • Add a rechargeable battery pack to make the pumpkin cordless
  • Add an LDR so the pumpkin only activates when the room is dark
  • Add different effects depending on how long motion is detected
  • Use the same electronics inside other seasonal decorations

Final thoughts

This project combines 3D printing, electronics, and programming to turn a simple pumpkin model into something that feels alive.

Using only a Kypruino, a PIR motion sensor, and a printed enclosure, the build creates an effective Halloween decoration with light, sound, and automatic interaction.

It is beginner-friendly, reusable, and easy to customise with different models, colours, sounds, or animations.

Final view of the completed Halloween pumpkin, ready to detect movement and surprise passing visitors.

Final view of the completed Halloween pumpkin, ready to detect movement and surprise passing visitors.

Leave a comment

Please note: comments must be approved before they are published.