Secure Passcode Smartphone-Controlled Garage Door




This is a secure remote garage door opener controlled by your smartphone. It works by connecting to a the switch over bluetooth, which is activated upon entering the correct passcode.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Source an Outlet

Find an outlet near the garage door switch inside your garage. If it is not close enough grab an extension cable since we will be using a smartphone power brick and a printer cable like shown in the photo above to power the Arduino and Servo Motor.

Step 2: Position the Switch

Position the servo motor and the Arduino right next to the switch and secure it with some hot glue and tape combination. Make sure that the positioning of the servo horn is such that it collides with the switch when rotated.

Step 3: Wiring

* Connect the brown pin to GND

* Connect the red pin to 5V

* Connect the Orange pin to pin 9.

Step 4: Code

Change your passcode, mine is 22 but yours could be any number you choose!

#include <CurieBLE.h>
<curieble.h> #include <Servo.h><servo.h>
BLEPeripheral blePeripheral;  // BLE Peripheral Device (the board you're programming)
BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // BLE LED Service</servo.h></curieble.h>
//set BLE characteristic
       BLEUnsignedCharCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);
const int servoPin = 7;
const int passCode = 22;
Servo servo1;
 void setup()
  //attach servo
  // set advertised local name and service UUID:
  blePeripheral.setLocalName("Tech Martian");
  // add service and characteristic:
   // set the initial value for the characeristic:
   // begin advertising BLE service:
   servo1.write (90);
void loop() 
  // listen for BLE peripherals to connect:
 BLECentral central = blePeripheral.central();
 // if a central is connected to peripheral:
  if (central)
   // while the central is still connected to peripheral:
    while (central.connected())
      // if the remote device wrote to the characteristic,
      // use the value to control the LED:
      if (switchCharacteristic.written())
          // any value other than 0, turn on the LED
         if (switchCharacteristic.value() == passCode) 
         servo1.write (90);     
      //else lockout for 5 minutes
        servo1.write (180); 

Step 5: Done!

Enjoy a more secure and convenient to open garage door!

Automation Contest 2017

Participated in the
Automation Contest 2017

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Bluetooth Challenge

Participated in the
Bluetooth Challenge

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest