This project was part of the Lane Tech HS Physical Computing Lab course. I created this project as part of the Home Automation / IoT project. It is meant to automate the opening and closing of your garage door. Using a Bluetooth connection from your phone, this project will be able to open and close your garage door when you approach your garage. There is also a web interface that I created that allows you to check the state of your garage from anywhere with an internet connection.
Bluetooth:One essential part of this project is the bluetooth module. You must first, before anything else, verify that your bluetooth module is working and that it is in AT command mode. To do this run the following test code with the following circuit to test AT commands in the Arduino serial monitor.
void setup() {
Serial.begin(9600);
Serial1.begin(38400);
Serial.println("Enter AT commands:");
}
void loop()
{
// Keep reading from HC-05 and send to Arduino Serial Monitor
if (Serial1.available())
Serial.print((char)Serial1.read());
// Keep reading from Arduino Serial Monitor and send to HC-05
if (Serial.available())
Serial1.print((char)Serial.read());
}
To disassemble the garage door opener you may need a credit card or another hard flat surface to wedge it open. Once open remove the circuit board carefully. Then locate the pins behind the button pressed when opening the garage door.
Once the garage door opener circuit has been removed you can begin assembling the final project. First you must solder wires to the pins on the garage door opener that were located in the previous step. Once completed then hook it into the breadboard with a transistor in the following configuration.
I found the project fit perfectly in a 5 inch by 3 inch by 1.5 inch tall box and any box around this size will probably work. With the physical portion of the project done now you can upload the code and connect your phone to the device. To do that you must go to the web interface for the project at https://garagedoorthin.firebaseapp.com. There will have to log into your particle.io account and select your device. From there you will have to navigate to the status page by clicking the status button at the bottom of the home page. If you have not uploaded the code i have provided below you can flash the code from the website by checking the version and using the auto update feature to flash the newest version of the code. Once flashed and your photon is blinking blue, click "Add Closest Phone" to add your device. When pairing the default password is 1234 and can be changed using the "Update Password" button. In order to be able to pair your device you must be in a bluetooth discovery mode for the HC-05 to detect it.
If this feature cannot be found you can probably find an app on the play store that will add this feature. Once you have successfully paired your device you can now select your distance. Test the variable distances on the web interface to find one that suits your houses needs.
Website:https://garagedoorthin.firebaseapp.com
Feedback and Questions:If you have any feedback or questions on my project you can message me and I will look into it.
Comments