The Sneezing Scare Box!

by Kwaktillo in Circuits > Arduino

93 Views, 0 Favorites, 0 Comments

The Sneezing Scare Box!

aaaaaa.jpg
Sneezing Scare Box demonstration!

Welcome to the Sneezing scare box I made! Have you ever wanted to make something silly that will make your friends and family slightly disturbed? Well, you're in the right place!


A couple of weeks ago, I visited Amsterdam Dungeon. In there, they had a hole in a wall that you could put your hand into, and a fake rat would drop down and scare you. I thought that was really cool! So, I decided to make my own unique version for a school project at HKU.

In my version, you put your hand in. When you do, you will break the beam break sensor, which will cause the audio and the spray bottle to be triggered. The box is made from MDF wood that I cut with the laser cutter at my school.


If you want to recreate this project, then this is what you will need:

Supplies

General Supplies:

  • Arduino Uno
  • Breadboard
  • Wires

Specific Supplies (I will link what I used):

Design Your Prank Box!

WhatsApp Image 2024-03-30 at 13.06.51_ea95b780.jpg
WhatsApp Image 2024-03-30 at 13.06.50_20d5bf49.jpg
WhatsApp Image 2024-03-30 at 13.06.53_4943d47a.jpg

First, we start by sketching out some different ideas we have. Sketching out our final design to understand what supplies we have to buy to make it all work. Making sure we understand what parts have to move, and where we will be putting everything inside the box.

Testing Your Parts (prototyping)!

Prototype Testing (Sneezing Scare Box)
WhatsApp Image 2024-03-30 at 13.42.56_2fa773c4.jpg

It is important to test your parts before you put everything together. I did some testing with the beam break sensors using a cardboard box, and some code that I found online to test them, as you can see in the video above:

I also started out using a mini servo, but found out through testing that it was not strong enough to pull the spraybottle. This is the reason I used a stronger servo, which meant I had to get an external power source.


Putting Things Together!

WhatsApp Image 2024-03-30 at 13.54.53_c5cf81fe.jpg
sproeier foto.jpg
WhatsApp Image 2024-03-30 at 14.38.19_85defb4f.jpg

Now it is time to begin putting some parts together. I made a sketch of how I wanted the spray bottle to work and put it together. Right now is also a good time to start making your box! I made my box using a laser cutter to cut the MDF-Wood. I will attach the exact files for the boxes here too:

(It is important to use MDF-Wood that is 3 mm thick)

We will also be drilling some holes into the wood for the speaker, beam breakers and the spray bottle. My approach to this was not optimal so I drilled the holes in afterwords, because I wasn't sure where all the openings had to be. If u want to, you can edit the files to put some of the openings in there already, before laser cutting.

Important Parts!

WhatsApp Image 2024-03-30 at 23.05.01_0d9ed092.jpg
WhatsApp Image 2024-03-30 at 15.31.42_bc2bf146.jpg

It is time we put the boxes together. First it is important to know where we will be drilling the holes. In te picture above is a drawing of where the holes should be. We also need to add some extra parts to hold some things together. We need 2 pieces of wood where we can rest the spray bottle on, this way we can still pull the bottle out when we need to fill it.

In the picture above, you can see how I drilled the holes. So we have 2 rectangular holes in the middle and at the bottom for the beam break sensors, one smaller hole for the spray bottle opening, one bigger hole for the speaker, and one hole on the back of the box where we can put the dc jack through.

Putting Things Together Too!

ITTT_Schema.png
jhDASCFVCASFD.jpg

It is time we start putting together our circuit! This is the circuit I used for testing, so it is not the final one using the PCB. It is still very important to test any circuit that you decide to put together, before soldering everything.

Code!

Here below you will find the code with explanation on what does what!

/*

  IR Breakbeam sensor demo!

*/


#define LEDPIN 13

  // Pin 13: Arduino has an LED connected on pin 13

  // Pin 11: Teensy 2.0 has the LED on pin 11

  // Pin  6: Teensy++ 2.0 has the LED on pin 6

  // Pin 13: Teensy 3.0 has the LED on pin 13


#define SENSORPIN 4


#include <Servo.h>


#include "Arduino.h"

#include "DFRobotDFPlayerMini.h"


#if (defined(ARDUINO_AVR_UNO) || defined(ESP8266))   // Using a soft serial port

#include <SoftwareSerial.h>

SoftwareSerial softSerial(/*rx =*/10, /*tx =*/11);

#define FPSerial softSerial

#else

#define FPSerial Serial1

#endif


DFRobotDFPlayerMini myDFPlayer;

void printDetail(uint8_t type, int value);


// variables will change:

int sensorState = 0, lastState=0;         // variable for reading the pushbutton status

int rotatie = 10;

const int maxRot = 90;



//create a servo object called servo1

Servo servo1;


void setup() {

  // initialize the LED pin as an output:

  pinMode(LEDPIN, OUTPUT);      

  // initialize the sensor pin as an input:

  pinMode(SENSORPIN, INPUT);    

  digitalWrite(SENSORPIN, HIGH); // turn on the pullup

 

  // set the servo pin, pin 9, as an servo output pin

  servo1.attach(9);

  servo1.write(rotatie);

  Serial.begin(9600);


  #if (defined ESP32)

  FPSerial.begin(9600, SERIAL_8N1, /*rx =*/D3, /*tx =*/D2);

#else

  FPSerial.begin(9600);

#endif


  Serial.begin(115200);


  Serial.println();

  Serial.println(F("DFRobot DFPlayer Mini Demo"));

  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));


  if (!myDFPlayer.begin(FPSerial, /*isACK = */true, /*doReset = */true)) {  //Use serial to communicate with mp3.

    Serial.println(F("Unable to begin:"));

    Serial.println(F("1.Please recheck the connection!"));

    Serial.println(F("2.Please insert the SD card!"));

    while(true){

      delay(0); // Code to compatible with ESP8266 watch dog.

    }

  }

  Serial.println(F("DFPlayer Mini online."));


  myDFPlayer.volume(30);  //Set volume value. From 0 to 30

}


void loop(){

  // read the state of the pushbutton value:

  sensorState = digitalRead(SENSORPIN);


  // check if the sensor beam is broken

  // if it is, the sensorState is LOW:

  if (sensorState == LOW) {    

    // turn LED on:

    digitalWrite(LEDPIN, HIGH);  

  }

  else {

    // turn LED off:

    digitalWrite(LEDPIN, LOW);

  }

 

  if (sensorState && !lastState) {

    Serial.println("Unbroken");

    rotatie = 10;

    servo1.write (rotatie);

  }

  if (!sensorState && lastState) {

    Serial.println("Broken");

    rotatie = maxRot + 10;

    // control the servo motor based on the light value read, adjust linearly by angles

    myDFPlayer.play(1);

    delay (50);

    servo1.write (rotatie);

    delay (1000);

  }

  lastState = sensorState;

}

Soldering!

WhatsApp Image 2024-03-30 at 15.36.03_50f091a8.jpg
WhatsApp Image 2024-03-30 at 15.36.03_2eb9df0c.jpg
WhatsApp Image 2024-03-30 at 15.36.04_3f1f021e.jpg

Now we will be soldering everything together and finally make it permanent. Following the diagram, we will be soldering everything to the PCB. Since I used a breadboard to test everything, I will copy the circuit to the pcb 1:1, except for one thing. I will leave 1 row of the PCB between the positive row of wires and the negative ground wires. I did not do this the first time, which caused my project to short circuit. Everything was fine afterwards, but that is why I advise you to not make that same mistake :)

Finishing Up!

vb vvvv.jpg

We are putting everything into the boxes! We are nearing the end of the creation process, but there are some things we have to do first. It is time to screw the arduino and the pcb in place, and to start connecting everything. We will also have to glue the speaker and the beam break sensors in place, as well as the DC jack adapter.

Once you have done all of that, it should look something like the picture above!

Snot?

WhatsApp Image 2024-03-30 at 23.11.04_02e86ab5.jpg
WhatsApp Image 2024-03-30 at 23.11.05_5a9de670.jpg

Now this step is optional, of course you can fill the bottle with whatever you like. Though, if you would like to have something similar to what I have in my video, you can try this recipe!

In the picture is everything I used to make the snot: shampoo, green and yellow colouring, and cornstarch.

Finished Product!

Sneezing Scare Box demonstration!

And then in the end you should have something like this! You can decorate the box however you like, I painted the inside black so it would be more difficult to see what was inside.

I am very happy with my project, it is exactly everything I intented it to be! It definitely disturbed a lot of people, which was exactly my goal, so I am very happy with it!

I hope that you liked my instructable and make sure to let me know if you made it!