Smart Blinds Controlled by Alexa

2,333

34

3

Introduction: Smart Blinds Controlled by Alexa

About: I'm System Software developer with knowledge for multiple and diverse skills from embedded systems to web development with years of professional experience. My major focus is developing System Software, maki...

Hello ladies and gents,

After years of seeing a lot of instructables i have decided that it was time to make one !

So this is my first instructable about DIY smart blinds from scratch and controlling them either with Alexa (Echo dot) or directly from your mobile or PC.

So let us start.

Step 1: Parts and Preparation

For this DIY project you will need the following parts :

For the mechanical part:

Ball Bearings 8mm x 2

3mm x 4 --------------------bolts you can find them at any local hardware store.

PVC pipe with 36mm of inner tube diameter that also can be found in any local hardware store.

One piece of cloth with dimension of the wideness of the PCV pipe and the length of your window.

For the Hardware:

Node MCU V3 x 1 the "brains" of the operations.

EasyDriver V4.4 x 1.

NEMA 17 Stepper motor or you can use bipolar stepper motors from old printers.

Flexible coupling x 1.

7805 Voltage regulator x 1.

Capacitors 100µF and 10µF.

Power supply of 12v with 3 amps.

In this project i've made some 3d models with TinkerCad for 3d printing used in the Smart Blinds.

Step 2: PCB

Connect all the parts on the protoboard from the schematics accordingly.

Note that the capacitors are connected with the Voltage regulator with the first pin from the Voltage regulator with the positive pin from the 100µ capacitor and the third pin from the Voltage regulator with the positive pin of the 10µ capacitor.

You can make an PCB with the pcb schematics.

I have made the PCB with a CNC that i have made myself.

Note that the NodeMcu v3 is soldered from the bottom of the PCB not on the top like the other parts.

Solder an input of +12v on the first pin of the Voltage regulator and the ground of the 12v input with the second pin of the Voltage regulator.

You can add a switch just by soldering a wire from the positive input of 12v and a wire soldered directly to the first pin of the Voltage Regulator.

Step 3: Assemble 3D Printed Parts and Mechanical Parts Pt.1

Print Left segment motor holder.stl file and add a 8mm ball bearing like the picture.

You need to press the 8mm ball bearing into the circle of the motor holder with a light touch, any excessive force may brake the 3d printed motor holder, so be gentle (That's what she said).

Step 4: Assemble 3D Printed Parts and Mechanical Parts Pt.2

Add the NEMA 17 stepper motor to the other side of the motor holder and add 3mm screws and screw it tightly.

Add the flexible coupling to the shaft of the NEMA 17 stepper motor and screw it tightly but only from the side of the motor the other side will be done after the next part.

Step 5: Assemble 3D Printed Parts and Mechanical Parts Pt.3

3d print the left segment.stl file and add it to the previous step.

So the printed part should go into the other side of the flexible coupling, screw it but not too firmly ( we don't want to brake the 3d printed shaft).

Take the PVC pipe and the two printed connected parts and put them together.

If the connection is loose drill a small hole and add a bolt.

Connect the Nema 17 Stepper Motor as shown in the picture the coils A and A', B and B' are soldered to the wires of the motor:

A -> Black wire.

A'->Green wire.

B->Blue wire.

B'->Red wire.

You can either tape the cloth to the PVC pipe or glue it but be sure it is all squared up or you will end up with a tilted cloth and in the final result you will be angry with the tilted look.

Step 6: Assemble 3D Printed Parts and Mechanical Parts Pt.4

3d print the Parts named right segment.stl and right segment tube.stl files.

Add the 8mm ball bearing to the right segment.stl and like the previous step do this with a light touch.

The 3d printed part named right segment tube.stl connect with the PVC pipe and again if it is a bit loose then you can drill a hole in the PVC pipe and the printed part and connect them with a bolt.

Drill small holes in the frame of the window and screw the parts first the right segment.stl then the left segment motor holder.stl connected with the PVC pipe voilà you are done with the mechanical part.

Step 7: The Precious Code for Control With Alexa

Nassir Malik has a wonderful code that i have used and i did an upgrade for the control of the blinds.

You can check it if you want on this link.

int smDirectionPin = D7; //Direction pin
int smStepPin = D5; //Stepper pin

here you add the Pins of the NodeMcu needed for control of the EasyDriver v4.4

const char* ssid = "********"; // add your network's name
const char* password = "***********"; //and the password

Your router's name and password.

pinMode(smDirectionPin, OUTPUT);
pinMode(smStepPin, OUTPUT);

device_name = "blinds"; // the name of the device in my case it is called blinds

So when you address Alexa you add the name of the device and on or off after it.

void turnOnBlinds() {
// digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH digitalWrite(smDirectionPin, HIGH); //Writes the direction to the EasyDriver DIR pin. (HIGH is clockwise). /*Slowly turns the motor 1600 steps*/ for (int i = 0; i < 1600; i++){ digitalWrite(smStepPin, HIGH); delayMicroseconds(500); digitalWrite(smStepPin, LOW); delayMicroseconds(500); } }

void turnOffBlinds() { //digitalWrite(relayPin, LOW); // turn off relay with voltage LOW digitalWrite(smDirectionPin, LOW); //Writes the direction to the EasyDriver DIR pin. (LOW is counter clockwise). /*Turns the motor fast 1600 steps*/ for (int i = 0; i < 1600; i++){ digitalWrite(smStepPin, HIGH); delayMicroseconds(500); digitalWrite(smStepPin, LOW); delayMicroseconds(500); } }

And two functions to turn the motor clockwise or counter clockwise.

And that's it !!!

Step 8: Test Everything Together and Have Fun

For any questions or suggestions you are more than welcome to write it.

Voice Activated Challenge

Runner Up in the
Voice Activated Challenge

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Water Contest

      Water Contest
    • Fix It! Contest

      Fix It! Contest

    3 Discussions

    Good job