Light Reactive Curtain

About: I'm just a lady who likes making stuff. I got my degree in engineering but also enjoy cooking, sewing, knitting, gardening and backpacking, among other things.

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!



    • Paper Contest

      Paper Contest
    • Tape Contest

      Tape Contest
    • Organization Contest

      Organization Contest

    20 Discussions


    2 years ago

    cool idea. thx for sharing

    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.


    7 years ago on Step 3

    wow, um i know nothing about what you just said :S what kind of classes would i need to take to understand if not make this?
    will simple electronics work?
    and what was the cost of the equipment?

    ps.. this is an awsome!!!!!!!!!! idea.. i would like to use it to keep a ceiling window closed during day and open at night.
    can same principal be applyed accordingly?

    2 replies

    I'm an engineering student, which probably helps, but I know of plenty of non-engineering students who have figured out basic circuitry and stuff. There are some instructables about it!
    This basic principle could definitely be applied to a ceiling window, although your rig might be a bit more complicated. Let us know how it goes!

    This is awesome! I'm definitely going to implement a version of this to keep those pesky floodlights from the apartment complex next door from keeping me awake. Thanks for the idea!

    1 reply

    7 years ago on Introduction

    Awesome as always! Arduino is always really fun.