[RELEASE] ESP8266 / Arduino servo controlled smart blinds

I am new to this stuff. Are there existing step by step instructions ?? I have made everything I guess is correct but then triggering the open/close in smartthings just happen nothing.
Wondering how exactly the physical board is connected to my smartthings mobile app. In the ST_anything development in the smartthings app inside the “thing” in the upper right gear I can set the MAC and IP of the ESP68266 but in this servo controled smart blinds when I go to the gear it is asking me only for the IP and port. Is this sufficient to get the Smartthings connected to the board ?? Is this IP the one from my ESP8266 ??

No, there is an arduino sketch referenced here:


Also has the DTH for ST.

ok, I have taken a look but not sure on what portion of the code is dong the connection from the Board to the Smartthings app. Can you help me understand that ?

what should I put in the mobile smartthings app thing in the upper right gear ?? it is asking for an IP and a Port. So is it the IP that the ESP8266 is using to connect to my internet ??

Do I have to add any additional libraries and modify anything on them ??

Did you upload the sketch to your arduino? You can’t just use any old program on your ESP8266. You have to use the one from my github page if you want to use my DTH. I don’t have time to give you a more detailed explanation right now unfortunately.

yes I installed your DTH in smartthings then in the sketch I put my wifi information and password then load this sketch to my board , then in the smartthings app in the gear I put the IP that my ESP8266 was assigned in my modem and port but the servo is just not moving when giving the instruction in the smartthings app.
I am not sure if I am missing to include another parameter. No urgent but if later once you have time if you can let me know just the parameters I need to put in each place (the smartthings app gear and the sketch) I will really appreciate. thanks

after all day of testing and troubleshooting I manage to make it work but I found that actually what is giving the correct command/instruction to the servo is the dimmer. Is that the way it suppose to work ??

And when the dimmer is 100 or 0 it will physically make the servo to rotate but it will not update the status in Smartthings to open or closed

is this the way it works ??

Not if you use the one that I posted. The DTH I posted has both switch capability and dimmer. If you use set-level it will also turn on the “switch”. Turning off will set to 100 since i close mine up. You can modify that in the code of the DTH.

First off, huge thank you to jetpuf and C_Hobbs for putting these projects together, very cool!

I’ve printed a couple gearboxes, resized the gears to fit my Home Depot 2" blinds, tweaked the code to support 2 servos, and am successfully controlling two blinds in my office using a single D1 Mini WeMos. Happy to share the gear and tweaked code if anyone is interested (very primitive, but works).

However, how are you guys powering these things long term? I’m not sure how safe I feel with a 2.5a power supply beind those tiny tiny servo wires… Should a single strand fray from blind movement, and arc out to ground, I fear a fire may start. The power supply I am using does have short circuit protection, but I’m not sure where that threshold is met, or if a single strand of wire could carry 2.5a @ 5v DC before the protection kicks in.

Anyone else have this concern? I haven’t been leaving the power supply plugged in while I’m away from the house for now.

I just wanted to post a thanks to all those who have contributed here. I automated my blinds years ago with an Arduino, a servo attached directly to the main rod of the blinds, and a simple light sensor. This worked pretty well except when a car parked outside my house with headlights on for longer than 30 seconds and the blinds dutifully opened in response to the light. :confused: I recently purchased a SmartThings Hub and was looking for a way to integrate my automated blinds into the rest of my smart home so I could set them to open and close on a schedule rather than based on the light sensor. Thus I stumbled across this post.

It would never have occurred to me to build a gear box to get the full range of motion out of the blinds; that’s brilliant! After stumbling through learning how to 3D print the gear box (borrowing a 3D printer from a friend) and re-writing some of the code in Groovy and Arduino I think I’m pretty close to installing this thing. I have tested the device via the SmartThings app and can get the “blinds” (servo attached to controller) to open and close (spin left and right)… now I just need to get the 3D printed gear box to fit and I’m good to go.

My biggest stumbling block has been printing a gear that fits over the main rod in the blinds. The rod in my blinds is definitely not the same size or shape as the one this gearbox was designed for and the gear is only slightly larger than the rod so it’s been challenging to create a gear that will fit over it. Challenge accepted. :slight_smile:

