Introduction: Light Sensored Paper Crane Mobile

Picture of Light Sensored Paper Crane Mobile

I am going to walk you through the steps on how to create a light sensored paper crane mobile using Arduino to code! For this project you will need:
-LilyPad Arduino ProtoSnap(you will use pad and the light sensor)
-3-5 LED lights from your ProtoSnap
-origami paper(as many pieces as you want cranes)
-conductive thread
-Dritz 1/4" Lightweight Clear Elastic
-white or clear colored string
-block of wood(any size)
-glue gun
-insulated wire
-Lithium Ion Polymer Battery - 3.7v 110mAh
-any color fabric(to hand sew)
-a small screw in hook(to hang the mobile)
-any color fabric 5x5 (to sew the circuits on/cover the wooden block)

**The idea is that 3-5 of the cranes on the mobile will light up and dim and brighten when the light censor is activated by the darkness.

Step 1: How to Fold a Paper Crane

Picture of How to Fold a Paper Crane

I used a google search to figure out how to fold a paper crane, here is the picture and the link!!

-Fold as many cranes as you desire to have hanging from your mobile(I have 15)


https://www.google.com/search?q=how+to+fold+a+paper+crane&rlz=1C1SKPL_enUS397&es_sm=122&source=lnms&tbm=isch&sa=X&ei=jV1gU8SQF6nLsQTJgYGwDw&ved=0CAgQ_AUoAQ&biw=1251&bih=566#facrc=_&imgdii=_&imgrc=om0U8jyH6ABjGM%253A%3BK7REdZJEWNqkXM%3Bhttp%253A%252F%252F2.bp.blogspot.com%252F-tkj6Uwgh7go%252FUZwSOT4gjeI%252FAAAAAAAAYsI%252FvIAZSRcCtBY%252Fs640%252FOrigami%252Bflapping%252Bcrane%252Binstructions%252Bstep%252Bby%252Bstep%252Btutorial%252Bpaper%252Bfolding%252Bmoblie%252Bbirds%252Bpaper%252Bcrafts%252B(22).jpg%3Bhttp%253A%252F%252Fcraftgirl78.blogspot.com%252F2013%252F07%252Forigami-flapping-paper-crane-mobile.html%3B640%3B640

Step 2: Sewing Conductive Thread on the Elastic

Picture of Sewing Conductive Thread on the Elastic

For this step you will need:
-the clear elastic
-LED's
-conductive thread
-a needle/or sewing machine

