DIY SmartBlinds v2 – How to

Automation project for vertical and horizontal blinds

Following on the popularity of the DIY SmartBlinds v1 device found here, I attempted to update the design and make it a bit slimmer, easier to print and easier to assemble. This design uses all the same electronic components as v1 except for the power connector. In this version, I upgraded the power connector to micro usb and yes you can power this device from almost any USB power adapter. I have also updated the software to operate when mounted on the left or the right hand side of the window. So here it is:

DIY SmartBlinds v2 – 360 Render

The dimensions of this design are as follows. The body height is 125mm, width 47mm and depth 31mm. The distance from the wall to the face of the cog wheel is about 40mm, if you use the included wall mount then you should add another 3 mm.

This design has been extensively tested in my own home environment. The SmartBlinds device is mounted on the inside of the window frame in semi-direct sunlight. It has run on standby for over 226 days and has actual use over 450 hrs without the need for maintenance. Although I had very positive results yours may be different hence this is not a guarntee.

3D Printing

The printable components are made up of Top Lid, Bottom Lid with MCU mount, the Body and an optional Wall Mount. The assembly of the printed components is straight forward.

All components have been designed to be printed without supports. For printing I used my Prusa I3 MK3 printer. I use 0.2 layer height with 15% infill and PLA+. Even after months of usage in the Australian heat and semi-direct indoor sunlight, my prototype devices still work and operate perfectly.

Additional Components

You will require these additional components to complete the assembly. These are all easily obtainable online.

  • 1x Node MCU CP2102 ESP8266 (same as DIY SmartBlinds v1)
  • 1x Stepper motor 28BYJ-48 5v with ULN2003 driver (same as DIY SmartBlinds v1)
  • 8x M2.5 x 6mm self taping screws (MCU and driver board mount)
  • 8x M2.5 x 8mm Countersunk screws (top & bottom lid)
  • 2x M2.5 x 12mm Countersunk screws + 2x nuts (motor mount)
  • 1x M4 Steel Hex Head Cup Point Grub screw (same as DIY SmartBlinds v1)
  • 1x Micro USB Breakout Board – Green PCB!
  • 1x Micro USB Cord
  • 1x 5v USB Power Supply Arduino Sketch for the Node MDU, also attached to this post.

The connection of the electronics components is the same as DIY SmartBlands v1. Here the schematic for completeness. The only difference is that you are wiring up the power to a micro USB micro breakout board, pictured above. Its important you source the breakout board exactly as pictured i.e. the one with the Green PCB, as the mounting points have been designed for this micro USB board. You will also note that this PCB has additional power solder point next to the micro connector. These can be handy to connect power to either the NODE MCU or motor driver. There is another one readily available micro USB breakout board that has a blue PCB. NOTE: This design has not been tested with that PCB design.

Programming

The code for the NODE MCU can be downloaded from GitHub. You can upload the code using the Arduino IDE. There are plenty of tutorials online on the Arduino IDE and how to program the NODE MCU hence I am not repeating them here. I though it would be useful for troubleshooting to post the versions of the libraries that I used for my project. So here they are:

  • ArduinoJson 5.13.2
  • WiFiManager 0.14.0
  • Stepper 1.1.2
  • ESP_EEPROM 2.0.0
  • WiFi 1.2.7

Home Automation

If you would like to try to integrate the DIY Smart Blinds withe either Apple Homekit (Homebridge required) or Amazon Alexa through the Samsung Smart Things, I am providing my experimental code. Use at your own risk.

DescriptionLink
Arduino SketchGitHub link
Homebridge plugin / Homekit GitHub link
Samsung Smart Things – device handlerGitHub link

What’s next?

I am also testing a simple mod, for this design to make it suitable for Wand type blinds. Wand operated blinds (typically horizontal blinds) have a long wand / stick that when twisted adjust the position of the horizontal blinds.

DIY SmartBlinds v2 Wand Adapter

Let me know in the comments if that type of adapter would interest you or if you have any questions about this new v2 design?

You may also like...

26 Comments

  1. Good Morning.

    I want to carry out this project, but I have several doubts.

    Can you help me?.
    1-Could it be used for a blind?
    2-Could you put a battery or is it unfeasible?

    Thank you.

    1. Hi, to try to answer your questions. 1) if you are thinking about using this on a roller blind then it will depend on how heavy the roller blind is. I have designed this device to be used primarily on vertical and horizontal blinds for the tilt motion. 2) you could easily attach a battery pack to the micro USB. I have not done any test with a battery pack though.

  2. Hi Peter,

    I made this based on the v1 design and am having a little trouble with the power of the motor. It doesn’t seem to be strong enough to pull the cord and I’ve tried re-designing the wheel part so it’s smaller and grips the beads better but still wont pull the blind. Can you tell me if it is possible to get a motor that still fits but has more torque? I love the initial design btw, the nice curves on the box give it a very professional looking finish!

    Thanks,
    Eoin.

    1. Hi Eoin, glad you like the design. Those 5v motors I suggested in the components list have quite a bit of torque at low speeds, such that even when my blinds rotation sometimes gets blocked by something, the motor still turns to the point the needed dried slips. Having said that, the motor should be capable of pulling the beaded cord to rotate the blinds but it will not have enough power to pull the cord that slides the vertical blinds to one side. Have you made any changes to the code? I have not found any alternative motor that would be small enough with more torque. If you find any thing suitable let me know, I may be able to incorporate it in the design.

  3. Hi! bought the kit recently, I have one question, how do you tight the nut for the motor? please help!

    1. Hi, I used a small flat screwdriver to wedge between the nut and the side wall of the device body. This should prevent the nut from spinning. It’s a tight place but doable. The just used a screwdriver to tighten the screw. Good luck.

  4. Hi mate,

    Currently programming this at the moment and got homebridge to recognise it. Although havent figured out how to alter the rotation settings yet..

    I would really like to add this into Home Assistant, is this possible?

  5. Peter, i just finished the project, connected to homebridge and even alexa. The only issue i had was the servo doesn’t have enough torque to rise the blinds, i’m thinking about swapping the servo for a nema 17 bipolar stepper, thing is, i am not a very avid coder, do you have a version of the code for bipolar steppers? thank you,

    1. Hi Miguel, firstly congrats. Unfortunately I don’t have the code for other type of motors. Perhaps an arduino forum might be of help? Is the stepper small enough to fit into the case?

    2. Hi,

      can you share your code? I’m interested in the alexa part.
      I tried it myself, but it isn’t working.

    3. Hi Chris, I will be posting my Device Handler for the Samsung SmartThings which in turn you can connect to the Alexa echo system. Unfortunately Alexa does not handle windows Shades very well and can only respond to turn on or turn off because it treats them a switches. Hopefully Amazon will change this soon. I will post by code at the bottom of this blog post: https://www.candco.com.au/2019/03/10/diy-vertical-or-horizontal-blinds-automation-project/

  6. Yeah I’m learning and translating the code to be compatible with nema 17 bipolar stepper, i’ll keep you posted. I modified the case to fit the new motor, also gave some upgrades like “windows” to insert nut key to tight motor nuts easily, and two other “windows” to install to wall directly, no extra mount necessary, more reliable.

    1. Hi Miguel, Does the Nema 17 bipolar steper have the dimensions 42x42x48mm. Would love to find a stepper that is half that size.

  7. Hi Peter, yes, theres a lot of sizes, take a look at the chart middle page. https://www.amazon.com/gp/product/B00PNEQKC0/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

    Peter, regarding the code, could you explain this line to me:

    “int advanceAmount = 1; //for non blocking stepper set the advance amount each iteration”

    I’m using AccelStepper library to be compatible with the Nema17, and all functions are non-blocking (if i use blocking functions nodemcu times out and resets), what should I do with advanceAmount?

    1. The advanceAmount for a non-blocking stepper motor is probably irrelevant and should be 1. It’s meant to allow the Arduino interrupt the motor movement every x amount, so that you can run other code while to motor is spinning.

      Thank you for that link. I think these are standard size Nema 17 motors at about 4cm width. Looks like is is much more powerful than the one in my design. Please send me, if you can, a picture of your modified design with that motor in it.

    2. I have started a new Nema based project. Lets move the conversation here: https://www.candco.com.au/2020/04/18/diy-smart-blinds-v3/

  8. Hi Peter and Migual,

    Have you guys had anyluck with the Nema 17 motor. if you have please could you guys share the new 3d prints and code as well as the bill of materials. would like to automate my roller blinds and the other motor does not lift the blinds hoping the Nema will do the trick. thanks

  9. Hi Miguel and Peter,

    Have you managed to get get the Nema 17 working. and if you guys have would you be able to share the bill of materials as well as the code.
    Thanks

    1. Hi Michael, I have not tried the Nema17 motor yet. I felt it’s too bulky and needs 12v. My design intention was a small form factor and powered by 5v from a USB power supply. I think this would need to be a seperate design and project.

  10. Hi there,
    im pretty new to all this stuff but im really excited to build that thing.
    Where can I find the Arduino Sketch / Code? I just can’t find it.
    Thanks a lot!

    Phil

    1. Hi Phil, the code is in a link at the bottom of the post. Good luck.

  11. Hi Peter,
    I’ve used the Arduino Sketch you provided and I keep getting the following error:
    In function ‘void getHTMLstatus()’:
    DIY_SmartBlinds:249:43: error: ‘getLux’ was not declared in this scope
    eepromVar.LUXstate = getLux(photocellPin);
    ^
    exit status 1
    ‘getLux’ was not declared in this scope

    Would you be able to help me?

    1. Hi Josh, you can remove all reference to the getLux function. I was toying with a light sensor built into the DIY SmartBlinds but gave up because the device was always in the shade and couldn’t get an accurate reading.

  12. Hey, I’ve been meaning to do your original design for ages now after buying some parts but just notice you’ve posted this one which I’ll follow instead! Do you have any pictures/walkthrough of the wiring please for a beginner (in electronics!)? Also where is the grub screw used? I can’t seem to tell. Thanks!

    1. Yes, the DIY SmartBlinds V1 has the circuit diagram. Its the same for v2. Also there is a step by step on Instructables.

  13. Hi, did you desolder the pins on the ULN board in order to finish wiring it up? I’ve found I can’t fit the jumper wires on the ground and power pins due to the power board being in the way? A fully assembled picture of the inside would be really helpful if possible? Thanks!

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.