Bad Idea Box

Natalie Sarabosing

Overview

A three-quarters view of the Bad Idea Box in the middle of the "explosion" lights sequence. The box is a wooden lasercut box, and 4 sensors near the top inner edge of the box can also be seen.

A three-quarter view of the Bad Idea Box in the middle of the "explosion" lights sequence. 

This project acts as a physical representation of getting my intrusive thoughts and unhelpful worries out of my head. To use the box, the user writes a "bad idea" down on a sheet of paper, crumples it up, and tosses it into the box. When the box detects that paper has been thrown in, an explosion sound plays, followed by a fire-like lights sequence. This playfully represents destroying the "bad idea," leaving the user a little more mentally free. 

A whimsical front-view shot of the Bad Idea Box, with pink and red bad idea papers spilling out of it.

A whimsical front-view shot of the Bad Idea Box, with pink and red bad idea papers spilling out of it. 

A three-quarters shot of the Bad Idea Box as it might be used, with crumpled bad idea papers being thrown in.

A three-quarters shot of the Bad Idea Box as it might be used, with crumpled bad idea papers being thrown in. 

A three-quarters view showing the back of the box, the side of the box (with the false bottom slot), some of the inner sensors and LED strip.

A three-quarters view showing the back of the box (featuring a clear acrylic heart and a hole for the power cable), the side of the box (with the false bottom slot), some of the inner sensors and LED strip.

A top view of the inside of the box, demonstrating how the false bottom inside the box can be slid out to reveal the electronics.

A top view of the inside of the box, demonstrating how the false bottom inside the box can be slid out to reveal the electronics.

A picture of the electronics of the box, featuring an Arduino, a solderless breadboard, and many wires.

A picture of the electronics of the box, featuring an Arduino, a solderless breadboard, and many wires.  

Natalie_Sarabosing_Box.MP4

In this video, I demonstrate the operation of the box by tossing in a piece of crumpled paper, with a "bad idea" already written on it.  When the piece of paper is tossed in,  the explosion sound plays, and then the LED strip flashes red, yellow, and orange to simulate fire.   

Process

The first prototype, with the components placed into a cardboard box for testing. Here, the LED strip is lit up in a rainbow gradient.

The first prototype, with the components placed into a cardboard box for testing. Here, the LED strip is lit up in a fun rainbow gradient. 

Another view of the cardboard prototype, now with a smaller "inner box" that was the first attempt of an idea to hide the electronics. The Arduino is connected to a laptop for code debugging and power.

Another view of the prototype, now with a smaller "inner box" that was the first attempt of an idea to hide the electronics. 

A picture of the cardboard prototype, along with ten MP3 players and an SD card adapter. This was taken while debugging MP3 player errors.

A picture of the cardboard prototype, along with ten MP3 players and an SD card adapter. This was taken while debugging MP3 player errors.

The final fabrication of the box, featuring pieces of mirrored acrylic in an attempt to "bounce" the sensor's beam back and forth to cover the entire area of the box. This method was unsuccessful at getting the sensor to consistently detect the paper.

The final fabrication of the box, featuring pieces of mirrored acrylic in an attempt to "bounce" the sensor's beam back and forth to cover the entire area of the box. This method was unsuccessful at getting the sensor to consistently detect the paper. 

The progression of the Bad Idea Box. To the left is the first prototype, with the electronics outside of the box, in a little cardboard tray. To the right is the final box, wood-glued together, ready to have the components transferred into it.

The progression of the Bad Idea Box. To the left is the first prototype, with the electronics outside of the box, in a little cardboard tray. To the right is the final box, wood-glued together, ready to have the components transferred into it. 

The general design of the box went through some changes, which were brought about both by time constraints and by prototyping. I made 3 different cardboard versions of my box, all with different dimensions, to test what size felt the best to me (and could fit a full Arduino Uno and medium breadboard). Looking back, I really enjoyed the physical process of making those cardboard boxes, and though I initially intended for them to just be dimension-testers, they ended up being crucial to how I iterated and debugged the electronics. 

Following some frustration with Fusion 360 in the tutorial, I decided to use an open-source online tool to make the net and finger joints for my box. I imported this net into Fusion, and edited the sketch to include my text and slits for a false bottom. The engraved letters in a thick serif font was something I knew I wanted to incorporate from the start, and I’m very happy with how it ended up looking. I struggled briefly with deciding how to hide the wiring, but ultimately decided that having a false bottom to the box that could slide in and out through side slits would be the simplest path forward. 

The biggest challenge with this project was getting the speaker to work. The MP3 player I was using was extremely finicky, and I could not figure out how to get it to stop throwing SD card errors for a few hours. Ultimately, it turns out that I needed to use an 8GB SD card, a specific SD card formatting software, and a different kind of speaker. Additionally, the feature that was perhaps the biggest departure from my original idea was that I couldn’t find a way to play the explosion sound and run the lights sequence at the same time. I wish I could have found a way for this to be possible, but I still think the current operation of the box fulfills the destroy-bad-idea sentiment. 

Discussion

One of the biggest pitfalls of project 1 for me was not adequately estimating how much time things were going to take to build, iterate, and debug. This time, I designed my project to be fairly straightforward, and intentionally planned my process to include flexibility. For example, I knew that fabrication would be very time-consuming, and I knew that I was fairly comfortable with woodworking. Given this, I decided to not laser cut a hole for a power cable to allow for flexibility in the CAD, and instead decided to carve/drill/sand a small hole into the box for my Arduino cable after I put the box together. 

A comment that I received in critique was to “have some kind of opening to see less of the inside of the box,” and I agree. If I were to make this project again, one of my top priorities would be to redesign the box to completely hide the wires, perhaps by revisiting the concept of an “inner and outer box.” Another comment that I received during critique that I absolutely loved was to “do something with the color of the paper--maybe dark paper indicates worse ideas.” I think that varying the colors of paper used adds a whole other dimension to the experience of the bad idea box. Not only does this allow you to reflect on the perceived severity of your “bad idea” when re-reading them when emptying the box, but it also adds another visual element to the box. With meaningfully different colors of paper, one can also look at the top of the box and assess the proportion of the ideas in the box that aren’t that bad, or are really bad, etc. 

Other small things that I would try to improve upon if I made a version 2.0 of the Bad Idea Box would be to make a higher-quality speaker system (though the aggressive crackle of the current speaker is super endearing, it would be interesting to see how a higher-quality speaker would offer more bass to the explosion sound, and how that changes the experience), and to use a thicker plywood for the box, to make it more weighty.

Even though this was an individual project, I was surprised by how collaborative it ended up being. Though I did enjoy rewiring my breadboard at 9am, it was much more fun to work alongside my fellow classmates in the Phys Comp lab late at night, soldering, debugging, and having a love-hate relationship with our projects. Some of my favorite moments of this entire process are ones that feature other people: Brandt Li gave me his teardrop scrap pieces that ended up being the clear acrylic heart, TA Angie Wang was the first non-me user of the final box, and I loved watching everyone at critique toss in their own bad ideas, filling it up and adding to the art of it. The bad idea box turned out to be a good idea! I'm so pleased with how it turned out. 

Technical information

/*

   Natalie Sarabosing

   60-223 Physical Computing Spring 2024

   Project 2: Bad Idea Box

   Professor Robert Zacharias


   License: CC BY-NC-SA-4.0


   This is the code for the bad idea box. When any of 4 break beam sensors

   are triggered, an explosion sound plays and an LED strip flashes to

   simulate "fire".


   References:

   - LEDs: LEDStripColorTester.ino sample code from the Pololu LED Strip library

   - Breakbeam sensors: lady ada https://cdn-learn.adafruit.com/downloads/pdf/ir-breakbeam-sensors.pdf

   - MP3 player + mp3 header file + speaker circuit: https://www.youtube.com/watch?v=PBdqgHj_AkU


Note: The header file "mp3tf16p.h" needed to run this code is NOT included here. Please refer to the link above.


   Structuring this Arduino sketch so that

   the loop contains four basic elements:

     1) read inputs (gather information from the world)

     2) compute and make decisions based on those inputs

     3) drive outputs (effect different actuators in the world)

     4) report information back to the user



   Pin mapping:


   Arduino pin | role  | details

   ------------------------------------------

   ~3           output  LED power control

   4            input   breakbeam sensor *

   7            input   breakbeam sensor

   8            input   breakbeam sensor

   10                   TX for MP3 player

   11                   RX for MP3 player

   12           input   breakbeam sensor

   13           output  using the Arduino LED as an indicator


   * Note: Because this project makes use of 4 separate breakbeam sensors,

     the sensors are differentiated/named by the pin they're connected to.

     Ex: sensorState_4 corresponds to the state of the sensor connected to pin 4.

*/


#include <PCM.h>

#include <FastLED.h>

#include <PololuLedStrip.h>

#include <SoftwareSerial.h>

#include "mp3tf16p.h"



//----Pin mapping----

#define LIGHTSPIN 3

#define SENSORPIN_4 4

#define SENSORPIN_7 7

#define SENSORPIN_8 8

#define TX_PIN 10

#define RX_PIN 11

#define SENSORPIN_12 12

#define LEDPIN 13


//----LED strip setup----

#define LED_COUNT 60

rgb_color colors[LED_COUNT];

PololuLedStrip<LIGHTSPIN> ledStrip;


//----Breakbeam sensor setup----

const int SENSORWAIT = 200;

unsigned long sensorTimer = 0;

int sensorState_4 = 0, lastState_4 = 0;

int sensorState_7 = 0, lastState_7 = 0;

int sensorState_8 = 0, lastState_8 = 0;

int sensorState_12 = 0, lastState_12 = 0;


//----MP3 player setup----

MP3Player mp3(TX_PIN, RX_PIN);



/* Takes in 3 RGB values and changes the LED strip to that color. */

void updateLEDColor(int red, int green, int blue) {

 rgb_color color;

 color.red = red;

 color.green = green;

 color.blue = blue;


 // Update the colors buffer.

 for (uint16_t i = 0; i < LED_COUNT; i++) {

   colors[i] = color;

 }


 // Write to the LED strip.

 ledStrip.write(colors, LED_COUNT);

}


/* Runs a set sequence of light updates and delays to make "firelight". */

void runExplosionLights() {

 updateLEDColor(204, 38, 4); // red

 delay(80);

 updateLEDColor(0, 0, 0); // black

 delay(15);

 updateLEDColor(230, 58, 0); // orange

 delay(100);

 updateLEDColor(0, 0, 0); // black

 delay(10);

 updateLEDColor(204, 38, 4); // rose gold

 delay(100);

 updateLEDColor(200, 0, 0); // red

 delay(70);

 updateLEDColor(230, 58, 0); // orange

 delay(100);

 updateLEDColor(0, 0, 0); // black

 delay(10);

 updateLEDColor(204, 38, 4); // rose gold

 delay(100);

 updateLEDColor(200, 0, 0); // red

 delay(50);

 updateLEDColor(230, 58, 0); // orange

 delay(100);

 updateLEDColor(0, 0, 0); // black

 delay(10);

 updateLEDColor(204, 38, 4); // rose gold

 delay(150);

 updateLEDColor(204, 64, 4); // yellow

 delay(50);

 updateLEDColor(105, 32, 0); // dimmer yellow

 delay(100);

 updateLEDColor(56, 18, 1); // even dimmer yellow

 delay(70);

 updateLEDColor(28, 9, 1); // dimmest yellow

 delay(150);

 updateLEDColor(0, 0, 0); // black

}


void setup() {

 // Initializing the LED and sensor pins

 pinMode(LEDPIN, OUTPUT);

 pinMode(SENSORPIN_4, INPUT);

 digitalWrite(SENSORPIN_4, HIGH);

 pinMode(SENSORPIN_7, INPUT);

 digitalWrite(SENSORPIN_7, HIGH);

 pinMode(SENSORPIN_8, INPUT);

 digitalWrite(SENSORPIN_8, HIGH);

 pinMode(SENSORPIN_12, INPUT);

 digitalWrite(SENSORPIN_12, HIGH);


 mp3.initialize(); // Initializing the MP3 Player

 Serial.begin(9600);

 updateLEDColor(0, 0, 0); // black (all off)

}


void loop() {

 /*  Step 1 is gathering information from the world and

     saving it into whatever variable(s) are appropriate.

 */


 // Read the current state of the 4 sensors:

 sensorState_4 = digitalRead(SENSORPIN_4);

 sensorState_7 = digitalRead(SENSORPIN_7);

 sensorState_8 = digitalRead(SENSORPIN_8);

 sensorState_12 = digitalRead(SENSORPIN_12);



 /*  Step 2 is using gathered data to change different variables,

     or doing "math" (can take many forms) to make decisions

 */


 // If any of the sensor states is at low power,

 if (sensorState_4 == LOW || sensorState_7 == LOW ||

         sensorState_8 == LOW || sensorState_12 == LOW) {

   digitalWrite(LEDPIN, HIGH); // turn LED on:

 } else {

   digitalWrite(LEDPIN, LOW); // turn LED off:

 }


 /*  Step 3 is driving outputs and Step 4 is reporting information back to the user */

 if (sensorState_4 == lastState_4 &&

       sensorState_7 == lastState_7 &&

       sensorState_8 == lastState_8 &&

       sensorState_12 == lastState_12) {

   Serial.println("Unbroken");

 }

  if ((millis() - sensorTimer >= SENSORWAIT) &&

         (sensorState_4 != lastState_4 ||

         sensorState_7 != lastState_7 ||

         sensorState_8 != lastState_8 ||

         sensorState_12 != lastState_12)) {

   Serial.println("Broken");

   mp3.initialize();

   mp3.playTrackNumber(1, 28); // Play explosion sound

   delay(10);

   runExplosionLights(); // Run explosion lights sequence

   sensorTimer = millis();

 }


 // Updating sensor states

 lastState_4 = sensorState_4;

 lastState_7 = sensorState_7;

 lastState_8 = sensorState_8;

 lastState_12 = sensorState_12;

}