Part 1:
-If you are using a sewing machine thread your conductive thread onto a bobbin and thread machine
-cut the elastic to the length that you want the cranes to hang from
- do this on 3-5 strips(depending on how many LED's you want to light up) I did 3
-take your clear elastic and sew a straight line all the way up both sides of the elastic AS close to the edges as you can
(it is important that the two lines of thread do not touch each other

-make sure you leave 2 inches of extra thread/a 2 inch tail on both sides at each end(you will need that extra thread to sew on your LED's)

Step 3: Sewing the LED's Onto the Elastic

Picture of Sewing the LED's Onto the Elastic

Now that you have sewn two strips of conductive thread down each side of the the elastic we are going to attach the LED lights to tail or extra endings that we left on each side of the thread.

-Make sure you mark with a permanent marker which side of the thread was attached to the negative part of the LED so that it can be attached to the negative pin on the Arduino LilyPad

-make sure that there are no extra threads that could be touching each other because that will cause a short in the circuit


Step 4: Placing LED in Body of Crane

Picture of Placing LED in Body of Crane

**making a small slit on the top body of the crane place the LED light into the body of the crane

-now the crane should hang from the elastic

-repeat the last 2 steps with the rest of the LED's and put them in the cranes

**now that you have all of the LED's placed inside the cranes we are ready for some coding!!!

-use normal thread or elastic(without the conductive thread sewn on the sides) and attach to the rest of the cranes(these ones will not be wired so will not light up but are just for looks)

Step 5: Coding the LilyPad

Using your correct USB Port hook up the LilyPad and open Arduino
-bits and pieces of this code from the arduino fading code

-Upload the following code!!!




int LED1 = 6; // LED connected to digital pin 6
int LED2 = 5; // LED connected to digital pin 5
int fadeValue;
int sensorPin = A5; // light sensor is connected to analog pin A5
int sensorValue; // variable to store the value coming from the sensor

void setup() {
digitalWrite(LED1, OUTPUT);
digitalWrite(LED2, OUTPUT);
Serial.begin(9600); //initialize the serial port
// nothing happens in setup
}

void loop()
{
sensorValue = analogRead(sensorPin); // read the value from the sensor
Serial.println(sensorValue); // send that value to the computer
delay(100); // delay for 1/10 of a second

if(sensorValue <= 250) {



// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(LED1, fadeValue);
delay(30);
}

// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(LED1, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}

// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(LED2, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(LED2, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30); }
}
else {
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
}
}

Step 6: The Pins

Picture of The Pins

Now we have the LilyPad coded we see that Pin5 and Pin6 both carry the codes for the LED lights but are on different delays

- hook 3 LED lights up to Pin5 and if you choose to do 5 LED's then hook the other two up to Pin6

-to do this take the negative part of the crane(the part you marked with a pen to keep it clear which one was negative) and attach it to the negative pin on the LilyPad and then take the other tail of the conductive thread and attach that to Pin5

- do the same with the rest of the LED's using the insulated wire and the conductive thread

- MAKE SURE that none of the threads are crossing over one another because that will cause a short in the circuit and it will not work!!! (I made a mess of mine and had to spend a lot of time unpicking and rewiring so it is helpful to use the insulated wire because it will not matter if the rubber part of the wire touches because it is covered it will not cause a break in the circuit)

Step 7: Attaching the Light Sensor

Picture of Attaching the Light Sensor

Now that everything else is wired we are going to attach the light sensor!!! We will hook up the + and - pins to the correlating pins on the LilyPad, and then on the light sensor where it says "s" attached that pin to A5 on the LilyPad!


(Image from google) https://www.google.com/search?q=arduino+light+sensor&rlz=1C1SKPL_enUS397&es_sm=122&source=lnms&tbm=isch&sa=X&ei=7ophU9CII8jcyQGfoICwAQ&ved=0CAoQ_AUoAw&biw=1251&bih=527#q=arduino+light+sensor+LilyPad&tbm=isch&facrc=_&imgdii=_&imgrc=9zJ305IjFxoE2M%253A%3B1ezrIQBhGJEnPM%3Bhttp%253A%252F%252Fi00.i.aliimg.com%252Fwsphoto%252Fv0%252F671520796%252F-Arduino-Compatible-LilyPad-Light-Sensor-Outputs-An-Analog-Value-From-0-to-5V--Suit.jpg%3Bhttp%253A%252F%252Fwww.aliexpress.com%252Fitem%252FArduino-Compatible-DFRobot-10cm-Infrared-Sensor-w-Bakout-Board-An-Edge-Detection-Sensor-Help-Robot%252F671609242.html%3B587%3B583

Step 8:

Everything is attached and should work when you plug in your battery!!!
-Note that it does take one cycle for the lights in the cranes to turn on once the light sensor is activated(the sensor senses that it is dark)
-turn off the lights.....and your cranes should start lighting up!!!!!
-using the glue gun attach the fabric to the wooden block!

Step 9: Folding Paper Triangles

Picture of Folding Paper Triangles

You can use whatever you'd like to cover the fabric on the block of wood, I chose to do more origami figures. Below is the link to fold origami triangles(will be placed around the block to make it more aesthetically pleasing)
http://www.wikihow.com/Make-a-Paper-Football (image from google)

- I used 6 paper triangles to cover the wooden block/hide the wiring!
-Use your imagination...this is your project! Make it unique!!!!!

Step 10: Final Touches

Picture of Final Touches

now that the block is covered and that we have made it look nice it is time to do some finishing touches
-screw the hook into the top of the block so that we can hang it
-make sure there are no wires sticking out anywhere and that it looks put together

Step 11: The Finished Product

Now that everything is circuited and programmed and pieced together it is time to test your creation!
I hope it all turned out for you! Thank you for creating!

Comments

About This Instructable

1,207views

8favorites

License:

More by lizzyburns:Light sensored paper crane mobile
Add instructable to: