Introduction: Smart Garage
Hi everyone! This is a smart garage IoT project.
Smart garage has security features such as live streaming, face recognition. Besides that, Smart Garage has a motion sensor to detect cars to allow the garage door to open. Detection of the obstacle is present when the car is reversing which allows safety checks. The distance sensor will track how many distances the car left to reverse backwards. If the car has hit against the wall, shock data will be displayed on the web portal. The web portal has features to allow interaction with facial recognition, remotely control light in the garage, and see the data such as access records, shock data, weight data (the bin that holds the trash) sent by the sensors.
For the completion of face recognition and the rubbish bin that has a weight sensor attached to it. Please refer to the documentation file attached for more detailed steps.
In this tutorial, the setup of the smart garage without the facial recognition and the rubbish bin that has a weight sensor attached to it will be discussed.
We hope you get to learn and enjoy the process!
Without further ado, let's start now.
Step 1: Overview
- Hardware Requirements
- Setting up Smart Garage
- Run the program
Step 2: Hardware Requirements
- RaspberryPi with NoIR Camera Board, MicroSD Card and Casing (1)
- 3 pin Power Adapter (1)
- T-Cobbler set with Breadboard, MCP3008 ADC, Ribbon Cable (1)
- NFC Card Reader (1)
- NFC Card (1)
- Male-Female Jumper Wires (7)
- Male-Male Jumper Wires (14)
- LEDs (3)
- 330 ohms Resistors (3)
- Buzzer (1)
- Button (1)
- 10000 ohms Resistor (1)
- UNO R3 (1)
- USB B Cable (1)
- Breadboard (1)
- Male-Female Jumper Wires (14)
- Male-Male Jumper Wires (8)
- 12C LCD Display (1)
- Pir Motion Sensor (1)
- HC-SR04 Ultrasonic Sensor (1)
- FC-51 Obstacle Avoidance Sensor (1)
- KY-002 Vibration Switch Sensor (1)
Step 3: Setting Up Smart Garage (Part 1)
AWS is required for the setting up of this project. If you do not have an account, please visit aws website to sign up for an account.
- At the AWS amazon console, click on Services.
- Type IoT Core in the search.
- Click on the IoT Core.
- Go to Manage > Things and click on Create button
- Click on Create a single thing.
- Type GarageParking as the name. Leave others as default.
- Click on the Next button.
- Click on Create certificate button.
- Click on Download buttons for the first 4 (certificate for the thing, public key, private key) that are circled in red.
- Click on the RSA 2048 bit key: VeriSign Class 3 Public Primary G5 root CA certificate.
- Copy the whole text and paste it into a notepad.
- Save the file as rootCA.pem.
- Organise the files under 1 folder.
- Click on the Activate button at the download certificates screen.
- The green notification appears upon successful activation. The Activate button has turned into Deactivate button.
- Click on the Done button.
- The GarageParking Thing appears in Things section.
- Click on Secure > Certificates.
- Hover over the certificate that you have created and click on the checkbox.
- Click on the Actions > Activate.
- A successful notification appears upon activation.
- Click on Secure > Policies.
- Click on the Create button.
- Type GarageParkingPolicy as the name, iot:* for the Action, * for the Resource ARN, allow for the effect.
- Click on the Create button.
- The GarageParking policy appears in the Policies section. Successful notification appears upon successful creation.
- Go to Secure > Certificates. Click on the horizontal ellipsis at the certificate.
- Click on Attach policy.
- Click on the checkbox of GarageParkingPolicy > Attach button.
- Successful notification appears upon attachment.
- Click on the horizontal ellipsis at the certificate.
- Click on Attach thing.
- Click on the checkbox of GarageParking > Attach button.
Successful notification appears upon attachment.
Step 4: Setting Up Smart Garage (Part 2)
Install the required libraries
$ pip install virtualenv
In the project root folder
$ source virtualenv/env/bin/activate
To deactivate virtualenv
Install packages required in the project
Remember to activate virtualenv before doing this pip install -r requirements.txt
Update requirements.txt (aka package.json cuz they don't do it for you)
If you have added a new package, remember to update the requirements.txt Remember to activate virtualenv before doing this $ pip > freeze requirements.txt
Step 5: Setting Up Smart Garage (Part 3)
To run the app
We hope u enjoy our tutorial! For more information on how to set up, please download the document!
4 years ago
Awesome. One step closer to a completely smart house.