Automated Motorized Window Blinds (Horizontal Blinds)April 10, 2019
Today on the hook up I’m going to show you how to build motorized blinds for as little as $10 per blind, and even if you don’t have horizontal binds, stick around to learn how to get the most out of these $3 stepper motors.
After automating my curtains few months ago I was becoming increasingly annoyed at needing to manually open the blinds after the curtains opened, but spending 75 to 150 dollars per blind to automate them was pretty much out of the question. So began my journey into DIY blind automation.
Based on other tutorials, my first attempt to motorize these blinds used servos, but I pretty quickly abandoned that attempt due to the nature of how a servo works. A servo uses a potentiometer to determine its absolute position and then make microadjustments to the voltage to keep it in the right place. This means that throughout the day you’ll hear the servo in your blinds making whining noises as it adjusts its position to resist gravity. It also means that the servo is constantly on, and if it’s fighting the load of your blinds it can overheat pretty quickly. One option to combat this would be to convert it to a continuous servo that doesn’t have any positional feedback, but at that point you basically just have a DC motor.
And since I wanted to have precise control over the position of the blinds, stepper motors seemed like a much better fit. In order to keep the cost as low as possible for this project I purchased a set of 2-8-BYJ stepper motors which are available on amazon for under $12 for a set of 5 motors and drivers, a pretty impossible to beat price. These motors are heavily geared and Initially I crossed my fingers and hoped that I’d be able to use these 5 volt steppers and drivers right out of the box to complete my project, but nothing is ever that easy, is it.
After designing some parts to fit the motor and driver, and an adapter for the tilt shaft of the blinds I was disappointed to find out that the motor could only move the blinds through about 80% of their range of motion, and lacked the torque to finish the job. As it turns out the last 10% of motion on either extreme is pretty important… that’s the part that actually blocks out the light. If you have extremely small or light blinds you MIGHT be able to get away with running these motors at 5V, but it wasn’t going to cut it for my application.
I wasn’t about to give up that easily though. Over the next few days I experimented with worm gears, planetary gears, multiple motor setups, and pulley systems, all with varying success, but overall I still wasn’t happy enough with the results to recommend them to you. I needed to be able to give these things more power, but the driver they came with didn’t seem to like when I supplied it with 12 volts, and because the 2-8-BYJ is a 5 wire unipolar stepper motor it isn’t compatible with most other available stepper drivers. Lucky for us, the 2-8-BYJ can be converted to a bipolar stepper pretty easily.
Without going into too much mechanical detail, a unipolar stepper has a common voltage connection between each coil and a bipolar motor does not, all we need to do to convert this unipolar motor to a bipolar motor is disconnect the common wire between the two coils.
Under the blue plastic cover you’ll find a small pcb where the wiring harness is connected, scrape away the center trace with a knife or small screwdriver to disconnect the common wire, snip off the red wire from the harness and you’re all done. Now we can use almost any stepper driver to deliver the needed voltage and current to increase the torque to our required level.
For my project I decided to use the small DRV8825 driver because they are small, cheap, and I had them on hand, but I have to admit that I HATE working with these things. They’ve got a potentiometer on them to set the current limit for your specific motor and I feel like you get maybe 2-3 chances to change this potentiometer before it breaks and you have to throw the driver in the trash. For this project I decided to leave the potentiometer at the 12 o’clock position and not mess with it, but I fully recognize that this is way too high of a current for these tiny motors. The good news is that we’re only going to run them for a few seconds at a time, and they aren’t receiving any power the vast majority of the time so they’ll have plenty of time to cool down. Another bonus to sleeping the motors when they aren’t in use is if need be you can manually tilt the blinds with minimal resistance from the motor.
Two modifications that I always make to these small drivers before deploying them is to cut off any of the unused pins and create a solder bridge between the reset pin and the sleep pin. I prefer to use the enable pin to sleep these drivers instead of the sleep pin since sleep still sends a bit of current to the motor to apply some holding torque, but the gearing of the motors provides plenty of holding torque anyways. Also, these cheap motors have pretty terrible backlash anyways, even without sleeping, so there’s no need to use the sleep pin over the enable pin.
Onto the setup.
To remove your blinds you’ll usually need to release the clip on one side of the blind with a screwdriver. After that you can slide the blinds out, and to make your life easier you should retract your blinds at least 90% of the way before pulling them down.
Inside you’ll find a tilting mechanism based around a tilt rod that can be in a few different shapes and sizes. Mine happen to be a 4 millimeter square, but they also come in 5 millimeter square, 5 millimeter hexagon and 6 millimeter hexagon. I’ve included stl files to print the adapters for each type of tilt rod. A fair warning though, I only had the 4 millimeter square rods to test fit, so my other files are untested.
You’ll need to remove the original worm gear tilting mechanism to install your new stepper motor, it usually just slides right out with a little bit of force. Next you’ll install your motor and adapter. I 3d printed a mount for the motor to fit inside my standard 2” blinds. I’ve included the .stl file for that model, but you may need to modify it to fit your needs.
I’ve gotten more than a few comments about people being disappointed with the need to 3d print parts for my projects, and I always try to avoid 3d printing whenever possible to be inclusive, but I’m just going to come out and say it: If you’re into DIY and you don’t have a 3d printer yet, it’s officially time to get one. The Ender3 pro is an extremely capable printer for around $230, if you need to justify your purchase with math you can think about it like this: The cheapest option for wifi retrofit blinds motors is around $120 per blind, so if you buy a 3d printer and automate 3 blinds using this design you’ll actually save $100, and who doesn’t want to save $100? I’ll just go ahead and leave that link down in the description, just think of all the money you’ll save!
After you’ve installed your motors it’s time to get to wiring. In my application I’ll be running the power cables behind this valence in my bedroom. Each stepper driver needs a few different wires: 5V power, 12V power, step input, direction input, sleep input and ground. I’m going to use Cat5 cable to run these inputs and since the all of the signals are very low current except for the 12V line (which is still relatively low), I’m going to use one twisted pair for 12V, 1 twisted pair for ground, then one wire each for direction, sleep and 5V.
To make everything look a bit nicer I’m going to use these dupont connectors on the ends of my cat5 cable, this connector and crimper set is another thing that will significantly increase the quality and look for your projects for a pretty small price. This step is totally optional, but does make installation much easier. Essentially you just strip off a few millimeters of insulation from the end of your wire, load up male or female dupont connector face down in the crimper, insert your wire and clamp down. This kit comes with different sized sleeves to group your wires together, which is really nice when you’re hooking up wires in tight places. Instead of needing to place each individual wire on the right terminal you just need to make sure the connector is in the correct orientation.
I chose to control all 3 motors together from a single NodeMCU so I connected the wires from each blind together before attaching them to the nodeMCU. This nodeMCU is in a small plastic case that I think some transistors from amazon came in, but you could 3d print a case too if you wanted to. On the blinds side the dupont connectors make it very easy to attach the driver and fit it into the cutout in the motor mount.
The sketch included in the description has links to all the libraries I used and the pins on my wiring diagram are the default pins in the sketch. All you need to do is update the wifi and mqtt information and upload it to your NodeMCU and you’re good to go. After you’ve uploaded the sketch and wired your motor you can change it’s position by sending integer values to this MQTT topic. Be aware that it will use the first value you send as it’s “home” or “current” value, so you’ll need to send two different values before it moves for the first time. Once deployed this allows them to receive a retained value for their current position in the event that they lose wifi connection or reboot. I’ve also included all the YAML you’ll need to add these blinds to home assistant as a cover.
I also added echo control to these blinds and included them in a routine that opens and closes the blinds and curtains together. I know not everyone has the ability to run hidden wires to their blinds, but if you do this option is pretty much unbeatable. My cost for motorizing these 3 blinds was less than $10 per blind and I’m really happy with the outcome. As always, if you’re interested in building this project, I’ve included all the links for the products that I’ve used in the description. Most of the links are Amazon affiliate links, so clicking on them does support my channel.
If you’re interested in supporting my channel directly through patreon like these awesome people the link to that page is down in the description. As always, if you have an issue with this project please post a comment down below, and if you find any problems in the code please post an issue on my github page and I’ll respond to it as soon as possible. If you enjoyed this video please consider subscribing, and as always, thanks for watching the hookup.