Introduction: Open Garage With App

In this Instructable you will learn how to build an electronic circuit to control your garage gate. You can then easily manage the gates from your smartphone. The parts required will cost somewhere around 100 €.

Step 1: Gather the Parts

You will need

- Garage Gates that already open with electricity

- Arduino Ethernet (https://www.arduino.cc/en/Main/ArduinoBoardEthernet)

- A Power supply for the Arduino

- LAN Cables

- A Programmer (this Tutorial uses mySmartUSB Light from www.conrad.de/de/usb-programmer-myavr-mysmartusb-...

- Relays

- A Linux or macOS computer to burn the Program

- Optional SD Card with FAT32 formatting for individual configuration

- The Receiver Software running on the Arduino Ethernet (Can be purchased here)

Step 2: Download the FREE App for Android or IOS

On iOS

Get it from the App Store.

On Android

You can get this App on Google Play.

Step 3: Burn the Program to Your Arduino

You will need a Linux or macOS System with the command line program avrdude installed. On Linux it should be installed with the Arduino IDE.

Burn the program. Please remember, you can purchase the program here.

avrdude -p m328p -P /dev/ttyUSB0 -c STK500v2 -U flash:w:garage.hex

Replace /dev/ttyUSB0 with the port your programmer is connected to.

If everything's works your output should look like in the image.

Step 4: Wiring It All Up

The LEDs shown in the image are just a representation of how to wire up the relays for the garage gate.

Pin <-> Gate Mapping

Arduino Ethernet Pin 5 = Gate 1

Arduino Ethernet Pin 6 = Gate 2

Arduino Ethernet Pin 7 = Gate 3

Arduino Ethernet Pin 8 = Gate 4

You need to use a relays because the Arduino Ports don't provide enough currency to activate a gate. If you tap on a button on the App one of those pins will provide currency for 1second.

Step 5: Configure Arduino Using SD Card

If you don't use a SD Card to store configuration on. The Program will use this default values:

MAC 90:A2:DA:AA:AA:AA
IP 192.168.178.100
TOK 090e9ac11efd989896954c1f2b6a43ce

If you're using a SD Card with FAT32 formatting (FAT16 might also work) you can place a file called config.txt on the root of the filesystem. The used text encoding is ASCII and the file MUST have the following format.

MAC 90:A2:DA:AA:AA:AA
IP 192.168.178.100
TOK 090e9ac11efd989896954c1f2b6a43ce

Please note, the line breaks MUST be linux LN breaks ( \n ). The last line MUST NOT include a new line character at the end of the line.

You can see an example of the text with whitespace displayed in the Image.

Step 6: Accessing From You Own Programs

If you want to write your own programs that will operate garage gates, you can do that by using the API.

To Toggle a gate juste send a HTTP GET Request like this

curl "http://192.168.178.100/?q=1&tok=090e9ac11efd989896954c1f2b6a43ce"

The parameter q is used to identify the gate number. The value can be 1, 2, 3 or 4.

The tok parameter used to authenticate. It is whatever value you set during the configuration.