For this project, general experience (nothing too fancy) with electronics, wiring, knowing what a diode is, etc. is recommended. Similarly, a surface knowledge of how to use an Arduino should be sufficient. The main requirement for the DIY-er embarking on this project is a great deal of patience and love for troubleshooting. If everything goes right on the first try, you probably aren't solving an interesting problem.
Cost: ~$35 (not including 3D printer... but we'll get to that)
Step 1: Materials
-Computer to tell Arduino what to do
-L298N (Full-bridge motor driver) [There are simpler alternatives, but this is what was available to me]
-4 fast recovery diodes (I used 1N4148)
-lots and lots of wires
-a 12V DC power supply (anything providing over 7V will suffice)
-a DC motor
-a ball chain pulley (I 3D printed this part using wulfdesign's design http://www.thingiverse.com/thing:6663)
As you can see, there is some flexibility in what you use. Creativity is a beautiful thing.
Step 2: Philosophy of the Setup
Step 3: The Circuit
-Since our L298N actually has more components than we need, we will not be using all of the chip's pins.
-Pin 4 receives the supply voltage for our motor: you might want to dial this down from the recommended 12 Volts (my motor spins pretty darn fast at 12V) so you have a little bit of precise control over your blinds.
-Between pin 15 and ground, the datasheet recommends you put a "sense resistor" to limit the current through the motor. In my case, however, limiting current wasn't an issue, so you're fine directly wiring pin 15 to ground.
-Pin 8 is connected directly to ground.
-Pin 9 is connected to Vss, the supply voltage for the component's logic. Give this pin 5V (you can do this with your Arduino). The capacitor is unnecessary for our purposes.
-Pins 13 and 14 are the bridge's outputs; these pins go, with the helps of our diodes, to our motor's inputs.
The logic of this circuit deserves special attention. Pins 10, 11, and 12 dictate what goes on with the motor. That information is contained in the table on this page. High and low refer to TTL outputs. We'll send 5V from our Arduino to mean high and 0V from our Arduino to mean low. All grounds in the circuit should thus be connected.
Step 4: An Alternative
Step 5: Mechanical Considerations
The pulley itself is one of the more wonky elements of my prototype; it sits pretty far from level on the motor and makes ball chain slippage a serious concern. Given more time, the first improvement I would make would be to print a pulley better suited to my particular setup. Similarly, mounting the motor itself is a pretty relevant issue. I used stacks of textbooks and duct tape. There are clearly better options than this, but all of those would have involved me receiving some sort of fine for doing unholy things to my dorm room.
The video shows some of the slippage in action.
Step 6: Routines (or: Where the Fun Begins)
boolean left = false;
boolean right = false;
left = true;
right = true;
I'd like to eventually get my mounting/mechanical issues sorted out enough to record a time-lapse video of this program running throughout the day. If I ever get that to work, I'll probably put that video right here.
Step 7: Congratulations!
-Alarm clock mode: it's nice to wake up to the sun.
-Lockdown mode: add a physical button which immediately closes your blinds.
-S.O.S. mode: flash the letters "SOS" in morse code, for the dramatic DIY-ers out there.
-Haunted house mode: randomized periodic motion to convice your guests of the presence of ghosts.
Alternatively, I've always wondered about using the bidirectional DC motor control to constitute a primitive seismograph (using a physical pencil).
That's it! Go forth and prosper.