I’m using an MG996 servo as suggested, a NodeMCU Amica controller board with ESP8266 chip, an AC to USB adapter with 5V + 1.8A output to a long white ribbon cable (the output matters, apparently… as not all adapters are created equally… I tried several as the board kept resetting). I designed and printed a box to put the controller board into so the USB cord goes in one side and the servo cable comes out the other side that way I can stick the box to the wall behind the blinds but still remove the controller board as needed. I should also say that I had some difficulty loading code to the controller board at first, due to the pin I chose for the servo’s “signal” wire… the first pin I tried was apparently causing the board to reset in the middle of the upload. With some trial and error, I found a pin (Pin 5) that worked as expected.

Thanks again!

1 Like

Nice, sounds cool! Can you share some pics of your setup once you get it up?

I have never gotten around to automating my blinds but I have all the components to make it happen. I know routing/hiding power to the blinds will be a challenge, curious how that looks with your controller/servo box. I might need to get a copy of that .stl file :smirk:

Here’s a picture of the controller in it’s box with cords tucked away. We have curtains, so I didn’t bother hiding the box well… but I could just as easily have mounted it completely out of sight. Note the cord tucked into the corner blends in pretty well with the window frame.

I’m still struggling with the gear box so I went back to my old setup for now, with a servo attached directly to the rod. I’m using this until I can figure out how to get the gear box to work consistently. It doesn’t have full range of motion yet, but it can go from fully closed to fully open… and the controller is attached to my SmartThings Hub so I can now open and close the blinds at my house while I sit in my office at work. :slight_smile:

I’ll get it to open and close all the way eventually. In the mean time, this works:

1 Like

Has anyone been able to find a quiet/very quiet servo to use for this?

For two of my blinds, I power my servos directly off the power supply. I connect a 5v supply to the board’s VIN or 5v pin and also to the 5v pin of the servo. For my kitchen vertical blinds, since they are much lighter and easier to rotate, i power them off the boards 5v pin. For my living room blinds i had to use a stronger servo which requires 7v. So i have a 12v supply with 2 buck converters, 1 for 7v and 1 for 5v to power the servo and the board.

Also, I will say that I have moved mine over to the ST_Anything integration. This code has a lot of “delays” in it. This causes the blinds to not close as tightly or move as fast as they could. With the servo capability in ST_Anything, i get much better performance. Plus, I can use the board for a contact sensor for the window too!

1 Like

Maybe I haven’t looked hard enough but someone who isn’t a developer, nor EE, I’m looking for a wiring diagram along with a step by step guide that is geared towards using the Arduino mini and Wemo DS Mini to get this up and running. Anyone that can point me in the right direction?

Did you ever figure this out? I’m running into this issue.

What are you confused by? I’m sorry, but if you don’t know how to wire up a servo to an ESP board, there are plenty of tutorials out there to show you how to get started. This project isn’t for a beginner who doesn’t know how to do those things. And I’m sorry but I don’t have the time to walk you through it step by step. None of us are paid for our contributions here. Do you know what an Arduino is? If not, I suggest you start your learning there. Best of luck.

I don’t have access to a 3D printer and I don’t really know how to modify STL files. I wanted to see if the MG996 motor used in this project can be used along with a shaft coupler like C_Hobbs did. I basically want to Frankenstein the two approaches together. I like the lower cost of the MG996 but I don’t have 3d printing/designing capability. Also, I want the ability to close/open my blinds partially like this project does. Thoughts?

Just a quick heads up to anyone thinking of buying a bunch of Home Depot 2 inch 2 1/2 inch blinds for this project. It appears that HD has redesigned the headrail on the 2 inch 2 1/2 inch blinds. They now have a radiused front profile and the result is that the bottom front of the headrail is 1/2 inch narrower that the top. Here’s a pic that shows the problem:

And here’s another pic that shows the interference with the gearbox:

I’ve been thinking about doing this now for months and finally bought a 3D printer specifically for this project. Luckily, I noticed the headrail change before buying 10 blinds and having them cut to size. I bought one (uncut) blind to see if I could make it work. Unfortunately, it’s gonna require a gearbox revision to use this particular HD blind and I’m not entirely sure that the servo will fit.

Does anyone know of another blind brand that works with the current gearbox? Specifically, I’m looking for a headrail that’ll accommodate the @blebson modified gearbox that uses a momentary switch for manual tilt:

How did you change your code to control two blinds with a single D1 Mini? I’m looking to do 3 blinds with a single D1 mini. I thought about kicking them off at different times (different pin for each servo) so they do not draw too much power. Curious what your code looks like. Thanks!

Take a look at ST_Anything. There’s a servo library for it now.