Automatic Window Curtains




About: I am an application engineer for an industrial distributor. I help to support our sales team in programming of new projects for our customers. I enjoy working on hobby electronics in my free time, mostly w...

Isnt' it a pain to have to actually get up off of the couch to close the curtains? Well I thought so, which led to this project, wireless, automatic curtains that can be controlled over bluetooth and can be set to open/close at a certain time or light level. Documented below is how I went about doing this. I hope you enjoy!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Electronics

I like to start all of my project with the electrical part. This is my area of knowledge so I know that I can usually get it done pretty quick. Then the rest of time I can spend on the mechanical parts, with help from friends. Below is what we need to get started for the electronics of this project.

Step 2: Materials Used

All of the components for this can be purchased from for a relatively inexpensive cost.

  • 1x Arduino Nano - link
  • 1x 12V power supply- link
  • 1x Stepper motor- link
  • 1x Stepper driver- link
  • 1x Protoboard- link
  • 1x Bluetooth module- link
  • 1x Real time clock- link

Step 3: Required Tools

  • Soldering iron
  • Solder - link
  • Mini vise - link
  • Brass sponge - link
  • Watch maker glasses - link

I use a mini vise to help me hold the PCB while I solder, these are very handy to have around for any project. I prefer using a brass sponge for cleaning my soldering iron tip over a damp kitchen sponge. The brass ones seem to just work better for me and also last a lot longer, as they are not very prone to heat damage. The watch maker glasses are great for inspecting solder joints. Throughout this project I had a couple of minor shorts caused from the way I decided to assemble this project. these things can be pretty helpful at finding small stands shorting pins. They would also be great for SMD assembly!

Step 4: Layout Components

Before you get to soldering components down, you want to lay them out and make sure that they will fit, of course, if you are using a custom PCB this isn't something that would really be done. I wanted my finished item to have a pretty small footprint and I think I have accomplished that pretty well without a custom PCB.

I decided to put my stepper driver on sideways because it wouldn't really fit the other way. Since the pads on this PCB are not connected, this was not a problem. Once I started soldering, I ended up flipping the stepper driver to the opposite side of the board, as shown in later steps. With only three components it wasn't too difficult to decide where to put things. Regardless of where, the same amount of wiring would be needed.

Step 5: Solder Down Components and Wire

Once I had the components where I wanted them, I stuck the PCB in the vise and got to soldering. Once the main components were in place it was time to start wiring them all together. I intentionally didn't cut the long leads of the components so that I could use them to solder to. On the wires that I actually put through a hole, I created a solder bridge between it and whatever pin it was being connected to.

Here are the connections that I made...

Arduino D2 -> Bluetooth RX

Arduino D3 -> Bluetooth TX

Arduino D10 -> stepper driver ENABLE pin

Arduino D11 -> stepper driver STEP pin

Arduino D12 -> stepper driver DIRECTION pin

Power Supply V+ -> Arduino Vin -> stepper driver VMOT pin

Power Supply V- -> Arduino GND -> stepper driver GND pins -> bluetooth GND

Arduino +5V -> stepper driver VDD -> bluetooth VCC

Stepper driver 1B -> stepper motor GRAY wire

Stepper driver 1A -> stepper motor RED wire

Stepper driver 2A -> stepper motor YELLOW wire

Stepper driver 2B -> stepper motor GREEN wire

NOTE: Not all stepper motors will have the same color pinout!

Step 6: Finished Assembly

My final assembly came out a little messier than I would have liked, but it works! I'm calling this a 'permanent prototype'. If I was not making this to be permanent then I would have likely used headers instead of soldering the Arduino, stepper driver and bluetooth directly to the board.

Step 7: Arduino Code

The code for this is simple. Since the bluetooth module works just like a serial port, I am using the SoftwareSerial library in Arduino to access the signal, allowing me to leave the standard RX/TX pins free so I don't have to disconnect the bluetooth to make program changes. I am using the bluetooth to read a single character that I send to it. Based on the character that it receives, it will either spin the stepper motor clockwise or counter clockwise, opening and closing the curtain. Based on the circumference of the pulleys that I used, I could determine how many revolutions the motor needed to turn. Then take this and determine the correct number of steps that it must turn. I have attached my code. This code has a spot to set the time of a real time clock as well which I will be adding in later.

Step 8: Android Control

To be able to control this curtain from your phone I am going to create an Android app with an open/close button, along with a feature that will let you set the time of the RTC as well as set when you want it to open and close. I will probably be using App Inventor, but I may try my hand using Android Studio. In the meantime, I am using Bluetooth spp pro, which is a free download from the Google Play store. Sending an 'o' will open the curtains, sending a 'c' will close them. It's just that simple!

Step 9: Mechanical Assembly - Parts Used

Here is the list of materials that I used for the mechanical portion.

  • 2x Stepper motor pulleys- link
  • 1x Nema 17 motor mount - had one laying around
  • 1x 5mm bolt
  • 2x 5mm nuts
  • 1x Angle bracket - had one laying around
  • Some screws to mount stuff to the wall
  • Fishing line or other type of string

Step 10: Tools Used

  • Scissors
  • Super glue
  • Drill

Step 11: Mounting the Motor and Free Pulley to the Window

To mount the motor, I simply held up my mount to the wall, and screwed it in, pretty simple right? I did the same thing for the free pulley, check out the pictures to see how I attached the pulley to the right angle bracket. Since there is about a 6'-7' distance between the motor and the pulley, I wasn't terribly concerned with making sure that the two lined up perfectly. I just eyeballed it.

Step 12: Connecting the Fishing Line

Connecting the fishing line was the hardest part of this project. I started by using a high strength, low stretch type of line but realized that have no play was not going to be a good idea. I switched to standard fishing line that can stretch pretty easily. I put one wrap around the idler pulley and pulled the other end to the pulley on the stepper motor. I could then tie the two ends of the line together to make a loop. I then wrapped this loop multiple times around the stepper motor pulley, until the line was tight.

To attach the curtains, I took some binder clips and clipped them to the curtains, after seeing where those clips met the line, I tied them off to opposite sides of the line, so they go in opposite directions.

I have added a picture/diagram of how I wrapped the fishing line with the binder clips. In the drawing, with the binder clips in the middle, this is the curtains closed. When you spin the motor one direction, the binder clips will go away from each other, opening the curtains. Reverse the motor and they come towards each other, closing the blinds.

Step 13: Future Steps

I plan to make one of these for each window in my apartment. When that happens I will probably custom name the bluetooth modules so I know which is which. I will also make a custom PCB through OSHPark and use connectors for the components. Other minor improvements will probably also occur along the way. As they do, I will be sure to update this Instructable.

I hope that you have enjoyed this and found it helpful! Please ask any and all questions. I am sure that I missed something or didn't explain something fully.

Tech Contest

Participated in the
Tech Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    20 Discussions


    Question 1 year ago on Introduction

    What's total cost to do this I'm very interested in trying it out


    3 years ago

    Nicely executed, I've been wanting to do something like this myself but I keep postponing it.

    Do you know how much torque is needed approximately? And can you also post a picture of how the binder clips are attached to the line?

    Would be cool to add a light sensor to this as well to close them automatically when it gets dark.

    2 replies

    Reply 3 years ago

    For the torque, I don't even have a ballpark guess. I'm not so mechanically inclined. I guess looking back I'm lucky that the motor could pull it! For the binder clips, they are just tied with a regular knot. It took me a few tries to get the alighnment of the two clips correct. If you can't get a good tight knot, you could always support it with a drop of super glue.


    Reply 1 year ago

    Going by the model of the stepper motor in the link you've provided,

    Holding torque: 0.48N, m

    I'm actually doing a similar project for my curtains. However, the torque needed also depends on the weight of your curtains.


    2 years ago

    Hi there. This looks so amazing! I was saying a while back that I need something like this, and surely it's possible to build one? My apartment windows only face east, so I'd really like to be able to program the curtains to switch positions in the middle of the day - either keep out morning light then let in less-hot afternoon light in summer, or let in warm morning sun then insulate to hold in the warmth on winter afternoons. Today I found a crowd-backing page for something like this called Slide, but at $85 apiece I would love to take on the challenge of learning to do electronics and a bit of coding if I can find a local friend to work with me on it that actually has a bit of experience in those areas (all I can do is basic HTML and super-basic home repairs!) Thank you for providing the directions, pictures, links to parts, etc. Do you think it would be easy to add onto or modify this in such a way that it can connect to wifi and IFTTT? Is the clock part you've added supposed to let you set it to open and close at certain times of day while you're not around to Bluetooth-control it?


    3 years ago

    Hey! I want to do this project. Wanted to let you know that the clock link is broken. Is it just an led display or an extra part? What if I used a rasberry pi or a different type arduino that had a built in clock function?

    1 reply

    Reply 2 years ago

    Sorry for super late reply! It was a real time clock module that could be read by the Arduino. If you had built in clock function you could do your own clock checking function.


    2 years ago

    Hi, I was wondering if you can include a picture of your wiring from the power supply to the nano board and step controller.

    Are the nano board and step controller both running off direct 12v or is it stepped down before trying into them?


    1 reply

    Reply 2 years ago


    In step five I layout my wiring scheme. I am running both off of the 12VDC from the power supply. I am putting 12VDC into the Vin of the Nano and to the VMOT pin of the step controller. Hope this helps!

    Power Supply V+ -> Arduino Vin -> stepper driver VMOT pin

    Power Supply V- -> Arduino GND -> stepper driver GND pins -> bluetooth GND


    3 years ago

    Mechanically, this is easy for me. Electronically, I'm a noob. I never used an arduino or did any programming. If I didn't want bluetooth and I wanted a physical switch, like a light switch (or maybe keep bluetooth and have the light switch), how would one program this differently? Also does your motor have an auto-stop feature? or does it keep going until you tell it to stop?

    Thanks!~ Great instructable!

    1 reply

    Reply 3 years ago

    Since the motor that I am using is a stepper motor, I can tell it exactly how many steps to take. And since I knew how many steps were in one revolution I could easily find out how many turns I needed to get the right distance.

    I have been planning on adding a physical switch as well for people without the app or visitors. You would just hook up your switch to the MCU and add an 'or' to the 'i'f statement or something where you are looking for the bluetooth signal. So if you see the bluetooth signal OR you hit the button.


    3 years ago

    What if I used some para cord instead and sewed the curtains to the cord instead of binder clips?


    3 years ago

    Very very cool and fun concept! I'm
    new to being able to comment but have lurked here a while.

    Can you post a crude diagram of the way you set out the fishing line thing? Or help me understand where I scan see the video discussed? (I'll check the site's info on video shortly. Not the first time I have seen videos mentioned in an instructable's comments that I can't seem to locate. I'm certain it's my ineptitude .)

    I'm having trouble visualizing how they can open, because the bulldog clips seem like they would be great in one direction, but lose tension going other way??

    I wondered too if you have considered something like a set of magnet reed switches mounted to act as limit switches to indicate the full open and full close positions, such that you wouldn't need to change the rotation count for each different sized blind that you install it on in a house?

    Also, what's a good way to measure the strain on the motor such that if you trigger a close event, particularly based on time or light level but aren't present in the room and the drape hangs up on something? Like your sleeping annoyed cat? Is there a sensor or value one could read to cut it off if it's held back?

    I'm loving this idea and want to try it out. Particularly for use in theatrical stage props to open/shut a prop curtain. Thanks for posting it!

    1 reply

    Reply 3 years ago

    The video referred to is in step one.

    I have added a new image to step 12 where I was discussing the fishing line! Since I am using the small binder clips, there is a small amount of rotation where the binder clip is moving but the curtain is not. It's not perfect but it was good enough for my version 1! I had originally planned to sew the fishing line directly into the curtain but that turned out to be harder than I thought.

    As for using switches, I didn't want to have to run wires back across the window or have something in the middle of my window. If you did use switches, you could also get away with using a regular DC motor if the torque was there and not have a need for a stepper controller.

    To determine if something is in the way, there is no way in my current design to do this. You would need a motor that has some sort of feedback such as an encoder. One thing I did try to do was make my fishing line wrap just tight enough to be able to pull the curtains, but loose enough that if it does get caught it will have slippage and not break the fishing line.

    Thanks for the comment and I'm glad you enjoyed my Instructable!


    3 years ago

    Could you use Blynk to interface between your phone and the arduino? Seems easier than writing new code.

    Just a thought.

    2 replies

    Reply 3 years ago

    I am not familiar with Blynk, but after looking at their website it does seem like a viable solution that I will have to look into for my next project! Do you know if it supports bluetooth or just WiFi?


    Reply 3 years ago

    I haven't used it yet, but I'm planning to for a bbq monitoring and controlling project. My understanding is that it uses only wifi, since the interface between your microcontroller and your phone is through their servers. You can, however, set up a local server on your lan to lower the load on their servers. I think you could then use internet to access your lan server (I think). I haven't had a chance to look further into it. It would seem possible to used bluetooth, if both your microntroller and your phone were so equipped. But my project involves longer distances. I'm planning to use an esp8266 as my controller.

    Advice and answers would be welcome!



    3 years ago

    Could you use Blynk to interface between your phone and the arduino? Seems easier than writing new code.

    Just a thought.

    One more step to an awesome automated house.

    Just a quick tip. If you want to make the video easier for people to watch, you can upload it to YouTube and embed it on the page with the Embed Video tool in the step editor. Then people will be able to view the video on the page without having to download it.

    1 reply

    Done! When I first started writing this I was having trouble getting my video to upload and completely forgot about it! Thanks for the tip!