{"id":774,"date":"2019-04-10T14:10:34","date_gmt":"2019-04-10T18:10:34","guid":{"rendered":"http:\/\/www.thesmarthomehookup.com\/test_install\/?p=774"},"modified":"2023-02-08T16:29:06","modified_gmt":"2023-02-08T21:29:06","slug":"automated-motorized-window-blinds-horizontal-blinds","status":"publish","type":"post","link":"http:\/\/www.thesmarthomehookup.com\/test_install\/automated-motorized-window-blinds-horizontal-blinds\/","title":{"rendered":"Automated Motorized Window Blinds (Horizontal Blinds)"},"content":{"rendered":"<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/1O_1gUFumQM\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><\/iframe><\/p>\n<p>Today on the hook up I\u2019m going to show you how to build motorized blinds for as little as $10 per blind, and even if you don\u2019t have horizontal binds, stick around to learn how to get the most out of these $3 stepper motors.<\/p>\n<p>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.&nbsp; So began my journey into DIY blind automation.<\/p>\n<p>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.&nbsp; A servo uses a potentiometer to determine its absolute position and then make microadjustments to the voltage to keep it in the right place.&nbsp; This means that throughout the day you\u2019ll hear the servo in your blinds making whining noises as it adjusts its position to resist gravity.&nbsp; It also means that the servo is constantly on, and if it\u2019s fighting the load of your blinds it can overheat pretty quickly.&nbsp; One option to combat this would be to convert it to a continuous servo that doesn\u2019t have any positional feedback, but at that point you basically just have a DC motor.<\/p>\n<p>And since I wanted to have precise control over the position of the blinds, stepper motors seemed like a much better fit.&nbsp; 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.&nbsp; These motors are heavily geared and Initially I crossed my fingers and hoped that I\u2019d 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.<\/p>\n<p>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.&nbsp; As it turns out the last 10% of motion on either extreme is pretty important\u2026 that\u2019s the part that actually blocks out the light.&nbsp; If you have extremely small or light blinds you MIGHT be able to get away with running these motors at 5V, but it wasn\u2019t going to cut it for my application.<\/p>\n<p>I wasn\u2019t about to give up that easily though.&nbsp; 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\u2019t happy enough with the results to recommend them to you.&nbsp; I needed to be able to give these things more power, but the driver they came with didn\u2019t 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\u2019t compatible with most other available stepper drivers.&nbsp; Lucky for us, the 2-8-BYJ can be converted to a bipolar stepper pretty easily.<\/p>\n<p>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.<\/p>\n<p>Under the blue plastic cover you\u2019ll 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\u2019re all done.&nbsp; Now we can use almost any stepper driver to deliver the needed voltage and current to increase the torque to our required level.<\/p>\n<p>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.&nbsp; They\u2019ve 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.&nbsp; For this project I decided to leave the potentiometer at the 12 o\u2019clock position and not mess with it, but I fully recognize that this is way too high of a current for these tiny motors.&nbsp; The good news is that we\u2019re only going to run them for a few seconds at a time, and they aren\u2019t receiving any power the vast majority of the time so they\u2019ll have plenty of time to cool down.&nbsp; Another bonus to sleeping the motors when they aren\u2019t in use is if need be you can manually tilt the blinds with minimal resistance from the motor.<\/p>\n<p>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.&nbsp; 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.&nbsp;&nbsp; Also, these cheap motors have pretty terrible backlash anyways, even without sleeping, so there\u2019s no need to use the sleep pin over the enable pin.<\/p>\n<p>Onto the setup.<\/p>\n<p>To remove your blinds you\u2019ll usually need to release the clip on one side of the blind with a screwdriver.&nbsp; 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.<\/p>\n<p>Inside you\u2019ll find a tilting mechanism based around a tilt rod that can be in a few different shapes and sizes.&nbsp; Mine happen to be a 4 millimeter square, but they also come in 5 millimeter square, 5 millimeter hexagon and 6 millimeter hexagon.&nbsp; I\u2019ve included stl files to print the adapters for each type of tilt rod.&nbsp; A fair warning though, I only had the 4 millimeter square rods to test fit, so my other files are untested.<\/p>\n<p>You\u2019ll 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.&nbsp; Next you\u2019ll install your motor and adapter.&nbsp; I 3d printed a mount for the motor to fit inside my standard 2\u201d blinds.&nbsp; I\u2019ve included the .stl file for that model, but you may need to modify it to fit your needs.<\/p>\n<p>I\u2019ve 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\u2019m just going to come out and say it:&nbsp; If you\u2019re into DIY and you don\u2019t have a 3d printer yet, it\u2019s officially time to get one.&nbsp; 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:&nbsp; 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\u2019ll actually save $100, and who doesn\u2019t want to save $100?&nbsp; I\u2019ll just go ahead and leave that link down in the description, just think of all the money you\u2019ll save!<\/p>\n<p>After you\u2019ve installed your motors it\u2019s time to get to wiring.&nbsp; In my application I\u2019ll be running the power cables behind this valence in my bedroom.&nbsp; Each stepper driver needs a few different wires: 5V power, 12V power, step input, direction input, sleep input and ground.&nbsp; I\u2019m 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\u2019m going to use one twisted pair for 12V, 1 twisted pair for ground, then one wire each for direction, sleep and 5V.<\/p>\n<p>To make everything look a bit nicer I\u2019m 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.&nbsp; This step is totally optional, but does make installation much easier.&nbsp; 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.&nbsp; This kit comes with different sized sleeves to group your wires together, which is really nice when you\u2019re hooking up wires in tight places.&nbsp; 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.<\/p>\n<p>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.&nbsp; 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. &nbsp;&nbsp;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.<\/p>\n<p>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.&nbsp; All you need to do is update the wifi and mqtt information and upload it to your NodeMCU and you\u2019re good to go. After you\u2019ve uploaded the sketch and wired your motor you can change it\u2019s position by sending integer values to this MQTT topic.&nbsp; Be aware that it will use the first value you send as it\u2019s \u201chome\u201d or \u201ccurrent\u201d value, so you\u2019ll need to send two different values before it moves for the first time.&nbsp; Once deployed this allows them to receive a retained value for their current position in the event that they lose wifi connection or reboot.&nbsp; I\u2019ve also included all the YAML you\u2019ll need to add these blinds to home assistant as a cover.<\/p>\n<p>I also added echo control to these blinds and included them in a routine that opens and closes the blinds and curtains together.&nbsp; I know not everyone has the ability to run hidden wires to their blinds, but if you do this option is pretty much unbeatable.&nbsp; My cost for motorizing these 3 blinds was less than $10 per blind and I\u2019m really happy with the outcome.&nbsp; As always, if you\u2019re interested in building this project, I\u2019ve included all the links for the products that I\u2019ve used in the description.&nbsp; Most of the links are Amazon affiliate links, so clicking on them does support my channel.<\/p>\n<p>If you\u2019re interested in supporting my channel directly through patreon like these awesome people the link to that page is down in the description.&nbsp; 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\u2019ll respond to it as soon as possible.&nbsp; If you enjoyed this video please consider subscribing, and as always, thanks for watching the hookup.<\/p>\n<h5>Github Link to All Required Files: <a href=\"https:\/\/github.com\/thehookup\/Motorized_MQTT_Blinds\">https:\/\/github.com\/thehookup\/Motorized_MQTT_Blinds<\/a><\/h5>\n<h5><\/h5>\n<h5>Parts:<\/h5>\n<h5>Stepper Motors: <a href=\"https:\/\/amzn.to\/2D5rVsF\">https:\/\/amzn.to\/2D5rVsF<\/a><\/h5>\n<h5>Stepper Drivers: <a href=\"https:\/\/amzn.to\/2OZqW1W\">https:\/\/amzn.to\/2OZqW1W<\/a><\/h5>\n<h5>NodeMCU: <a href=\"https:\/\/amzn.to\/2I89xDF\">https:\/\/amzn.to\/2I89xDF<\/a><\/h5>\n<h5>12V Power Supply: <a href=\"https:\/\/amzn.to\/2G2ZJrf\">https:\/\/amzn.to\/2G2ZJrf<\/a><\/h5>\n<h5>Buck Converter: <a href=\"https:\/\/amzn.to\/2UsQ7jA\">https:\/\/amzn.to\/2UsQ7jA<\/a><\/h5>\n<h5><\/h5>\n<h5>Recommended Tools<\/h5>\n<h5>Ender3 3d Printer: <a href=\"https:\/\/amzn.to\/2GcznnZ\">https:\/\/amzn.to\/2GcznnZ<\/a><\/h5>\n<h5>Dupont Crimper and Connector Set: <a href=\"https:\/\/amzn.to\/2X1Oeap\">https:\/\/amzn.to\/2X1Oeap<\/a><\/h5>\n<h5><\/h5>\n<h5>Follow me on Twitter: @TheHookUp1<\/h5>\n<h5><\/h5>\n<h5>Support my channel:<\/h5>\n<h5>Patreon: <a href=\"https:\/\/www.patreon.com\/thehookup\">https:\/\/www.patreon.com\/thehookup<\/a><\/h5>\n<h5><\/h5>\n<h5>Tesla Refferal Code: <a href=\"https:\/\/www.tesla.com\/referral\/robert37264\">https:\/\/www.tesla.com\/referral\/robert37264<\/a><\/h5>\n<h5><\/h5>\n<h5>Music by www.BenSound.com<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>Today on the hook up I\u2019m going to show you how to build motorized blinds for as little as $10 per blind, and even if you don\u2019t 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2570,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-774","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects"],"acf":[],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/comments?post=774"}],"version-history":[{"count":4,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/774\/revisions"}],"predecessor-version":[{"id":2323,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/774\/revisions\/2323"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media\/2570"}],"wp:attachment":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media?parent=774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/categories?post=774"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/tags?post=774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}