blog.hirnschall.net

Contents

Yes, I LOVE Alexa. Unfortunately, I could not find a product to upgrade my existing window blinds to work with Alexa. So, let's go through the design process and how you can upgrade your own blinds to be smart.

Design considerations

As always, I like to start with a list of features around which we can design the product. 

The smart window blinds upgrade has to be:

Parts

At first, I wanted to use a stepper motor to open the blinds, but it was too big and way too noisy. Instead, we'll use a small 9g servo combined with an esp wifi module. We'll need the following parts for one window:

We will also (temporarily) need an Arduino to program the esp and one raspberry pi acting as a hub for all Alexa/Homekit projects combined.

Cost

As most smart home accessories require some sort of hub, we will not consider the raspberry pi's cost. So, all in all, this project is about $6 to $7 per window.

Schematic

As the esp8266 uses 3.3V and the USB charger outputs 5V, we'll use a cheap step down converter. The servo itself uses 5V. You can see how to connect everything in the schematic below. You can (as always) download everything you need to build this project yourself in the download section.

smart window blinds schematic
Figure 3.1: Schematic for smart window blinds

Assembly

Enclosure

To make this project really stand out, I decided to 3d print a custom enclosure. This is not required as you can use any plastic box and make the necessary cutouts with a sharp knife. (Tip: heat the knife up using a lighter to cut through plastic easily).  

Wiring

I used speaker-wire as it is very thick (thanks to all audiophiles), long and cheap. We can cut through a cheap USB cable we no longer need and connect the red (+) and black (-) wire to the speaker-wire.

finished smart window blinds electronics inside 3d printed enclosure finished smart window blinds electronics inside 3d printed enclosure
Figure 4.1: Window blinds electronics inside 3d printed enclosure

Software

Homebridge (Alexa and Homekit integration)

To use our own product with Alexa and Homekit, we'll use Homebridge on a raspberry pi. Please take a look at https://github.com/homebridge/homebridge-raspbian-image for detailed instructions on how to install Homebridge.

We will also use the homebridge-alexa plugin and the http-window-blind plugin. http-plugins allow us to easily add DIY smart home products using http and an esp.

ESP code

We can take a look at the http-window-blind plugin to see how the esp is supposed to respond to requests. 

The plugin will use a get variable named "pos" to pass a value between 0 and 100 to the esp, and it expects the response to be json. E.g. {"position":"20"} where 20 is 20% open.

Implementing this is straight forward. Upon an http-request, we map the "pos" value to an angle between 0 and 180 degrees and set the servo position accordingly. You can download the code for this project below. 

Now all that's left is to program the esp using an Arduino. We can do this with the Arduino IDE, as seen in this post: How to program an esp8266 with Arduino.

Automation

As the new window blinds work with both Alexa and Homekit, we can use an apple tv for automation. I like my blinds to open and close at sunrise/sunset. Another great feature is automatically closing them when I leave and open them when I arrive at home.

Résumé

I am really happy with this project. One of the main goals was to automatically close the blinds as soon as it gets dark outside to prevent people from seeing inside when the lights are on. This works great, and it is a great project to show off :) After all, we automated our window blinds ourselves!

Figure 7.1: DIY smart window blinds in action

Get Notified of New Articles

Subscribe to get notified about new projects. Our Privacy Policy applies.

Downloads

License

The content published on this page (with exceptions) is published under the CC Attribution-NonCommercial 3.0 Unported License. You are free to share on commercial blogs/websites as long as you link to this page and do not sell material found on blog.hirnschall.net/* or products with said material.

Article by: Sebastian Hirnschall
Updated: 14.08.2020