Automatic Curtain With Google Home

Introduction: Automatic Curtain With Google Home

After years of doing home automation with lights and fan, now I want to try to automate my home curtain. The cost of ready made auto curtain is very expensive, so I opted for DIY. This auto curtain is WiFi relay switch similar to Sonoff. It is super simple which does not need to do coding. The hardest part would be mounting the pulley and make sure it is smooth when pulling the curtain. The total cost of this project was about RM70 (USD 17) only.


  1. geared motor DC 12 V, 62 RPM.
  2. New Smart WiFi 2 channel relay switch (same as Sonoff App -eWeLink)
  3. power supply 12 V DC 1 A
  4. pulley 2 units. (3D print )
  5. fishing line
  6. some L shape bracket to mount the motor
  7. case for the WiFi switch
  8. safety pin for cloth 2 units
  9. Google Home (optional)

Step 1: Design Concept

The curtain will be pulled by a fishing line tied in a loop as shown in the picture. The motor will drive one of the pulley. The two clips on the line will move close to each other when pulley turn clockwise. They will move far from each other when the pulley turn counterclockwise. The limit switch is used to cut off power when the curtain reach to the end.

I used Autodesk Inventor to design a pulley that is suitable for the motor shaft. It has diameter 28 mm. Then I use ABS material for 3D printing. This is the only part I need 3D printing. The D-shape hole must be tight fit with the motor shaft.

The eWeLink App is very easy to use and comes with a few control modes. In this application you just turn on interlock mode to ensure the motor can reverse polarity. Refer to the picture.

Step 2: Assembly and Installation

  1. Drill some holes on the L-bracket to mount the motor with M3 bolt. Join another piece of L-Bracket to form a U shape. Then use 2 screws to drill the assembly into the curtain rail.
  2. Install another pulley at another side of the curtain by drilling a hole on the curtain bracket and tighten it with bolt and nut.
  3. Connect the WiFi switch with the motor. Solder the wire on the motor. Keep the module in a case.
  4. Tie the safety pin with the line and lock it onto the first curtain pulley.
  5. Install the fishing line on the pulley. Loop the line at the drive pulley a few rounds to prevent it from slipping. Make sure it is very tight.

I have skipped the limit switch for now. But it is good to have it.

Step 3: Test Run

I name the switch 1st channel OPEN and 2nd channel CLOSE in eWeLink. When telling Google Home you need to say:" Hey Google, turn on Curtain OPEN" or " Hey Google, turn on Curtain CLOSE"

I also set up Routines in Google Home and name it "Open the curtain" and "Close the curtain".

If you would like to open the curtain half way, you can just turn off the button in the App while the curtain is moving. But you should close the curtain again by manual pressing button to prevent it from over travel.

First Time Author Contest

Participated in the
First Time Author Contest

Be the First to Share


    • On a Budget Challenge

      On a Budget Challenge
    • Fiber Arts Challenge

      Fiber Arts Challenge
    • Backyard Contest

      Backyard Contest



    2 years ago

    I welcome you. Everything's great. What you described, you can do with a simple switch on a long cable, or even on any IR remote control. You don't need Sonoff to do this. You don't have to call it a smart home because it's not. A smart home will only be when you can turn on Sonoff so that in the morning, the blinds reveal themselves, and in the evening, without a button on smartphones - they themselves cover the window. But how do you use the roller blind with teimer? That in the morning at e.g. 9:00 a window would be open. And, at 20.00 they obstructed the window? Unfortunately - I say - it can't be done !!! And this is because of the underdeveloped app to control the switch. No Sonoff application has the ability to use the teimer for several seconds. And so much time is needed to raise or lower the blind. I wrote to them on this matter, but they are deaf to the problem of missing seconds in the taimera. Either you can't do it or you have to do it somewhere and don't understand the problem. Jack.


    Reply 2 years ago

    Hi jack, I do not understand. Sonoff + eWelink are able to do as what you described. In eWelink App we can use Scene setting to set up sun rise or sun set then activate certain switch. We also can set by time. We can set individual switch by Schedule time, repeat on which days, and loop.
    With Sonoff I can integrate Google Home to work for me, Routine can control multiple switches (Example: At night when going to bed, I tell Google Home "Good Night", it will switch off lights, fan, and close the curtain ) I attach some screenshots for you.


    2 years ago

    You should enter this into the First Time Author Contest!


    Reply 2 years ago

    Yes, I did. Thanks.