Close
0%
0%

WiFi Controlled Curtains

Arduino based curtain opener/closer to integrate with our DIY Smart Home

Similar projects worth following

The goal of this project is to create a lower cost alternative to motorized curtain rods, as well as making curtains WiFi controllable.

The current set up uses a NodeMCU and LLC as a pseudo WiFi shield. Because of this, there are two Arduino sketches. The sketch for the "shield" hosts a REST server, with an endpoint at "/curtains" that accepts the parameter "command." The sketch for the base Arduino Uno receives serial commands from the shield, and runs the motor accordingly.

Additionally, I would like to add hall effect sensors at the center and one end of the curtain rod to detect when to stop running the motor, rather than relying upon a finite passage of time.

A future version might remove the Arduino Uno and motor shield in favor of using only the NodeMCU and a motor driver.

Opposite_Pulley_Wheel.stl

Standard Tesselated Geometry - 3.20 MB - 01/18/2017 at 18:57

Download

Gear_Pulley.stl

Standard Tesselated Geometry - 3.45 MB - 01/18/2017 at 18:57

Download

Enclosure_Top.stl

Standard Tesselated Geometry - 412.46 kB - 01/18/2017 at 18:57

Download

Enclosure_Left_Side.stl

Standard Tesselated Geometry - 133.14 kB - 01/18/2017 at 18:57

Download

Opposite_Pulley_Post.stl

Standard Tesselated Geometry - 262.96 kB - 01/18/2017 at 18:57

Download

View all 10 files

  • 3 × 8mm Skateboard bearings
  • 1 × Arduino Uno
  • 1 × NodeMCU To act as the "WiFi" shield
  • 1 × 12V DC 100 RPM Gearbox
  • 1 × Arduino Motor Shield

View all 12 components

  • Build Updates - 1/10/17

    Kyle Rector01/10/2017 at 12:59 0 comments

    I went to Menards over the weekend, and picked up some polyester rope, which has almost no stretching issues. I was previously using 550 paracord, as it was all I had on hand. Additionally, I now have 3 turns of rope on each pulley, so there is plenty of friction to move the curtains.

    Another upgrade was the replacement of the 9V power supply with a 12V supply. The motor I use is 12V, so it was initially underpowered. Now, it is working better than ever.

    I still need to implement the hall effect sensors to eliminate the timed opening and closing.

  • First Run and Alexa Integration

    Kyle Rector01/03/2017 at 20:25 0 comments

    The curtains are up and running!

    They are controllable via HTTP requests, and are integrated into our Smart Home hub (which should also be a project on here some day...).

    Additionally, through emulating a Hue bridge, the curtains are controllable with voice commands and Alexa.

    The code will be on GitHub soon, and I will post the models as well.

View all 2 project logs

Enjoy this project?

Share

Discussions

freek.herregods wrote 04/20/2019 at 21:14 point

How do you power the arduino and the 12v dc motor?

  Are you sure? yes | no

packtloss wrote 06/15/2018 at 14:26 point

Do you happen to have a wiring diagram for this project?

  Are you sure? yes | no

didar047 wrote 03/26/2018 at 21:09 point

can i  get the code pls.?

  Are you sure? yes | no

bergeron.dom wrote 12/29/2017 at 19:29 point

Hey Kyle, really cool project! Was looking for a similar way to automate the curtains in my living room. Not sure if this project is still updated, but was wondering if you had any suggestions on way to improve your setup that have not been disclaimed here. Thank you for your help!

  Are you sure? yes | no

cbxis0929950826 wrote 05/23/2017 at 07:50 point

Excuse me

How to combine curtains and ropes

  Are you sure? yes | no

Kyle Rector wrote 06/08/2017 at 13:05 point

Sorry for the delay!  I use safety pins to connect the rope and the curtains. I start with the curtains closed, and pin the right curtain to the front rope, and the left curtain to the back rope.

  Are you sure? yes | no

Jean-Christophe Duperron wrote 01/17/2017 at 21:36 point

had you considered MQTT protocols?

  Are you sure? yes | no

Kyle Rector wrote 01/18/2017 at 19:18 point

I didn't at the outset, as I was going for simplicity and was working with what I knew. Now that I have more time, I think it would be easy to modify my "shield" code to work with MQTT, and hubs/software that host MQTT servers. 

It might also help me regain some of the speed I lost when reworking the REST server on the Node.

  Are you sure? yes | no

Dalton Oliveira wrote 01/17/2017 at 16:12 point

Congrats! I'm working on IoT for smarthome too. My personal project is called #SmartyHomy www.wardston.com.br/smartyhomy How did you dev http request code for do this?

  Are you sure? yes | no

Kyle Rector wrote 01/18/2017 at 19:15 point

As far as the HTTP "server" on the NodeMCU, you can take a look at the code linked on the page. It basically reads the packet from the WiFi client, determines the HTTP verb, and handles the request based on that. It slightly slower than I would have liked, but it now works as a RESTful switch with GET requests returning the state and POST requests for state updates. My initial build used my modified version of the aREST library, but only handled GET requests with different query parameters. 

As far as the "hub" is concerned, I have a Raspberry Pi set up as a wireless access point, and all of the DIY WiFi sensors I build connect to it instead of our main router. The Pi/Hub is what sends the HTTP requests to each node, and I use python and the requests library to do that. 

Perhaps a little long winded for a comment, but I hope it answers your question!

  Are you sure? yes | no

Box No. 10 wrote 01/16/2017 at 20:27 point

Strangely I was looking at my bedroom curtains this morning, vaguely wondering if I should automate them (my bedroom is cramped making getting to them difficult), and Voila! I see your project featured on Twitter this evening. I wish you every success and will be following closely. 

  Are you sure? yes | no

Kyle Rector wrote 01/18/2017 at 19:11 point

Thank you! I'm working on getting all the code and CAD posted to the project so it can be replicated. I tried to use the least expensive components as possible (including some that were already on hand), but there are many different ways to go about it to simplify the set up. 

  Are you sure? yes | no

Kyle Rector wrote 12/21/2016 at 15:48 point

Still in progress, but a with a huge update coming in the next week!

  Are you sure? yes | no

manjuprasadmbasangi wrote 12/21/2016 at 06:01 point

Hi, whats the status of the project?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates