D.I.Y Cheap Smart Blinds

Do you want your blinds to open and close on there own, but not for a £100 smart device? Well i am going to show you how you can build your own for around £10! This model uses a Node MCU to run our program on and is controllable using API built into the source code!

You do need a 3D Printer for this project, but if you don’t have one, you can order a model from me and i will print it and ship it for you!

blinds_model2-min

So, what do you need to get started?

We need a fair few components for this project, they are fairly inexpensive though!

Required Components:

  • 3D Printer – Or Printed Parts
  • Node MCU CP2102 ESP8266
  • Stepper motor 28BYJ-48 5v
  • ULN2003 stepper motor driver
  • Micro USB Breakout Board
  • 5V USB Power Supply and also a Micro USB Cable
  • Computer to be able to write the program to the Node MCU
  • Soldering Iron
  • GPIO Cables

Recomended Copmonents:

  • 8x M2.5 x 6mm self taping screws – For the Node MCU and Stepper Driver
  • 8x M2.5 x 8mm Countersunk screws – For the top and bottom lid
  • 2x M2.5 x 12mm Countersunk screws + 2x nuts – Motor Mount
  • 1x M4 Steel Hex Head Cup Point Grub screw – To grip onto the gear

Building the circuit

Once you have all of your parts 3D printed and you have all of the electrical components at hand, we can get going!

Step 1

First thing is to remove the GPIO Pins from the Node MCU since these prevent the Node MCU from fitting into our tight enclosure. The pins are all of those long silver legs coming out of the bottom. To remove them, just take off the black guide and then de-solder them and pull them off.

Step 2 

Now our Node MCU is ready to be used, we can start our circuit. All you have to do is solder the wires as the schematic shows below:

– The 5V Supply is your Micro USB Breakout Board (It’s important that it as the same as the one in the picture above).

Programming

To program the Node MCU with our firmware, you will probably need a bit of experience with the Arduino IDE and debugging. There are plenty of tutorials online if you do the research, but to write this program you first need these libraries:

  • ArduinoJson 5.13.2
  • WiFiManager 0.14.0
  • Stepper 1.1.2
  • ESP_EEPROM 2.0.0
  • WiFi 1.2.7
 
You will also need the Arduino Driver for the Node MCU board depending on your machine.

You can download the Arduino sketch here, if you know your way around it, you can customise it to change the speed the blinds open, direction, steps etc… but bare in mind you need to keep enough torque at the stepper motor for it to move the weight well enough.

Home Integration

Congratulations, now your blinds are programmed and ready to be used. You can integrate it with Home Assistant and there is also a plugin for homebridge so that you can use it with Apple HomeKit!

Home Assistant Examples

Blinds Status Sensor
  - platform: command_line
    name: blinds_raw_data
    json_attributes:
       - position
    value_template: "{{ value_json['position'] }}"    
    command: "curl -X GET http://192.168.10.200/api/status"
    scan_interval: 30
Blinds Switch to Open and Close
  - platform: command_line
    switches:
      blinds:
        command_on: "curl -X PUT http://192.168.10.200/api/blinds?open=100"
        command_off: "curl -X PUT http://192.168.10.200/api/blinds?open=0"