3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Motion Sensing Beaded Curtain

Motion Sensing Beaded Curtain
This is a project we created as part of our Computing and Crafts final project. The assignment was to “produce a family of devices for a given cause”. We chose to create this beaded door curtain and a window curtain (featured in a different Instructable) to address the need for self expression in dorm rooms.

This curtain is fairly simple to create, and lights up when someone walks by/through it.

Materials:
• Store bought beaded curtain (we used this curtain: http://www.save-on-crafts.com/crystalcurtain.html )
• 6 feet of multi-stranded fiber optic rope (we used http://www.wiedamark.com/42strandsideglow.aspx )
• 11 or more RGB LEDS
• 1 motion sensor (we used http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=255-1816-ND )
• Lots of wire (black, red, blue, and green if possible)
• On/Off switch
• Batteries and battery pack (we used 3 AAA)
• Arduino uno
• 2-3 index cards or some light-weight cardstock
• Rapid prototyping machine/scrap plastic/foam core
• Solder/soldering iron
• Masking tape
• Hot glue gun
• Heat shrink tubing and heat gun
• String to tie wires down

 
Remove these adsRemove these ads by Signing Up
 

Step 1Make the basic circuit

Make the basic circuit

Following the circuit diagram above, wire one RGB LED and the motion sensor to the Arduino (note: check the datasheet for your particular motion sensor before wiring). Run the code below and confirm that the LED  runs through all three colors in unison when the motion sensor detects movement.

You can adjust the code to change the color of the LED and make whatever pattern you like. Ours had two LEDs (simply hook it up to three unused PWM pins) and was set to alternate through cool colors (one set of LEDs faded between blue and red, the other set between green and blue).


(How the code works: Basically, the code is a modified version of Sparkfun's code for using a photoresistor to control LEDs. If the motion sensor "sees" something, the voltage in A0 spikes. When the code detects this spike, it runs the LEDs through their colors and if there is no spike the LEDs stay off.)



CODE:

int lightPin = 0; //actually the motion sensor

// LED leads connected to PWM pins
const int RED_LED_PIN = 9;
const int GREEN_LED_PIN = 10;
const int BLUE_LED_PIN = 11;

// Used to store the current intensity level of the individual LEDs
int redIntensity = 0;
int greenIntensity = 0;
int blueIntensity = 0;

// Length of time we spend showing each color
const int DISPLAY_TIME = 50; // In milliseconds
void setup()
{
// pinMode(ledPin1, OUTPUT); //sets the led pin to output
// pinMode(ledPin2, OUTPUT); //sets the led pin to output
// pinMode(ledPin3, OUTPUT); //sets the led pin to output
Serial.begin(9600);
}

void loop()
{
int lightLevel = analogRead(lightPin); //Read the motion sensor

Serial.println(lightLevel);
if (lightLevel < 650) { //if the sensor sees motion (voltage spikes above threshold)
// Cycle color from red through to green
// (In this loop we move from 100% red, 0% green to 0% red, 100% green)
for (greenIntensity = 0; greenIntensity <= 255; greenIntensity+=5) {
redIntensity = 255-greenIntensity;
analogWrite(GREEN_LED_PIN, greenIntensity);
analogWrite(RED_LED_PIN, redIntensity);
delay(DISPLAY_TIME);
}

// Cycle color from green through to blue
// (In this loop we move from 100% green, 0% blue to 0% green, 100% blue)
for (blueIntensity = 0; blueIntensity <= 255; blueIntensity+=5) {
greenIntensity = 255-blueIntensity;
analogWrite(BLUE_LED_PIN, blueIntensity);
analogWrite(GREEN_LED_PIN, greenIntensity);
delay(DISPLAY_TIME);
}

// Cycle cycle from blue through to red
// (In this loop we move from 100% blue, 0% red to 0% blue, 100% red)
for (redIntensity = 0; redIntensity <= 255; redIntensity+=5) {
blueIntensity = 255-redIntensity;
analogWrite(RED_LED_PIN, redIntensity);
analogWrite(BLUE_LED_PIN, blueIntensity);
delay(DISPLAY_TIME);
}
}

else{ //if the sensor doesn't see anything
analogWrite(RED_LED_PIN, 0);
analogWrite(BLUE_LED_PIN,0);
analogWrite(GREEN_LED_PIN,0);
//digitalWrite(ledPin1,LOW);
//digitalWrite(ledPin2, LOW);
//digitalWrite(ledPin3, LOW);
}
}


« Previous StepDownload PDFView All StepsNext Step »
7 comments
May 17, 2011. 8:05 AMfaithelizabeth says:
I'd love to see a night-time photo/video of this ina ction to see how well it lights up, but it seems like an awesome project to me. :D
May 10, 2011. 7:48 PMBlauFusion says:
Thanks for posting this instructable, it's a cool idea. I, too, would love to see a cool night-time video of it being triggered. Also, I read the recall link posted by doxsys and ... well, safety first and all that. Maybe these beaded doorways should be attached via velcro or something for those with little kids. Personally, I don't think little kids should be unsupervised anyhow, and the recall thing is surprising and disturbing. BUT I DIGRESS. Good instructable, keep up the good work!
May 8, 2011. 1:00 PMcriggie says:
How does it look in the dark? Can you try taking a photo at night please?
May 9, 2011. 10:37 AMalcurb says:
Double ditto
May 9, 2011. 3:48 AMthenewview says:
Where is your super cool youtube clip ??
May 9, 2011. 10:36 AMalcurb says:
Ditto.
May 9, 2011. 9:36 AMdoxsys says:
This is neat, and I don't mean to rain on your parade. However, beaded curtains are undergoing CPSC recalls in substantial quantities due to the associated strangulation hazard. Some of the stories I read about related entrapments were surprising and disturbing. See e.g. http://www.cpsc.gov/cpscpub/prerel/prhtml11/11146.html

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
2
Author:fjlsaiole