Project in progress
Smart Garage

Smart Garage © GPL3+

Change the way you operate your garage!

  • 7,910 views
  • 5 comments
  • 28 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

First of all project requires a bit of explanation on my side and the history behind it. Few months ago I faced problem of losing my remote to garage doors. This happened for the second time and I got really frustrated, also one more thing that always annoyed me was the need to pass remote to any family member who would need an access to garage door.

This inspired me to design my own system, I know there are some ready of the shelf solutions but they didn't satisfy me and also it would be to easy😄 My first prototype that is still working is based on ESP connected to relay and HC-SR04, while it's fairly good solution and reliable it has some issues. First of all during doors opening HC sensor gets crazy and gives false readings. Lastly the whole system lacks nice GUI and access from anywhere in the world it's local only (you need to connect to the same WiFi).

Based on this improved version of the system would work following way:

This is when we get to the major problem that affected my project and which didn't allow me to finish it. We need all 4 tasks to run at the same time more or less. Multitasking usually is achieved on MCUs using RTOS, on MKR1000 we don't have direct port of any RTOS at the moment. The only project that seems to be available is FreeRTOS for Arduino Zero but it has some issues and semi bricked my MKR1000. Because I was on holiday when trying to finish my project I ended up stocked in one point without the option to fix MKR1000 (you need JTAG/SWD debugger to flash MKR1000 directly with OpenOCD).

As I discussed it with WLAC people they advised me to upload project in current state as it might be good lesson to other people working on something similar. So if you want to replicate my idea more or less or further develop it lets start from the beginning.

First you need to set up Azure IOT Hub this can be done using following tutorial it's great and it's the same place I started, you need to configure your IOT Hub on Azure and get all necessary keys.

http://mohanp.com/mkr1000-azure-iot-hub-how-to/

http://mohanp.com/complete-reject-abandon-mkr1000-azure-iot-hub-how-to-part2/

After complete setup you can start using code attached in the post some things have comments, some doesn't as it is in early stage. Please be advised that MKR1000 crashed when using this code as it's most likely related to wrong config and some other issues. If you happen to own JTAG/SWD or are using Zero with on board debugger you should be good to go.

To connect HC SR04 please use voltage divider as below as MKR1000 uses 3.3v logic(GPIO pins can be defined in source).

This is current stage of the project and as of today there is no UWA app available as I wouldn't be able to test everything anyway. As soon as I will fix MKR1000 I will work further and update this project.

SSD1306 display is used to display some debug info as well as current time (uses RTC capability of MKR1000).

Code

Current state of codeC/C++
Don't use it unless you have debugger:)
No preview (download only).

Schematics

Flowchart
4 Tasks running on MKR1000
Blank%20flowchart%20 %20new%20page 6
HC SR04 Connection to MKR1000
Hc sr04 tut 2

Comments

Similar projects you might like

The hydroMazing Smart Garden System

Project tutorial by Cory Potter

  • 23,886 views
  • 11 comments
  • 110 respects

Project "Gallon" - Smart Drinking Water Monitoring Platform

Project showcase by DycodeX

  • 17,006 views
  • 7 comments
  • 41 respects

Gestured Controlled Smart Home

Project in progress by Joaquim Silveira

  • 17,495 views
  • 4 comments
  • 33 respects

Smart Home - Smart Rules using ARTIK Cloud & Photon

Project tutorial by Raghavendra Ponuganti

  • 4,019 views
  • 2 comments
  • 13 respects

Smart Thermostat

Project tutorial by Arduino_Genuino

  • 69,289 views
  • 10 comments
  • 83 respects

IoT arduino ESP Garage Door opener (UD)

Project in progress by David Smerkous

  • 11,412 views
  • 6 comments
  • 16 respects
Add projectSign up / Login