Click here to Skip to main content
13,249,087 members (42,571 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

4.1K views
3 bookmarked
Posted 19 Jun 2016

Using Google Voice to Control my Garage Door

, 19 Jun 2016
Rate this:
Please Sign up or sign in to vote.
How I used Google voice to control my garage door

Over my break, I decided to start getting into IoT by making my home smarter. I did not want to purchase any of the plug and play devices. The fun part is building these devices. My first idea of home automation is the garage door, since I had all the parts needed to automate it in my junk box.

Parts

  • Garage door with remote or switch
  • Breadboard
  • Microcontroller
  • ESP8266
  • 2 resistors
  • Transistor
  • Wires
  • Screwdriver
  • Solder and soldering iron (optional)

The Hardware

Screenshot

The easiest way to open a garage door is to push the button on the remote. That would be a good starting point for my device.

First, I opened the remote with a screwdriver. On the PCB, I saw the switch that is pushed when I pushed the button. The switch had four pins. To figure out which pins will open the door, I used a small wire to short every two pins until the door opened.

Now that we know the pins that need to be connected to open the garage door, we want to be able to control it using a digital signal. That's where the transistor comes in. I did not have any MOSFETs in my junk box, so I had to settle with an NPN bipolar transistor and a resistor.

We connect the transistor's collector and emitter to the pins of the switch and connect the base to a digital output pin on the microcontroller (with a resistor). I used a Teensy 3.2 microcontroller since it's small and inexpensive.

Finally, we connect the ESP8266 to the microcontroller to be able to use Wifi.

Screenshot

The Software

The code on the Teensy is pretty straightforward. All it does is start an HTTP server that has a single route (/toggledoor). When a client hits this route, the microcontroller sends a HIGH signal to the transistor for 500ms. This emulates a button press and causes the door to open.

I did not have to write any code on my phone. I used two apps to control the door. The first app is AutoVoice. This app captures whatever I say to Google Now. It has many features for filtering commands and responding to them. I used another amazing app called Tasker to send the HTTP request to my microcontroller. Tasker works with AutoVoice to trigger an action when AutoVoice recognizes a command.

This is all it takes to control a garage door using Google Voice. The next step is to see if I can program the ESP8266 to do all of that without using another microcontroller. This can drop the cost of this hack to $10.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author


You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionWhere is some example code? Pin
KarstenK14-Jul-16 2:42
memberKarstenK14-Jul-16 2:42 
Answergreat guide Pin
Alize Camp29-Jun-16 7:23
professionalAlize Camp29-Jun-16 7:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171114.1 | Last Updated 20 Jun 2016
Article Copyright 2016 by Saleh Hamadeh
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid