Light Reactive Curtain





Introduction: Light Reactive Curtain

For the last project of the semester in my  Craft and Computing class, we had to make a family of items that fulfilled some need that people have.  My team partner and I are all about self expression and so we decided we wanted to make something artistic to help people express themselves in some way.  Since we live in dorms, we are not allowed to do very many things to our rooms as far as decorating and painting and things, so we decided to make some cool things people could use in their dorms.

One of those things was a light reactive curtain for a window.  When the curtain senses that there is light outside, the servo pulls the curtain up to let more light into the room and it closes when it is dark outside.


-Arduino Uno
-Curtatin rod
-Wire (and spool)
-Foam core
-Hot glue

Step 1: Sew the Curtain

First, we sewed the curtain.  You can really make your curtain any kind you want.  We found some pretty, sheer, sparkly, green fabric, which was awesome, but we also wanted the curtain to not be see through so we added a layer of black fabric to the back.  
I sewed the short edges of both fabrics together and hemmed the other sides so there would be no loose threads.  I then sewed a channel at the top for a curtain rod to go through.  Finally, I sewed two seams down the center of the curtain about half an inch apart for a cord to go through and pull the curtain open.

Step 2: Mechanism

To open and close the curtain, we ran a wire through the channel in the center of the curtain and attached a Popsicle stick to the bottom so that the wire wouldn't be pulled out.  We opted for a a wire instead of a string or cord because the wire is smooth and therefore able to gather the curtain up with minimal friction.

We hacked a servo so that it was able to rotate completely, made a box out of foam core to house our electronics, and made a hole in one side so that most of the servo was inside the box with just the part that rotates sticking out.  We attached a spool to wind the wire onto the servo, then attached the whole box to the hanger that we used to demonstrate our curtain.

Step 3: Circuit

We used an Arduino Uno to control our sensor and servo. The circuit and circuit are shown below. You will have to adjust the delay in the code based on your servo and the length of your curtain, and the light threshold based on your location.

#include <Servo.h>

Servo myservo; // create servo object to control a servo

int lightPin = 0; // analog pin used to connect the photoresistor
int ledPin = 11; //analog pin to connect to LED

void setup()
myservo.attach(9); // attaches the servo on pin 9 to the servo object
pinMode(ledPin, OUTPUT); //sets the led pin to output

void loop()
int threshold = 400; //400 for classroom, 100 for bedroom/dorm
int lightLevel = analogRead(lightPin);

if (lightLevel>threshold){ //if it sees light (light=high resistance, dark = low resistance)
//digitalWrite(ledPin, HIGH);
delay (5000); //spin servo for 5 sec
while (analogRead(lightPin)>threshold){ //while light is still above threshold
// digitalWrite(ledPin, LOW);
myservo.write(87); //do nothing (no movement)

}else{ //if it sees no light
myservo.write(0); //reverse
// digitalWrite(ledPin, HIGH);
delay (5000);//spin servo for 5 sec
while (analogRead(lightPin)<threshold){ //while light is still below threshold
//digitalWrite(ledPin, LOW);
myservo.write(87); //do nothing (no movement)

Step 4: Awesome Curtain

Our curtain ended up working remarkably well!  One problem is that the code has to be re calibrated if you move the curtain into different lighting conditions, but if this were to just be hanging in a window as an actual curtain, that would not be a problem.
Video coming soon!



    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Microcontroller Contest

      Microcontroller Contest

    We have a be nice policy.
    Please be positive and constructive.




    cool idea. thx for sharing

    Danger is your middle name? Your making curtains, dude. I love the instructable though, very intuitive.

    i think this might be a girl =D

    My sincerest apologies my dear Madam. I do believe I was confused earlier but now believe to be in proper state. A good day to you as well as your colleagues, I do wish you the brightest (and according to the curtain, dimmest) of days.

    Heheh, "dear Madam". I think that's the most formal Ms Danger's ever been addressed!

    I have been called Madam before, actually, and by strangers (!). But that's another story...

    I would love to hear it if you so please.

    Danger, as admin, don't make me have to flag you :)