Integrated Alexa Controlled Smart Blinds

5,368

About: Just your average hobbyist interested in anything DIY from electronics to woodworking. Enjoy creating new things and overcoming problems.

There are plenty of Smart Blind projects and Instructables currently available online. However, I wanted to put my own touch on the current projects with the aim of having everything internal in the blind including all the circuitry. This would mean a cleaner and more presentable smart blind system.

So in my first Instructable, I am going to show you how you can make your very own smart blind system that can be controlled by your voice through Alexa, using a mobile device or manually at the blinds themselves.

I will provide everything I possibly can so you can make your own! Enjoy :D

Supplies:

Soldering Iron & Solder

Hot Glue Gun

1 x 270 Degreee High Torque Servo (https://amzn.to/31Y1EqD)

1 x NodeMCU ESP8266 Development Board. Anything similar to this one: https://amzn.to/30VPrlc

2 x Tactile Buttons

Prototyping Veroboard

Required length of Speaker cable to reach a USB outlet (5V)

3D Printer with PLA or 3D Printing Service

Lengths of Hookup Cable

Female & Male Header Pins to Fit Veroboard (This is optional, its not required if you want to solder everything directly to the board)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Dismantling Your Current Blind

Ok so the first bit sounds a bit scary but it is very straight forward and generally most blinds use the same system, all be it with looking slightly different!

The first thing you need to do is find the side in which the current pulley system is located that allows you open and close the blinds. It will look similar to the first image (This has already been taken out of the blinds)

Once you have located this, you then need to remove it from the blinds. It is just a case of removing the end of the string hanging down (There is a knot located in the end of each string). Once these are removed, there will be a little holding washer on the hexagonal or square rod running through the system. Remove this (Please keep it as its needed later) and then slide the pulley system towards the end of the rod.

This is everything that needs to be removed. It should leave you with the rod where it was located and also there should be a hole where the pulley strings ran through, this is where the buttons for manual control will be located. The second image shows how the insides will look once the old pulley is removed.

The reason for removing this pulley is because it creates too much resistance on the servo motor, causing the motor to stall and therefore cannot physically move the blinds.

Step 2: 3D Printing Inserts

Ok so below I have included all the required 3D files to create the Smart Blinds. If you do not own a 3D printer then there are various online services that will print the parts for you for a small cost. I have included both the ready to print STL files and also the raw Fusion 360 files if you need to adjust any of the dimensions or shapes as not every blind is the same unfortunately! Here is a brief explanation of each Model below:

Servo Coupling - The servo coupling is designed to fit any standard servo accessories and will attach to the servo using the screws provided with the servo. The coupling I have included will fit a Hexagonal rod inside the blind with a diameter of 6mm.

Main Circuit Insert - This insert is designed for the main circuit board to glued on top off and sat inside the blind underneath the blind control rod.

Servo Insert - This insert is designed for the servo to be secured into and then slid into the end of the blinds. It will hold the servo securely without any movement. This has been designed to fit the servo linked in the supplies section.

Push Button Holder - Lastly, the push button holder will allow the push button circuit created later on to be held in place above the hole left in the blinds from the pulleys. These will allow manual operation of the blinds if needed.

Step 3: Building the Circuit

This step will require quite a bit of soldering but it is all worth it! Just take your time and don't rush anything.

We will be building the circuit on copper Veroboard, this will allow the circuit to be built easily, just make sure to cut the correct tracks to stop any short circuits!

Please follow the included Fritz circuit diagram to build the Smart Blinds circuit. When building the circuit, you should have the circuit insert printed. So depending on the size you needed to create for your blinds, try to make the circuit as small as possible. As you can see from the one I created, the Verboard is the same width as the length of the nodeMCU board. This saves precious space once inside the blind.

As mentioned in the supplies section, I chose to solder female header pins onto the board, this would allow me to easily change the nodeMCU out if it ever failed or if there was a problem. However, if you want to, its perfectly acceptable to solder the nodeMCU board directly onto the Veroboard.

The one thing I would recommend is using Male headers for the servo connection onto the board, this makes it much easier to install once inside the blinds.

The images show the completed board (With the 3D printed part already glued to it)

Push Button Circuit Board

The other circuit that you need to build is the Push Button Circuit that will allow you to manually override the blind movement if needed. The included 3D printed holder has enough space for two buttons and also includes a hole for the 3 cables to fed through out the side (1 GND and 1 for each buttons digital input) As you can see from the circuit diagram, the GND cables are daisy changed so there is only one cable joining the push button circuit GND to the NodeMCU Circuit GND.

The size you need to make the Circuit Veroboard is:

W = 24mm

L = 21mm

Step 4: Preparing the NodeMCU Board

The next step is to upload the required software onto the NodeMCU board. The way to do this is by using the Arduino IDE. However, its not a case of plug and play because the library for the NodeMCU needs to be installed into the IDE.

Rather than me go through this process, I would recommend using this guide as it explains every step and detail required to get the NodeMCU working with the Arduino environment:

https://bit.ly/2Rznoni

Once you have completed the above Instructable, you should now be at a point where the NodeMCU can be programmed using the Arduino IDE, the NodeMCU can connect to your WiFi and you can also control it through a web browser.

Step 5: Programming NodeMCU With Smart Blinds Software

The next step it to actually upload the smart blinds program to the NodeMCU board. There is already an amazing library out there that allows you to control smart lighting with brightness control through the NodeMCU and Alexa. The Library is created by AirCookie and allows up to 10 devices to be programmed. You can find the original source code here: https://bit.ly/2AUW0tp

In the case of the Smart Blinds, we use the On/Off of the virtual light to turn the blinds from the Off position (0) and the on position (The last used percentage). We then use the Brightness setting as the amount we want the blind to open. However, this only ranges from 0-70% with 70% being the full range of the servo.

I have included the Arduino file. So please download the code and then open it up. You can see it doesnt really take a lot for this to all happen but there are a couple changes you need to make.

WiFi SSID: The first thing is to change the SSID to match the WiFi connection you want to use. This needs to match it exactly, otherwise you will get problems connecting.

WiFi Password: The second thing you need to change is the WiFi Password to match the password of the SSID you are connecting too.

Espalexa Library: Next you need to so is make sure you add the Espalexa library to your Arduino IDE. To do this, please follow this very short tutorial: https://bit.ly/324psZW

Change Device Name: The last thing you need to do is change the device name to how you want it to appear in the Alexa app. To do this change the part in this line 'espalexa.addDevice("Blinds", servoPositionChanged, 20)' where it says 'Blinds'. Change this to anything you want.

Once all the above steps are completed, simply press the upload button to upload the program to your NodeMCU board. Now hopefully it succeeds and you can proceed to the next step, Testing!

Testing the Programme:

In your case, you should now be at a point where you have the circuit built. However, for the purposes of this inscructable, the page shows my testing it as a temporary breadboard set up. Now that you have the circuit built and the programme loaded, you can now test everything works ok. So connect everything up as per the circuit diagram and then firstly test that the manual buttons work. One button should turn the servo one way and the other should turn it the opposite. Once this is completed, you now need to add the device to your Alexa.

To add the device to your alexa please follow these steps:

1. Open up your Alexa app on your mobile device

2. Go to the Devices tab and then press the plus sign in the top right of the screen

3. Next, press 'Add Device'

4. Scroll down until you find the title that says 'Other'

5. Then press discover devices. This will then take a few seconds and your device will appear with the name you put into the code

6. You can then add the device to your device list

Once the device is added, you can then use you Alexa to set the servo to any position you want from 0-70% by saying 'Alexa, set the (Name you give your device) to 50%' Do this at different percentages to make sure it responds correctly.

If you get any issues with the Alexa side of things then please use the Github link to the library where you can troubleshoot your issue: https://bit.ly/2AUW0tp

Step 6: Prepping the Various Parts

The next step is where things start coming together and thats putting everything into the various 3D mounts ready to go into the blind chassis

Assembling the Servo:

The first thing to do is prepare the servo for fitting into the blind. Due to the size of the servo, two of the supporting screw holes need to be removed which is very easy done due to the construction being plastic. Remove the two screw holes as circled in the image.

Once this part is removed, slide the servo into the 3D printed servo mount and use the provided screws to secure the servo in place.

Feed the servo cable from the rear of the servo and on the underside of the mount.

Attaching the Coupling:

The next step is to fit the coupling to the servo. To do this, use the provided full disk attachment that came with your servo and use two of the provided screws to screw the disk to the side of the coupling with the screw holes in. The screws will be bigger than the holes in the servo attachment so take your time and care not to split the plastic.

Once the disk is attached to the coupling, the last thing to do is slide the coupling assembly to the servo spline and use the spline screw to secure it to the servo tightly.

Main & Button Circuit:

To assemble the main circuit in the circuit mount, I just simply used a hot glue to cover the majority of the underside of the circuit board and then pressed it against the mount. This is enough to secure it in place and the mount main goal is to stop the circuit short circuiting against the metal blind frame.

The button circuit is easy to assemble and requires no hot glue. To assemble it, simply feed the 3 cables through the cable slot and then slide the circuit into the side slits right up until it stops.

Mains Power Cable:

For the Mains cable, I used a 2 core speaker cable and soldered a USB connection on one end. This allows the circuit to be powered from a standard USB socket which plenty of people have. I recommend using similar to mine which is: 5V/2.1A. It is not needed to go above 5V as this is all the servo requires.

Make the Cable the required length to reach the blinds when put back up and enough slack, so to make sure it doesn't pull on the circuit and the cables.

Step 7: Putting It All Together

This is the last step to actually building your Smart Blinds!

Inserting the Circuit Board

The first step is to insert the Main circuit board into the blind frame. I recommend putting this to the opposite side of the first pulley where the servo will sit. To insert the board, lift the rod and it will come away from the blind frame. Once you can get underneath it, slide the circuit board in, making sure that it is fully pushed to the bottom of the frame and is in the right location that all the cables will reach. (My images already show the cables in place)

Inserting the Buttons

The second step, whilst the rod is still lifted, is to secure the buttons into place. To do this, put quite a bit of hot glue (Or superglue if you don't mind it being permanent), then place the buttons pointing down above the hole. Make sure you can get to both buttons from below, similar to the image. Now route the cables around the pulley as shown in the image and connect them to the correct inputs according to the circuit diagram.

Inserting the Servo Assembly

The next step is to insert the servo assembly. To do this, simply slide the main body into the end of the blind. It should slide nice in easily after a few pushes and pulls on the mount. Do not connect the coupling at this point as the rod should still be lifted away and not fully in place. Feed the servo cable through the mount and the same direction as the button cables and then attach to the circuit board.

Power:

Next, feed your power cable through the end of the blind frame, then under the servo mount where the servo cables is running. Then feed it the same direction as the rest of the cables and attach it to the correct screw terminals. Making sure that it is nice and secure and wont pull out.

Connecting the Mechanical Parts Together:

The last step is to connect the servo to the blind rod. So firstly, push the rod back into place and slide it towards the servo as far as it will go. Replace the little stopper washer that was removed early on when removing the pulley. Push the washer as far as it will go. Now when you shake the rod back and forth, it shouldn't slide out of place.

Now turn the rod into the position that you want when your servo is at 0 DEGREES. Next turn you servo to 0 DEGREES also by turning the coupling clockwise until the servo cannot turn anymore.

Next, slide the servo assembly towards the rod and the coupling and rod should line up, if not, you may have to turn the rod slightly (Do not turn the servo as it will put it out of position) Once they both line up, push them together until they wont move anymore.

Assembly Complete:

Thats everything inside the blind assembled together. Before hanging the blind back up on the brackets, make sure that everything inside is connected correctly and that all the electrical and mechanical connections are secure.

One little tip I would give is to place a little bit of electrical insulation tape on top of the wifi chip. This is because it comes very close to the rod of the blind when it is turning.

Step 8: Final Testing

Thats it!, you have now completed all the required steps to make Smart Blinds controlled by Alexa.

The last step is to run a full test on your blind system.

Firstly, Power up your blinds and give it 20-30 seconds to ensure that it has connected to the WiFi fully. It can sometimes take a while because of the lack of Antenna on the NodeMCU board, it can stuggle getting through the metal blind frame.

Once it's powered and connected, the blinds will move to their default position. At this point, have a play a go through using a combination of the Alexa commands and also using the manual buttons.

Hope you enjoyed making my first Instructable. The Alexa Controlled Smart Blinds

First Time Author Contest

This is an entry in the
First Time Author Contest

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions

    None
    jessyratfink

    9 days ago

    This may be the best use of Alexa I've seen so far! Great project :)

    1 reply