This Halloween 2021 project consists of a real pumpkin (warty pumpkin) enhanced with sensors and actuators. When the pumpkin detects movement (via a PIR proximity sensor), it activates blinking lights and pre-recorded scary sounds for a period. Next, if someone gets very close to the pumpkin (i.e., less than 20 cm), it will spray a cool mist through one of its eyes. This cool mist spraying mechanism is done with a servo motor and thermal water spray. Next, I will present the project in detail.
Figure 1. Warty Monster Block Diagram
Overview
As shown in Figure 1, the electronics for this project is relatively straight-forward: I use an Arduino Uno board, a 5V battery pack, a PIR proximity sensor, an HR04 sonar sensor, and the effects are done with 5V LED lights, a 5V sound recording+playback device, and a custom-made cool mist spray mechanism. The control of the lights and sound devices is done via a relay board (shield). I used an 8-relay board, but only 2 relays are needed.
Sensors and Actuators
Figure 2 shows the frontal view of the scary pumpkin, featuring the sensors and the cool mist spray. Figure 3 shows the cool mist spray mechanism built with an MG995 servo motor and a thermal water spray. The MG995 rotates to an angle of 40 degrees to activate the spray. The Arduino code I used for this is below:
if (distance < 20) {
if (sprayTimer == 0) {
Myservo.write(40);
delay(1000);
Myservo.write(0);
sprayTimer++;
}
}
Figure 2. The Face of the Warty Monstart
Figure 3. Warty Monster Cool Mist Spray
For the sound effects, I used a device I bought from Taobao two years ago. Any device working at 5V which allows you to control it via a switch can be used for this project.
Finally, I recommend using a plastic bag inside the pumpkin to protect the circuits. Do not place the circuits and wires directly inside the pumpkin!
I attached my Arduino code to this post. Enjoy!