Arduino Motorized Window Blinds

13K734

Intro: Arduino Motorized Window Blinds

Hey everyone,
Here with a quick and easy instructable for those of you who want to motorize your window blinds! I have seen other people post motorized blinds on instructables and all over the internet but I feel as though i chose a less expensive, easier alternative to accomplishing the same task. I say less expensive because i chose a simple VCR motor to power my blinds instead of (what I've commonly seen) power drills modified to spin the blinds rod. The Arduino and motorshield i used for this project could end up being expensive if you do not have one already, but luckily they are pretty inexpensive online. Hopefully this will help you (or maybe inspire) to build something similar in your house!



The parts list for this is pretty short, here goes:
-Arduino
-Motor Shield (an h-bridge would probably work just as well)
-some buttons (with pull-down resistors)
-VCR motor, or whatever you have laying around that's kinda strong
-Ratchet socket which fits your window blind rod

and my favorite tools, soldering iron and hot glue.

I wont bore you with the details, however a lot of what made this project work was the smaller of the details which ill mention up front.
-WD40 inside the window blind's gears to help loosen it up
-placement of the motor so as to allow free movement
-external power for the motor shield (i use a 12volt laptop charger), don't fry your motorshield but the motor does needs some amps to get the window blinds' rod spinning
-make sure your motor is secured tightly to wherever your attaching it
-last one, i used ribbon/string tied loosely around the window blind rod to keep the rod from jumping around

The Build:
Very simple! After you found a way to attach the ratchet socket to your motor (i used super glue) test it with your arduino/motor shield to make sure it can get the job done. Make sure to have a strong power source for the motor shield to successfully turn the blind's rod enough to open and close the blinds (obviously). I got impatient and just used hot glue on the motor and stuck it against the wood trim of my window, actually doesn't look too bad and function triumphs appearance. If you have the materials to make a bracket for the motor and make it look nicer, do it up!

At first i gave my Arduino some simple test code to run the motor forward and backward but buttons were something that was a must for this project.

if you need help wiring up buttons to your arduino i strongly suggest the Arduino tutorials.

Once you have everything connected all you have to do is run some code into your arduino. Below is the code i used for my build. Each button press simply steps the motor a little bit in each direction, short pulses seem to be stronger and therefore turns the rod better. A ton of improvements can be made to the code, but this is all i need.

The Code:
--------------------------------------------------------
#include <AFMotor.h>

AF_DCMotor motor4(4, MOTOR12_8KHZ);
//motor4 is just where i placed my motor on
//8KHZ runs smooth for me

const int buttonPin1 = 14; //button 1 on analog pin 0
const int buttonPin2 = 15; //button 2 on analog pin 1

int buttonState1 = 0;
int buttonState2 = 0;

void setup() {
  Serial.begin(9600);      
  Serial.println("Welcome to your new blinds!");

  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  motor4.setSpeed(255);
}

void loop() {

  buttonState1 = digitalRead(buttonPin1);
  buttonState2 = digitalRead(buttonPin2);

  if (buttonState1 == HIGH){
  motor4.run(FORWARD);
  delay(100);
  motor4.run(RELEASE);
  Serial.print("forward");
  delay(500);
  }

  if (buttonState2 == HIGH){
  motor4.run(BACKWARD);
  delay(100);
  motor4.run(RELEASE);
  Serial.print("backward");
  delay(500);
  }

  delay(10);
}

--------------------------------------------------------
very simple, I hope you think so too!

Library for AFMotor.h here. Don't forget to change wprogram.h to arduino.h

4 Comments

Hi, This is awesome.

Is there a way to make it remote controlled?

Nice 'ible. I've wanted to do something like this but my blinds do not contain any protection from being over-closed or over-opened and can be broken if over-opened or over-closed so I didn't want to hook up anything that didn't address this problem in some way. One way would be to have a motor that would stall before the blind breaking point. Another possible solution would be to somehow sense the fully-opened and fully-closed state then stop (preferably electrically so the motor still stops if the arduino loses it brains). Did you have any issue with open-opening or over-closing?
Best Wishes.

not knowing yr blinds it is difficult to say how to solve it but perhaps you could install a mini switch that is triggered by a notch on yr spindle, which i admtt is hard if you need several turns for closing.
another possibility is to loop the powersupplywire to the motor through a ferrite ring and with another loop measure if the current to the motor is changing. This happens if motors meet a resistance.

Dealextreme I think has some ready made bricks for cheap that can do that

**************** email sent May 3, 2013. 6:23 PM ****************
Hey maewert, thanks for the great question, i hope i can answer it for you! My blinds don't seem to have issues with over-turning in either direction, it just stops the motor completely when at its max. I did however stick with "steps" when triggering the motor to spin, so i wouldn't spin in the wrong direction and possibly burn out the motor. You could (possibly?) burn out the motor manually by pressing the wrong button too many times. My friends and family however, seem to realize they're pressing the wrong button and try the other one.

For your situation, yeah I would go with either one of your solutions. The blinds really stress the motor (at least mine) so by slowing the motor down, it would just fail to turn. I believe i've read something in the past about using potentiometers along with dc motors to feedback position. A stepper motor would most likely be much more suitable for precise positional control as well as simpler to set-up than the pot. dc-motor control. Another possible solution is incorporate steps with button presses and limit the amount of button presses for each direction.

I hope this helps, or at least sparks some ideas for you. Thanks for your interest in my project!