Introduction: Party in a Box

The purpose of this machine is to create an instant party, one that acknowledges that everyone hates when a party get too rowdy and uncontrollable. We made a party that shuts off as soon as it gets too insane. It is like the best part of a beat drop, the rise without the actual drop. 

Using a photoresistor to detect as soon as the party gets too dark, the servo motor starts the party and swings a disco ball and an LED shines, lighting up the box. However, when the ball gets too crazy it triggers a motion sensor which turns on a blaring alarm and a laser. The disco ball moves out of the way as it swings, allowing the laser to point directly at a photoresistor, turning off the party.

It's the perfect party! One that immediately shuts down.

Supplies

Electrical Components:

  • 2X Arduino Uno Board
  • 2X Bread Board
  • 1X PIR Motion Sensor
  • 1X Photoresistor
  • 1X Servo motor
  • 1X Laser-Transmit Module
  • 1X Piezo Buzzer
  • 1X LED
  • Jumper Wires


Tools:

  • Computer
  • Utility Knife
  • Ruler
  • Adhesives (Glue, Tape, etc.)
  • Cardboard or Foam core
  • Disco ball
  • String


Software:

  • Arduino IDE

Step 1: Arduino Code

There are two code files; one for part 1: a photoresistor, servo motor and LED and the other for part 2: PIR motion sensor, laser module and piezo buzzer.

You must download both and upload each to its own Arduino board.

Step 2: Fritz Diagrams: TinkerCAD

You need to make two sets of circuits. Part 1 and Part 2. Follow the diagrams to connect to corresponding slots on board.

*TinkerCAD did not have a laser module component so it is replaced with the RGB LED module in the diagram. The connection order is the same, so connect as you see it.

Step 3: Connecting Components Physically

Zoom in to see connections. Apologies for all the colours. Generally, the cool, darker colours are connected to ground, and the warmer colours: the reds, oranges and yellows are connected to power. Please refer to the TinkerCAD files regarding positive and negative connections.

Be sure to use red wires to connect to power and black wires to connect to ground. This will ensure clarity if you decide to work in collaboration with other people. However, if you run out of red and black wires, you may use the same colour logic as we did. Make sure to share your wiring logic with the people you will be working with.

Step 4: Building the Stage

First we need a box, sturdy enough to contain the party. A normal cardboard box will work fine but you may build your own. Make sure to leave out one of the faces of the box for the party to be seen.

Step 5: Adding the Servo Motor

Then, we must cut holes in the walls of the box for each of the components. On the top side of the box, there needs to be a slit, cut for the arm of the servo motor. Make sure it is long enough to allow the arm to swing completely.

Insert the servo motor into the slit you have just made and attach a disco ball to its arm using a string. Use an adhesive to attach it the motor to the top of the box so it does not move.

This will allow you to see how low the disco ball will hang, and where the holes for the laser and photoresistor will need to be.

What it does: The motor is programmed to swing the disco ball when the disco ball has little to no motion and is in the way of the laser's beam towards the photoresistor (these components are added in the next step). Essentially, when there is no party detected, that's when the party gets started.

Step 6: Position the Laser and Photoresistor

There will be a photoresistor and a laser-transmit module inserted into either side of the box. It is important that the laser is pointed directly at the photoresistor, with its beam intercepted by the disco ball as it hangs between them.

Cut holes on either side of the box, making sure they are levelled and in line with where the disco ball will hang at rest.

You may adhere a platform on the outside of the box, underneath the laser module like we did. This is to make sure that the laser always points at the photoresistor.

What do they do: The laser gets triggered when the disco ball swings too hard and is detected by the motion sensor (these components are added in the following steps). If the ball moves out of the way and the laser points at the photoresistor, the party turns off and sounds an alarm.

Step 7: LED and Active Buzzer

Using long jumper cables, we wrapped an LED and piezo buzzer around the sides of the box. The wiring connections, as well as these 2 components themselves, will be hidden once the disco box is fully assembled.

What do they do: The LED is programmed to turn on along with the servo motor. This light indicates a safe level of party. The sound buzzer goes off when the motion detector detects the motion of the disco ball (this component is added in the next step). This indicates a dangerous level of party.

Step 8: Motion Sensor

Once the laser is positioned to aim at the photoresistor, you may start the code to see how far you would like the disco ball to swing before the party turns off.

The motion sensor should be positioned in the back of the box to detect the disco ball swinging at its preferred max. Cut a 3cm x 2.5cm rectangle in the back of the box for the motion sensor where you want it to detect the ball.

You may ensure the motion sensor and the rest of the components stay in place by taping or glueing them to the box.

Place a wall to the left of the sensor, making sure the motion sensor does not detect the disco ball until it swings past it. 

Lastly, attach curtains to the box, cover the front of the motion sensor, making sure it does not pick up on any motion other than that of the disco ball.

We decided to place another wall on the other side of the box for the sake of symmetry.

What it does: Once the motion sensor detects the disco ball, it triggers the laser as well as an active buzzer. The red lights and blaring alarm indicate that the party is going too hard.

Step 9: Decorate Your Box

We put plasticine people, a stage, gold sheets, and coloured push pins in and around the box. You may decorate the party however you like.

Step 10: Have Yourself a Party!

Click this video to see how ours went.

Step 11: You Might Want to Party Harder Than We Did

This video is an early iteration of our party machine. We decided to use a stiffer material for the string which the disco ball hangs from. Due to this, the disco ball would swing more. Although funny, the ball continuously hitting the box would displace the laser module, moving the beam away from the photoresistor and it was breaking down our box. This party would have gone on until it wore itself down.

It also caused our servo motor to spin 360 degrees, wrapping the string around itself and failing to function normally afterwards.

Experiment with different levels of party. You may change the string material to make the motion of the disco ball more chaotic. You may also position the motion sensor closer or further away. You might even decide to not include a motion sensor, laser, photoresistor, or alarm and have yourself a party bender.

Step 12: Noise Complaints

Be mindful of the people within the vicinity of your fun time. Although you might be enjoying your party, once it gets too insane and the alarms start blaring, it can be a nuisance to the people around you. We have gotten a few glares and complaints and encourage you to keep the menace to a minimum.

Especially if the people around you are second years, going off of no sleep, working on their mid-semester projects in studio.

Step 13: Results and Reflection

At first, we considered using 3 sensors and 3 actuators to create a domino-like process where one action will trigger the next. However, we concluded that the components could be simplified to still achieve the desired effect. In fact, the button was supposed to act as the first point of action, but it is now replaced with the photoresistor acting both as an on and off switch. This way, we could achieve an infinite loop that goes on and on, instead of having to press the button again every time it comes to a stop.

We hoped to only use one Arduino board, but considering the placement of the boards on the model, it had to be separated into two to maintain enough distance for the components to fit without the cables falling out. We tried coding in one board as a side trial, but getting the timings to sync was difficult to achieve. This would be something that we need to explore further.

The motion sensor was the trickiest part to work with. It caught motion well at first, but the sensing ability kept malfunctioning afterwards. Nothing was wrong with the code and having multiple trial errors, we found out that there is a reset time which controls how frequently it senses another motion after the previous input. It senses a new motion after having gone through the whole process in the loop, so balancing the timing with the laser and piezo was important. “Timing” was the key element that needed most work to coordinate the complex process throughout the loop. Besides difficulty in the early part of the project, the overall loop went well as planned, and surprisingly, we were able to make the photoresistor to act as the switch on the first try. Having planned multiple diagrams and loop processes during the brainstorming stage helped get the results successfully with less fuss, as we constantly discussed what will and what will not work in theory beforehand.

 After presenting our machine, we learned that the motion sensor only detects warm-bodies, which may have been the reason as to why we were having so much trouble with it. It would be beneficial for us to use different sensors in the future, like the ultrasonic sensor.

For further improvements, we want to try coding better musical sound with the piezo since the sound does not give a music-like quality yet. This would make the party seem more lively. Unfortunately we struggled to code the buzzer to react to the photoresistor in the beginning. Instead, we opted to have it react to the motion sensor and take advantage of its annoying sound, making it an alarm. Given more time, our next step would be to find a code that works like, “but when,” so that it will ignore the current loop and move on to the next part as soon as a given situation occurs while running the if statement.