Introduction: Automate Your Garage Opening Times
My 1st project with Apduino Online was about to solve a simple problem, close the garage door after sunset, when it has been left open.
We have a garage in the basement, which is used not only for car parking, but gardening tools and machines, bicycles, etc are stored there plus there is a workplace. Since there is only one entry into the basement via garage door, normally we leave it open for daily hours and close only in the evening. But sometimes we simple forget to close it and remains open for a night long and giving the chance for un-wanted visitors.
Close the garage door after 8PM, if it has been left open.
However the high level scope is very simple, but there shall be some sdditional logic taken into account.
a). When I'm opening the door after 8PM it must be ensured that it won't be closed automatically in few seconds, there shall be some time given (e.g. 15 minutes), until I surely parked and left the place. Of course in the morning the logic shall not close the door automatically anymore, only between 8PM and 6AM.
2. The door opener box is having an input which is working in the following way. When the button on the wall switch is pressed the motor starts to move the door into opposite direction as it was moving last time, so if the door was open then after pressing the button it will move to close. Additionally when the button is pressed during the door is moving then it stops immediately. It means, using this interface of door opener, the logic shouldn't know, how door was moved last time. It must only find the position "CLOSED".
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials
- Arduino MEGA, ATmega2560 + Ethernet Shield
- 12V power supply
- micro SD card for ATmega2560
- 5V relay switch
- magnetic switch
- internet connection
Step 2: Drawing
Here is a simple drawing about the solution and cabling.
Step 3: Rules to Be Created in Apduino Online
I have created some rules via Apduino Online and uploaded onto the device.
You shouldn't have to be a programmer to do this staff, the way to do the logic controlling the sensor (magnetic swith) and control the actuator (relay) is very simple.
Please visit www.apduino.com for details and descriptions.
If you stucked for awhile, visit http://forums.apduino.org
In attached text file you'll find the detailed descriptions about the rules I've created.
Step 4: After 0.99 Upgrade
I have upgraded my Arduino with flash "apduino-node-0.99.20130830120537".
After the flash Apduino Online upgraded the logic automatically with new hierarchy (using Conditions, Actions and Jobs).
Attached the new logic description, created by Apduino Online based on legacy configuration.
Step 5: Optimized Configuration With Latest 0.99 Apduino Release
Since 0.99 release has a lot of new functionality I optimized and simplified the logic.
With the new logic I could save a lot of memory too, before ramfree was 3166, now after the optimization ramfree=3314.
Description of optimized logic is attached.