Introduction: Blind Opening Alarm Clock
The Blind Opening Alarm Clock was a project that had it's challenges but was entirely worth it. It is created using a Spark Core micro controller, a H-Drive circuit, and a really strong geared motor. Its cheap, simple to use, and pretty easy to make! Essentially this project allows your blinds to open and let the sunlight in to wake you up in the morning instead of waking up to that annoying alarm we all have. Let's begin!
Step 1: What You Will Need
- 1 Geared Motor $32
- 1 H-Drive Circuit (more info later) ~$2
- 1 Spark Core (Or Photon) $20
- 1 Small Bread Board (Or Prototype board) ~ $5
- 1 Hall Effect Sensor / Board (Again More Info Later) ~ $1
Longer Pull Chain for blinds (Get at any blind store) (Varying costs)
Extra Blind Chain Gear (More Info)
12V 1A Power Brick (At least)
USB extender cable & phone charger wall plug ~$8
- 2 Push Buttons ~$2
- 1 RGB Led ~$2
Depends on country and currency. All Currency in this tutorial is CAD.
Step 2: H-Drive Board
The H-Drive board is the board that will control the direction that the geared motor turns. It's a pretty simple circuit that can be easily made yourself. I believe you can buy these online but I just made my own because it's cheaper.
- L293NE Chip
- 2 x 10k Resistors
- 3 x connector of your choice (Like the grey ones on mine)
Step 3: All Things Motor
What you need to do
This whole step will really vary based on what kind of gear you get to grip the chain.
- Create a mount for the whole motor (I used an aluminum L-Bracket)
- Create an adapter to go from the motor to the gear (Optional, i guess you could always just glue it on or something)
- Get a gear that will grip the chain on your blinds (Get at any blinds store that sells spare parts) (Basically the same part that's at the top of the chain)
Step 4: Software! (Spark Core)
So I came into this project probably knowing less than the basics of programming with the spark core so I am not saying that my code is the best, but I can say that it works (That's the most important thing right?). Programming the Spark Core in general is pretty easy, all you really need is the spark web IDE. You can find my code to paste into your own program in the IDE here, just download it and open it with Notepad ++ or something and paste it in. Then just compile it and flash it to your device. The program is written in Arduino Language (.ino) for more info on how to program on the spark core you can look here.
Step 5: More Software! (App) (UPDATED)
The app is used to set the alarm time and its status as well as open or close the blinds manually. I created this app using MIT app Inventor so it's super basic (because I know pretty much nothing when it comes to making apps). You can download the app here, and then upload the .aia file (using the "Projects" drop down menu and selecting "Import Project (.aia) from my computer") to MIT App Inventor were you can then install it on your android device for free using the "Build" drop down menu. This app is only available for android devices because Apple only lets you make apps if you pay $100 a year...
**Make Sure You Replace The Access Token in the app with the access token for your spark core As Well As The Device ID**
**Where Ever it says: "put access token here" or "put device ID here" otherwise it will not talk to your spark core**
Step 6: Hall Effect Sensor
The hall Effect Sensor is pretty straight forward. You can make one yourself or buy them online its your choice. I have a PCB for the hall effect sensor as well. This will be mounted at the top of your window so you know when your blinds should stop going up. Solder telephone wire to the pins so that you can wire it up later (Like in picture).
- OH090U Hall Effect Sensor
- 20 pf Capacitor (Pretty sure this is optional but I put it in anyways)
- 820 ohm resistor
- Small Magnet
Step 7: Mount Everything!
I mounted my project on a piece of thick wood, but you can really use anything as your platform. Just screw everything securely to the base!
- Mounted motor using the L-Bracket like I said earlier
- Mounted Spark Core on a small breadboard that had a Sticky bottom, then I just stuck the breadboard to the wood
- Just screwed the H-Drive into the wood (use a washer to keep the bottom of the board off the wood
- Mount the hall effect sensor at the top of where your blinds will stop (Do this however you want)
- Mount a small magnet on the bottom bar of your blinds so it will trigger the Hall effect sensor (Yes it does matter which way it faces, The south Pole must be facing towards the window)
Step 8: Wiring!
This will probably we the hardest task just because its important, but its pretty straight forward. Basically there are two parts, power connections and I/O connections. Most of the wiring I did was with computer cable and bread boarding wires which are pretty widely available at electronic stores.
- Wire the 12v power brick wires into the mV (Motor Voltage) connector spots on the H-Drive board
- Wire 5v and ground from the spark core to the bV (Board Voltage) connectors
- Wire the motors pins to the connector spots right beside were you wired in the power brick (mV)
- Wire the D2 and D3 pins on the spark core to the far right input pins on the H-Drive, if it doesn't work just fiddle around with the connections (You can't really break anything here)
- wire the cable from the hall effect sensor to the 3.3v pin, ground, and D6 on the spark core
- As for the buttons and RGB led just wire them according to the i/o pin variables set in the code and to ground
int red = A5;
int green = A6;
int blue = A7;
//button input pins
int upBtn = A1;
int downBtn = A0;
Step 9: Case!
I made a cover for the whole device just out of some really thin wood paneling. I cut to slots, one for the chain to go through and also one for the power to come in. Then on the face I made holes to put in the buttons and the RGB led. For an overall idea just look at the pictures. One good idea that I have been wanting to do but haven't done yet would be to get some sound proofing foam and cover the inside of the case with it to reduce the sound coming from the motor.
Step 10: Mount It on the Wall!
Basically just mount it on the wall like you would mount a shelf. Make sure you put a lot of pressure downward on the chain so that the chain doesn't slip as the motor turns. You can also put a piece of foam between the device and the wall to reduce vibration through the wall.
**Make sure when you mount it the blinds for the first time they are either closed all the way or open so that the magnet would be setting off the hall effect sensor**
Step 11: Enjoy!
If you have any questions about the project feel free to ask I will try my best to answer them! This is my first instructable tutorial so I am sure I missed something :)