This is a machine that will automatically open and close your blinds, based on whether it is light outside (with some caveats; see Step 5: Software). I wanted to build it for two reasons: security and convenience. If you have your lights on timers and your blinds open and close automatically, it can be difficult for potential thieves to tell whether someone is home or not. Also, it's nice that the evening dog-walkers are not staring at me while I type this because I forgot to close the blinds when it got dark today.

I live in the USA, so my parts are sourced mostly from Amazon. I also own a RepRap 3D printer so there are a lot of 3D printed parts. You'll need a printer that can produce small features, because the gears have small teeth.

Step 1: Supplies

If you want to build one of these as-shown, you will require about $60 worth of parts:

1x Arduino Pro Mini 5V https://www.sparkfun.com/products/11113

1x Sunkee light sensor board http://www.amazon.com/gp/product/B00CW82WZY/

1x Zitrades motor driver board http://www.amazon.com/gp/product/B00CW82WZY/

1x tiny motor http://www.amazon.com/gp/product/B00CW82WZY/

2x 607 bearings http://www.amazon.com/gp/product/B00CW82WZY/

1x SPST switch http://www.amazon.com/gp/product/B00CW82WZY/

1x power supply http://www.amazon.com/gp/product/B00CW82WZY/

1x DC power jack http://www.amazon.com/dp/B00CQMGWIO/

1x m7 by 35mm long hex-head bolt (probably from your local hardware store)

A similar switch and DC power jack are much cheaper from somewhere like www.mouser.com, but you'll have to pay shipping. Do a little looking around and you may be able to reduce your cost.

You'll need three screws that you probably have lying around if you're attempting this. Two need to be flat-head wood or sheet metal screws, 3mm to 4mm in diameter and at 15mm to 20mm long. The other is a pan-head wood or sheet metal screw of the same diameter but 20mm to 25mm long.

You'll also need to 3D print the mechanical parts, or order them from Shapeways. I have a RepRap 3D printer with a 0.35mm nozzle, and it just barely did an adequate job on the tiny gear teeth. The STLs are available on GitHub, as is the Arduino sketch that you'll need: https://github.com/drewtm/windowlackey

Obviously, you'll need some wire. I used various kinds; whatever you have available should be fine, as long as it's small enough to fit in the various places it needs to go.

The electronics should suit you no matter what kind of blinds you have, but you may need to design a different gearbox for your blinds. If you happen to design an alternative mechanism, you should put it on GitHub!

Step 2: 3D Printing

The gears and the electronics enclosure are quite small, and you may have a difficult time printing them on, for instance, a Makerbot, with it's 0.5mm nozzle. They are sized for the 0.35mm nozzle on my RepRap, but I would have liked to make them smaller and the gears finer pitch. Perhaps one day I will have a printer that can do finer detail. Again, the source files are here: https://github.com/drewtm/windowlackey

If you are going to 3D print the parts yourself on a RepRap or other fused filament printer, print them in the orientation shown above. However, I don't recommend printing them all at once, because if one part fails it will mess up the others. I used three perimeters and 50% infill with 0.18mm layer height.

If you are going to order the parts from Shapeways, I recommend their 'strong and flexible plastic' material, but I haven't actually tried the Shapeways version. I put these same STL files on Shapeways; they're ready-to-buy if you want, with a ~$10 markup: https://www.shapeways.com/model/2925386/blinds-eye...

Step 3: Mechanical Assembly

A. Press the two 607 bearings into the ends of the bore of the large gear/sprocket.

B. Push the motor rear-first into the front of the anchor bracket and push the small gear onto the motor shaft.

C. Solder wires to the motor on the back side of the bracket. There's no positive or negative because the motor runs both directions. The wires run off to the side through a channel in the back of the anchor bracket.

D. Pre-install an M7 hex head bolt into the anchor bracket, to form threads in the plastic. You may need to heat up the bolt to let it push its way in. You could use a tap, I suppose, but for small screws I prefer formed threads in FDM parts; they are stronger in my experience.

E. Hold the anchor bracket against the wall, put the sprocket through the ball chain, and use the M7 bolt to attach the sprocket to the anchor. Pull the ball chain quite tight and mark your holes on the wall where the anchor will mount.

F. Use the top cover of the electronics enclosure to mark a place on the wall for the controller. The sensor hole on the side should be facing toward the window such that it registers the brightness outside, not the brightness inside.

G. Drill the three pilot holes in the wall.

H. Bend a piece of a coat hanger as shown in the photo to make a guard, so that it fits in the L slots on the back of the anchor bracket. Mine also has a little pocket bent into the wire to hold the other cord that I never use, so it doesn't catch in the gears.

J. Screw the anchor bracket onto the wall, sandwiching the wire guard in its grooves between the bracket and the wall.

K. Optionally, use a paper clip or other small wire to enclose the other pull-cord.

L. Slide/snap the three circuit boards into the bottom part of the electronics case. You'll wire them up in the next step.

M. Put the bolt head cover onto the bolt. Now it looks so pretty.

Appendix: don't forget that you'll need an outlet to plug into.

Step 4: Electronics Assembly

