Interactive Papercut Lightbox With Arduino

Introduction: Interactive Papercut Lightbox With Arduino

This papercut lightbox was made for a schoolproject at the HKU.

This lightbox is made with the following materials:

  • Arduino UNO
  • 6 LEDs
  • 6 220 Ω resistors
  • 2 Ultrasonic sensors
  • 1 LED strip
  • 1 12V battery pack
  • A wooden box (wine boxes will do)
  • A smaller wooden box where you can store your wires and Arduino
  • Around 4 meters of wire
  • Around 10 sheets (less or more is fine. This is all up to you) of 300grams paper (Make sure your paper is thick enough and will hold its own once it is standing)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Step 1: the Idea

I started with sketching a few ideas onto paper to decide what I actually wanted to do with this project. There were a lot of different ideas to begin with, but here you can see these sketches that were made for this particular idea.

For the shadows of the wolves I had to decide how I wanted to approach cutting the paper. You can see the design I drew. At first I was struggling with how the light would show through the paper and which shadows to repeat in every layer, but once I got the hang of it everything was good to go.

Step 2: Testing the Code

Before starting on the lightbox, I tested out different codes to see what would fit my idea the best. I altered the distances and the ways the lights would fade. When I added the fading to the LEDs they would flicker, which did not fit the atmosphere I was trying to accomplish. After a while I got the result I wanted, which meant different colours of lights would switch on at certain distances.

The code I used for my final version can be found here:

#include <NewPing.h>

//Interactive Papercut Lightbox code

NewPing sonar(6,5); //sonar 1 - left side
NewPing sonar2(11,10);// sonar 2 - right side
int led = 2; //blue LED
int led2 = 4; //Red LED
int led3 = 7; //Green LED
int led4 = 8; //Blue LED
int led5 = 12; //Red LED
int led6 = 13; //Green LED


void setup() {
  Serial.begin(9600);

  pinMode(2,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(13,OUTPUT);
}

void loop() {
  delay(200);
  int value = digitalRead(10);
  Serial.println(value);

  //SONAR 1 (left) These are the LEDs on the left side of the papercut lightbox
  int distance = sonar.ping_cm();
  Serial.print("Afstand=");
  Serial.println(distance);

//Blue LED
  if(distance<10){
    digitalWrite(led,HIGH);
  }else{
    digitalWrite(led,LOW);
  }

  //Red LED
  if(distance<20){
    digitalWrite(led2,HIGH);
  }else{
    digitalWrite(led2,LOW);
  }
 
  //Green LED
  if(distance<40){
    digitalWrite(led3,HIGH);
  }else{
    digitalWrite(led3,LOW);
  }

  //SONAR 2 (right) These are the LEDs on the right side of the papercut lightbox
  int distance2 = sonar2.ping_cm();
  Serial.print("Afstand2=");
  Serial.println(distance2);

//Blue LED
  if(distance2<10){
    digitalWrite(led4,HIGH);
  }else{
    digitalWrite(led4,LOW);
  }

  //Red LED
  if(distance2<20){
    digitalWrite(led5,HIGH);
  }else{
    digitalWrite(led5,LOW);
  }

 //Green LED
  if(distance2<40){
    digitalWrite(led6,HIGH);
  }else{
    digitalWrite(led6,LOW);
  }

}

Step 3: The Making of the Box

When I knew my code worked, I could start on making the papercut lightbox. After sketching out the scene I started on cutting several pieces of paper to fit the size of the box. I could start on working on the scene. I drew some quick outlines on each paper so that I could add them onto each other and get the exact shadows I wanted. I used a box cutter to cut each piece.
After cutting each layer I placed them in front of a light to check if I got the effect I desired. It worked out very well and then I could continue to place them inside the box to see if they fit and if I could get the result I wanted.

Then I checked which light I wanted to place after each layer. I decided I liked blue the most and I wanted to place the blue ones in front, then the red ones and after those two I'd place the green ones.

Step 4: Putting It All Together

Once I was happy with the appearance of the papercut lightbox I started to solder everything into place. After solderin each sensor and LED individually I placed them inside the box to see how it would look before I actually started to put it all together.

After placing them in the right order and at the right place I soldered the back of the wires to the plate so that it could be attached to my Arduino Uno. After that I placed the paper layers inside the box.

Step 5: Testing Again

After making sure everything was in the right place, I plugged in my Arduino and tested the code once again to make sure it worked the way I wanted it to work and it did.

Step 6: The Result

This was the result.

Be the First to Share

    Recommendations

    • Magnets Challenge

      Magnets Challenge
    • Warm and Fuzzy Challenge

      Warm and Fuzzy Challenge
    • Wearables Contest

      Wearables Contest

    Discussions