Motion Sensing Beaded Curtain

 by fjlsaiole
Featured
IMG_3025.JPG
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 1: Make the basic circuit

basiccircuit.png

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);
}
}


obsidianjaguar says: Feb 3, 2013. 12:15 PM
I would love to understand this more ... I have many idea for art at the moment ,in fact Ihave seen this done to beatufull effect with fiber optics embedded in material ... I'd love it if the code could be modified so that instead of cycling through a pattern ... the motion itself would some how influnce the pattern ..
twighahn says: Oct 16, 2012. 1:09 PM
im sorry but i dont understand much of this. there are terms i dont get and the diagrams are for someone who is educated in that field. i was hoping you could dummy this down for me. please
faithelizabeth says: May 17, 2011. 8:05 AM
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
BlauFusion says: May 10, 2011. 7:48 PM
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!
criggie says: May 8, 2011. 1:00 PM
How does it look in the dark? Can you try taking a photo at night please?
alcurb in reply to criggieMay 9, 2011. 10:37 AM
Double ditto
thenewview says: May 9, 2011. 3:48 AM
Where is your super cool youtube clip ??
alcurb in reply to thenewviewMay 9, 2011. 10:36 AM
Ditto.
doxsys says: May 9, 2011. 9:36 AM
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

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!