DIY SmartBlinds v1 – Vertical or Horizontal Blinds Automation Project

Important Disclosure

Although I have successfully printed this design over and over with 100% success rate using the 3DFillies White PLA+ on my Prusa i3 MK3 printer and the stock PEI spring steel print bed, that doesn’t mean that this will work the same on your printer.

I am providing you all the design files, code and know-how in good faith and I will not be liable for any damages that may be caused directly or indirectly while making, or using this device.

By downloading any files and using any of the information posted on this site you agree to the above.

Now for the fun stuff … this project started with a need to close my blinds on a west facing window in the afternoon, while I was away. Especially in summer, the sun in Australia can do devastating things to the objects that it shines onto directly. Plus, it drastically increased the temperature in the room. As with any design project, it goes through various stages of prototyping. Bellow is a snapshot of my design process. The early working prototype had a light sensor built in to control the blinds based on the intensity of sunlight falling on the window. That turned out to be impractical and unnecessary.

I already have a home automation setup that integrates Apple’s HomeKit and Homebridge for DIY and other device integrations. However, for this device I designed an API that can be used by other home automation solutions.

I will start describing the project with what the final device looks like.

The Finished Product

The dimensions are approximately 64mm deep, 47mm wide and 92mm tall. The cog wheel was designed to pull a ball chain with 5mm diameter balls. The device connects to your home WiFi and the web based configuration allows you to customise the start and stop or open and close position of your blinds. The device attaches to the wall by double sided tape.

Vertical Blinds Automation Motor

Short video of the making of …

DYI Automated Vertical Blinds

Components and Skill set

You will require the following components and skills to build this project:


  • Arduino IDE and basic knowledge uploading code to a compatible board
  • Basic soldering skills
  • 3D Printing and slicing an STL file
  • General assembly skills


  • 1x Node MCU CP2102 ESP8266
  • 1x Stepper motor 28BYJ-48 5v with ULN2003 driver
  • 18x M2.5 x8mm Countersunk screw and 2x nuts
  • 2x M4 Steel Hex Head Cup Point Grub screw
  • 1x 5.5mm x 2.1mm DC power plug
  • 1x 5v Power Supply with a 2.1mm DC plug
  • STL Files for the body, cog wheel, top and bottom covers and the wall mount. These are attached to this post.
  • Arduino Sketch for the Node MDU, also attached to this post.

The respective images for the above components are displayed below.

The screws I used were all 8mm long. The screw holes in the body of the device should go right through so if the screw is a little longer than it should not matter.

I used countersunk heads for all the external mounts and button or any cap screw to mount the NodeMCU and the Motor driver. I also experimented with self threading mini screws – they also work well for all the mounting points that screw into the plastic. The motor mount will however require a nut on the other end to hold it in place.

3D Printing

The Base

I have designed the base such that it can be printed, upright and without supports but that probably requires some level of 3D printing experience. All the internal overhangs have a 45deg support so most 3D printers should be able to handle this without supports. The L shaped part will be bridged by the printer, again post printers should be able to handle bridging this small gap. If you want to get the hanger holes perfect, you could add supports there.

The Top and Bottom Lids

The top and bottom lids should be printed on their flat surfaces and without supports.

The Cog

The cog is the only component that I would print with supports. That is because of the dimples on the inside. Also you should print it on its largest flat surface. 


Here is the schematic of the connections. The ULN2003 I listed in the above parts list will only have 4 connection points to the NodeMCU and two for power and ground. Ignore the 3 red connection point in the diagrams lower left. One thing I noticed, the order of the pins of the ULN2003 board to NodeNCU sometimes differs from board to board. Hook it up the way you see it then reverse the connection if it is not working for you i.e D1 -> 1st (top most), D5 -> 2nd etc

Here are a few images of how to solder the wires between the motor controller and the MCU. These may give more clarity than the schematic above. The thickness of the wires used is approx. 24AWG.

Here is an image of the assembly of the the electronics. The stepper motor driver fits on the inside of the vertical mount wall near the DC plug. The nodeMCU fits on the other side. Keep your wires short as there is not much room once you put the body on. Also ignore the bundle of wires sticking out at the top – that’s from a version which included a light sensor – I gave that up as it was impractical. The mounting location of my AutoBlinds device was always in the shade and no access to sunlight.

Assembly of the boards

Software and API

Once the device is connected to your WiFi network, you can access the web interface through http://your-device-ip/ to get to the home page that displays the current status of your device.

http://your-device-ip/api/help – will display the help information and the api options.

You can use the icons on the bottom of the home page to navigate the web interface. From the web interface you can setup that END position of your blinds.

To configure your device, close your blinds manually, wrap the chain around the cog and mount the device on the wall with light tension o the chain. Then from the web interface, select the GEAR icon and open the blinds electronically until you reach the desired state. Then click SAVE. Thats it. now you can open, close or partially open or close your blinds buy seating the following api command:

http://your-device-id/api/blinds?open=20 {to open the blinds 20%}

Bellow are some example screen shots from the wed GUI 

STL and Arduino Sketch File Bundle

Individual Files

WP 3D Thingviewer Lite need Javascript to work.
Please activate and reload the page.

Homebridge integration for use with Apple HomeKit

Code on GitHub

The STL files and info is also posted on Thingiverse

NOTE: This post is a work in progress and additional content details and material is still being added.

You may also like...


  1. Very good design, the shape is very cute.
    I have a question, does the 28BYJ-48 motor have enough torque to pull the curtains?
    In addition, can you write a more detailed description of the code.? I’m also trying to make an automatic blinds and buy several stepper motors. However, due to just contact stepper motor, so the operation of stepper motor do not understand.

    1. Hi, the motor has enough torque to tilt the blinds. I don’t think it would be able to slide them to one side. I found that the slower the motor moves, the more torque it has, to a point. Please take look at my code, I have added comments for each section.

  2. Any chance you could post a pic of the wiring? Cheers!

    1. Done. I updated the post with a schematic. Apologies for the crudity. If anything is unclear let me know.

  3. Hi, Great project! I am trying to control this from my home automation server running. Not sure how to send the commands from Domoticz tho, any ideas? Is it possible to connect via mqtt?

    1. Hi and thank you. I think for Domoticz you would need to write a plugin or utilise an existing one that can interact with this device via api. Please take a look at my plugin i made for Homebridge. Perhaps this will inspire a solution?

    2. I did a similar project for domoticz based on mqtt
      my code is terrible though and my steppers seem to drift because they are not geared like the one used in this project. maybe take a look at the hook up code:

  4. The code is excellent for Arduino Uno, but I want to use Attiny 85, I’m a beginner arduino. Maybe someone will help me will be very grateful. Thanks in advance.

  5. Hi, Nice project. Iā€™m a beginner arduino. When i upload the Javascript i got the message PIN1 was not declared in this script, can u help me? Thanks in advance.

    1. Could you tell me which Javascript you are referring to?

  6. Coen Witteveen says:

    Hello, thanks for this fun project. I made it entirely for my horizontal blinds. However, I have to increase the number of revolutions (Open LIMIT is set to šŸ™‚ to around 9000. When I go above 6900, the motor does not continue. Can you tell me what I need to change in the script to get this right?
    Thanks in advance!

    1. That’s an interesting question as I didn’t program any limits on what your MAX OPEN value is. Below is the structure that holds the MAX Open state, its called “MAXstate”

      struct EEPROMStruct {
      int MAXstate;
      int NOWstate;
      int OPENstate;
      int LUXstate;
      } eepromVar;

      I will troubleshoot with my blinds and post back. All my limits for my vertical blinds are set to around 4500.

    2. Coen Witteveen says:

      thank you for your answer, i have solved it. I have asked you another question under the name Coen Witteveen.

    3. Could you share your solution?

  7. In one video you used it with AppleHomeKit, how exactly do I have to set it up to use it with apple smarthome?

    1. Hi Simon,

      To get this device to work with Apple HomeKit, you will need to setup homebridge. Here is the link from which you will find all the info on how to set it up Homebridge is a device/application that allows you to connect many third-party devices to HomeKit, that don’t have certification. Once you have homebridge setup and working then install my HTTP-Window-Blinds plugin for homebridge ( and configure. That’s it. Your device will be visible in HomeKit.

    2. Coen Witteveen says:

      My answer for another site was mistakenly posted here:
      “Coen Witteveen
      May 25, 2019 at 7:35 am
      thanks for your answer, i solved it. I have asked you another question under the name Coen Witteveen “.
      Unfortunately I have not solved the problem yet. Sorry for the confusion.

  8. Where do I see my Device IP ?

    1. You will need to login to your Router and see all attached WiFi devices. The one for the nodeMCU should start with esp…..

  9. Coen Witteveen says:

    Hello Peter, I think something went wrong in my answers: the question from mister cw has been resolved, but the question from Coen Witteveen has not yet been about the number of revolutions. Thanks, sorry for the confusion. For me, could you look at the script why the engine suddenly stops at 7000 revolutions? Thanks!

    1. Hi Coen, I spent some time testing the rotation limits and could not find a fault. I set by test device to 9000 and ran it back and forth without problems. When setting it to 9000 however, I increased the set amount by values less than 4000. I think when setting up the limits, if you try to sett it to 7000 or more the web site might timeout as it waits for the nodeMCU to finish.

      Other than that, are you using the same 5v motor as in the description? Is the motor hot when running? Have you got the motor phases hooked up correctly such that its not skipping a phase? Sorry just brain storming here.

  10. anyone hook this up to google home / assistant?

    1. If you find someone that has a compatible service “Service” for the device, let me know and I will link it here.

  11. how are you mounting the mounting plate to the wall?

    1. Hi, I used double sided 3M tape to mount the wall plate. It holds very well. For a more secure or permanent solution I would suggest two screws in the wall and not to use the wall plate.

      The wall plate is there for temporary mounting and easy troubleshooting.

  12. Very good idea.
    Few my ideas.
    1. Add support for steeper motor or second project for nema 17 motor.
    2. Add mqtt support
    3. Add additional 3d printed planetary gearbox, because this motor is weak šŸ™

    1. I would need help with mqtt. As to the power of these little steppers, when you run them at low speed they have quite a bit of torque. The are capable to force close my vertical binds even if one blind is stuck.

  13. i have a weird problem where no matter if use a positive or negative number, the motor only spins in 1 direction.

    1. Sounds like a wiring issue. Check the connection especially the order in which you wired the MCU to the motor controller. I have found differences between two seemingly identical controllers.

  14. Hello, I’m having a problem getting the file on the NodeMCU via arduino with usb. I did not manage to pack the file on it. I can see it in my WLAN and I can also connect to the WLAN, but after the connection he does not find my IP in a browser. Definitely because I do not have the file on the MCU, he does not find my IP in the browser. Can you please tell me step by step, which file I should download exactly and how I get the file on arduino on my MCU? And my second question is: what is the hole on the lower side? For electricity? Power gets my MCU but over the USB. What do I need the hole for? Unfortunately, I can not upload any pictures here in the comments.

    1. Hi, Please take look at this step by step crash course on the nodeMCU and Arduino IDE

      If you upload the script successfully, then after powering on the nodeMCU it should go into server mode and allow you to connect to its WiFi network to configure. If the configuration is successful then the nodeMCU automatically connects to your WiFi network. You should be able to locate its IP from your routers DHCP connections. If its not there, then its not connecting. Please refer to the documentation of the WiFi library used, here:

      Keep in mind in orderer to compile and load the script onto the nodeMCU, you first need to configure your Arduino IDE and download the relevant libraries that the script uses. The Libraries are listed as includes at the top of the script.

      The hole on the bottom is for the DC power. I do not recommend powering the whole device through the 5v on the nodeMCU because the current tolerances on the input are very low and the motor can pull much higher current. In short, you can blow the nodeMCU. Hence the seperate power input. For debugging I have left the USB hole as well – that way you do not have to pull the device apart if you need to re-upload the script.

      Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.