GithubHelp home page GithubHelp logo

xa6ep / automated_curtains Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jerwil/automated_curtains

0.0 2.0 0.0 62.66 MB

A system to automatically open curtains when an alarm time passes

Arduino 100.00%

automated_curtains's Introduction

Alarm-Activated Automated Curtains

A system to automatically open the curtains when my cell phone alarm goes off

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Opening_GIF.gif)

##Features

  • Uses inexpensive off-the-shelf parts to open curtain
  • Seamlessly works with alarm app I already use
  • Automatically retracts cord to allow curtains to be closed

##Architecture

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Comms%20Flowchart.png)

My alarm clock app, Sleep as Android, has the ability to interface with IFTTT. This is an awesome system that takes care of API calls for you and talks to hundreds of different services.

Sleep as Android >>> Adafruit IO

When the alarm goes off, Sleep as Android sends "alarm_alert_start" to a Maker channel feed. Using the Sleep as Android documentation, I created an IFTTT recipe that looks for this message, and writes a "1" to an Adafruit IO feed. When the alarm is disabled, "alarm_alert_dismiss" is sent, and a "0" is written to the data feed.

Adafruit IO >>> ESP8266

On the hardware side, I have an ESP8266 checking the Adafruit IO feed. I followed the basics of the Adafruit guide to get set up. When the feed returns a "1" the alarm is sounding, and the ESP8266 then lets the Arduino know it's time to open the curtain.

ESP8266 >>> Arduino

The connection between the ESP8266 and Arduino is very basic, just an on/off digital signal. When it's time to open the curtain, the ESP8266 writes a HIGH value on the digital line connecting the two microcontrollers.

Arduino Code

When the digital input is HIGH, the Arduino operates the servo to open the curtain, pauses, and then retracts the cord so that the curtain can be closed in the evening. The Arduino also has two buttons attached to it that allow the servo to be manually moved in either direction. These buttons also interrupt the automated open/close operation in case anything unexpected occurs.

The Arduino code also has a timeout (2 hours for now) during which no other alarm events will trigger the curtain opening. This avoids snoozing triggering the curtain multiple times in one morning.

Wiring

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Breadboard%20Labeled.jpg)

See the included Fritzing diagram (.fzz file) for details. Thanks to ydonnelly for the ESP8266 Fritzing part!

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Breadboad.jpg)

Hardware

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Servo%20Mounted.jpg)

The servo is mounted on the curtain rod, and has an old plastic wheel as a spool. As the servo turns, the spool reels in the string. The string is attached to the end of the curtain, so as it is pulled onto the spool, the curtain is dragged open.

![] (https://github.com/jerwil/Automated_Curtains/raw/master/Media/Progress%20Photos/Servo%20Washers.jpg)

The string has a bunch of washers along it such that there is tension when it unspools. The software will automatically unspool the string a few seconds after the curtain is dragged in so that the curtain can be later closed.

Links

Youtube video

Hackaday.io Project Page

License

Creative Commons License
Automated Curtains by Jeremy Wilson is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

automated_curtains's People

Contributors

jerwil avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.