See the wiring diagram and photos for how to connect the three circuit boards, the switch, and the DC power jack. Make sure to include enough length of wire to the switch and the DC power jack in order to get them to convenient locations. The wires should be small enough to fit out of the case beside the motor screw terminals.

Before you hook up the motor driver board, you'll want to de-solder its overly-bright power LED, because that LED drowns out the Arduino's LEDs, especially the green LED that indicates when the blinds are almost ready to move. The offending LED is circled with a red X in the photo. I ended up destroying the LED while trying to remove it with my soldering iron... oh well. Just don't overheat the motor driver board and burn up anything else.

Step 5: Software and Programming

This design is based on a light sensor, and uses the inaccurate timer on an Arduino to help prevent the blinds from opening or closing at strange times--for instance when car headlights hit your window at night, or when the mailman walks by in the morning and casts a shadow. Once the blinds open due to a light trigger, they won't try to open again for 20 hours. Similarly, once they close, they'll wait almost a full day before looking for dusk again. With this mechanism, the blinds stay automatically in-sync with the daylight, regardless of daylight savings time, your latitude, the time of year, the weather, or the accuracy of any clock.

The blinds open and close based on timed motion, where the closing motion lasts slightly longer than the opening motion. This way, even without any position sensor, the blinds are always sure to return to the jammed-closed position, without slowly drifting further open or further shut due to timing inaccuracies, friction changes, etc. You may have to adjust the timing, though, if the friction in your blinds changes.

There is an override switch included in the design. If you close the blinds manually during the day, they'll stay closed until the next morning. The program will still register when dusk happens as usual, but the blinds won't move if they're already there. You can also use the override switch to 'train' the blinds, by closing them when you want them to close, then flipping the switch back the other way before they're done closing. When you do this, it registers as a training event instead of a manual override. After a few times, it should get them pretty close to how you want. (You can train the opening trigger in the same way.)

To program the Arduino Pro Mini, you'll need an FTDI cable like this one: https://www.sparkfun.com/products/9718

The Arduino website has some info on how to program it: http://arduino.cc/en/Guide/ArduinoProMini

If you're unfamiliar with Arduino in general, read around on that site a bit. You'll need to download the Arduino IDE to your computer and use it to open this .ino file: https://github.com/drewtm/windowlackey/blob/master... Then you'll choose the type of board and the serial port (hopefully there will only be one serial port to choose from) and press the 'upload' button.

You may need to customize a few things for your own installation:

#define OPENTIME - Opening drive duration. Set this by trial and error. Luckily it's pretty linear, so you should be able to get it dialed in with only a couple of tries. The number is in milliseconds.

#define CLOSETIME - Closing drive duration. Make this slightly longer than the opening drive duration

word dawnbright - Opening light level. You can use the example sketches in the light sensor library to get some baseline light readings at the times of day you want the blinds to operate, then code those numbers into the sketch. The units on this number should be half-lumens, but that's pretty meaningless to me.

word duskbright - Closing light level. Set in the same way as the opening light level.

Depending on what kind of switch you used, you may need to change the macro #define swON to be defined as (digitalRead(swpin)==HIGH). I have mine set up so that the '1' mark on the switch means blinds open and the '0' mark means blinds closed.

<p>Looks cool, how do you think a small garden light solar panel would go charging this during the day to lower and raise the blinds? That way you could get rid of the power leads.</p>
That would probably work well. I thought about trying it, but didn't want to get into the extra complexity (for now). Also, my window doesn't get any direct sunlight since it faces north. The easiest thing to try is to buy two or three cheap solar garden lights and take the entire power packs out of them (usually all built into the top cap), stick them to the window, and wire them in series to get 6-9V going to the control box.
<p>I just saw this and had to point out that, (especially if solar powered) this would be ideal, and far more than simply convenient for a solar greenhouse in three ways: 1) It would allow you to maximize light for plants that want lots of indirect sun, but hate direct sun. 2) If modified with a temperature sensor and perhaps a more complex program, it could be a zero-cost method of controlling temperature. 3) Upscaled a bit, that last modification could control vents at the roof crest and baseboard to more aggressively control temperature. This could even be used with a thermal chimney (which gets hot in the sun creating an updraft) and subterranean intakes to cool a space to below outdoor ambient. This could work in any structure, even being modified to pull heat from a tromb wall and warm a space after dark! All automated by your design. Well done!</p>
<p>Really a very good project. I'm interested in making one, but my cord has different space between balls, Could you provide the gears CAD files (any format that I can modiffy) in order get the propper spacing?</p><p>Thanks for sharing</p>
<p>I added to the github repository a STEP file of the large gear with no sprocket features. You should be able to import it into your parametric CAD software and cut out a correctly sized sprocket for your ball chain.</p>
Thanks !!!! I'll try to add a parametriced of http://www.thingiverse.com/thing:6663<br><br>Thanks again!
<p>so nice but , can't be this built with a more simple circuitry? maybe a transistor , a ldr, a power trnsistor and some more to make it cheaper ? or with a 555 detecting darkness, another sending pulses to the motor an with a limit switch to stop the motor ? </p>
<p>It could be built with cheaper circuitry if you bought all the components yourself and laid them out on a custom circuit board: The light sensor chip, processor chip, and motor driver chip are only about $4 each from Digikey, and you'd need probably another $10 of miscellaneous resistors, capacitors, etc. However, making your own circuit board at home is difficult, potentially hazardous, and requires some specialized chemicals and equipment, while ordering a custom board is much more expensive than buying some cheap pre-made boards online. It could also be built using an analog light sensor and no microprocessor and would be even still cheaper, but would require a lot of tuning and tweaking to get the trigger values right. A limit switch might also make the system less expensive, but more finicky and less elegant/clean looking. You'll find that there are other Instructables on this site for automated window blinds that are cheaper and messier than mine, and there are off-the-shelf products that are nice and clean and expensive. My version hits a unique balance somewhere in the middle, without giving up the customizable nature of a DIY project.</p>
<p>so nice but , can't be this built with a more simple circuitry? maybe a transistor , a ldr, a power trnsistor and some more to make it cheaper ? or with a 555 detecting darkness, another sending pulses to the motor an with a limit switch to stop the motor ? </p>
<p>Did you lay the gears out yourself?<br>I have 2 projects to make and I have no idea where to start on making the 8 gears. Is there an program or easy way to lay them out? I have a 3d printer available.</p>
<p>I to design some gears for a project i was modifying, I found this article of great help it gave me all the info that I needed. http://makezine.com/2010/06/28/make-your-own-gears/</p>
<p>Yes, I laid them out. Are you looking for information on how gear ratios work, or on how gear teeth are shaped and sized?</p>
<p>No probably an actual designer. I am electronic schematic type person not mechanical drafting and 3d cad.</p><p>I use <a href="http://woodgears.ca/gear_cutting/template.html" rel="nofollow">http://woodgears.ca/gear_cutting/template.html </a>for scroll saw work. But I would like to take these gears, import them into a program, tell a program I want them 1/4 inch thick. I am just starting to learn Tinkercad for the 3d printer. I have used 2d cad for basic layouts only. <br>Maybe a recommendation for something better to use for the Makerbot printer.<br><br>Thank You<br>John T</p>
<p>I draw all of mine from scratch, typically. One possible workflow for a begginer, however, is to use Inkscape with its gear generator tool, export those gears to a DXF file, and import the DXF into OpenSCAD to do the extrusion into a solid gear however thick you want it.</p>
<p>Dear DrewTM,</p><p>really like this use I though also do. But as I do not know how to use arduino board I was first thinking how to really be perfect.</p><p>First of all I though (and need) to use it with solar window power bank :</p><p><a href="http://www.amazon.com/2600mAh-Mounted-Powered-Rechargeable-Devices/dp/B00GCB6APA" rel="nofollow">http://www.amazon.com/2600mAh-Mounted-Powered-Rech...</a></p><p>This will then really be autonomous.</p><p>Secondly could you please tell us how to use it with timer in place of light switch (or both). </p><p>But really need to not have the code concerning the light switch due to the fact there is a street lamp just in front of my house and then there is always light ;-)</p><p>Then I prefer to just use it with timer.</p><p>By hoping you could consider and help us to us it with both Solar window power bank and timer (in place of light switch).</p><p>Sincerely thanks and have a nice day,</p><p>Miguipda ;-)</p>
<p>Your street light may not be as bright as you think, compared to the sunlight; I also have lights on my porch right outside the window, and this works fine. Off-hand, I can't think of a way to do this with a simple timer relay and no Arduino. That USB power pack might work but your motor will be a lot slower at 5V instead of 7.5V. You might be able to open it up and get access to the ~7.2V straight off of the battery</p>
<p>Very well done! Thanks for including all the files. </p><p>I have friends that open and close blinds every day to save on heating/cooling bills. The person in the article below complains about the process - sounds like this would her out.</p><p><a href="http://www.nytimes.com/2014/12/04/garden/was-it-too-soon-to-be-sustainable.html?_r=0" rel="nofollow">http://www.nytimes.com/2014/12/04/garden/was-it-to...</a></p>
I was thinking in something like this to my house. Your instructable give me several ideas ;-) Thanks!
<p>Wow, some really nice work there. 6 months ago we started on a similar project, our goal was to motorize all the blinds in our office, we also later added solar panels for convinience and now we are on crowdfunding https://www.indiegogo.com/projects/rise-turn-your-window-shades-into-smart-shades </p><p>Good luck with your project and check us out on www.theriseapp.com</p>
<p>Your product looks nice, but the price point won't work for me where I live. How much would you be able to drop the price by eliminating the internet stuff? I might be interested if your numbers were USD instead of euros. Maybe that will come with production volume, as well. Good luck!</p>
<p>I love how neat and condensed it is not wonky and not all over the place.</p>
<p>Cool project!! Great use of 3D printed parts, too! =)</p>
When I was a kid I always wanted to do something like this! Very good idea with a very good design.
<p>This is such a great idea! I love this kind of homemade home security stuff. Very nicely done.</p>

About This Instructable




More by DrewTM:Blinds' Eye 
Add instructable to: