-
Alarm-activated curtains!
08/21/2016 at 20:34 • 0 commentsAfter a night of troubleshooting, I finally got the stretch goal of my project working. Now, when my alarm goes off, my curtain will automatically open!
Check it out in action:
When the alarm goes off, Sleep as Android uses the Maker channel of IFTTT to send a status to an Adafruit IO feed. The ESP8266 checks this feed, and if it sees an alarm status, it will trigger a digital output which is read by an Arduino. This Arduino then begins the process of operating the servo to open the curtain.
Documentation is coming soon!
-
Servo Motor Success!
08/20/2016 at 22:29 • 0 commentsAfter getting the servo up and running and getting the spool attached, I zip-tied it to my curtain rod and tied the other end of the string to my curtain.
It's hard to tell what's going on in the photo, but the video makes it a bit clearer:
The servo turns, rotating the spool which pulls in the string which is tied to the end of the curtain. After the curtain is drawn in, I then retract the string by rotating the motor in the opposite direction.
However, without any tension on the string it would just bunch up and get all tangled. So I added a bunch of washers along the string to keep tension on the string and allow it to be fully unspooled and ready to be closed in the evening.
So far, the setup is working well! I modified the code to be time-based. I played with the times such that it opens the curtain, and when it retracts the string, the spool is in about the same position as when it started.
You can see the version of the code I used here: https://github.com/jerwil/Automated_Curtains/blob/9ef1e2785eba0738966c18f9046a9eb7b6032e48/Automated_Curtains.ino
If I have time I hope to make this more sophisticated with feedback-based control. For now, I'll be testing out the time-based control to note any drift.
Next step is to be able to set a time so that the curtains automatically open when my alarm goes off!
-
Servo Motor Setup
08/20/2016 at 22:04 • 0 commentsAfter trying out a weak DC motor to no avail, I rigged up a continuous drive servo motor to try to open a curtain.
I started off by supergluing an old curtain rod holder to a servo. This guides the string onto the spool and makes for much smoother operation. Below you can see the gluing process and the first test of the Servo motor with the spool:
I wrote some basic Arduino code to turn the servo forwards/backwards using two buttons. You can check out the commit here: https://github.com/jerwil/Automated_Curtains/commit/0a2c84b8c485c43f2e53a2dcb1959fb2c830cd2b
-
Initial test - DC motor
08/20/2016 at 21:51 • 0 commentsThis was my first time controlling a motor using Arduino! As the "Hello World" for this project, I used a motor control shield to move a DC motor forwards and backwards.
This motor is actually from a robot platform kit, and thus includes some plastic wheels. I re-purposed this as a spool which will be used to pull in the curtain using a string. I drilled a couple holes in the wheel and tied the string to it.
I then mounted the DC motor to my curtain rod and tied the other end of the string to my curtain.
Unfortunately I didn't get many good images of this setup as it failed: the motor just wasn't strong enough to pull the curtain along!
Thankfully I had ordered a couple of high-torque continuous rotation servos, and they just arrived a couple days after trying out the DC motor! So onto attempt #2...