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

  1. Hardware Requirements
  2. Setting up Smart Garage
  3. Run the program

Step 2: Hardware Requirements

RaspberryPi

  • 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)

Arduino

  • 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.

  1. At the AWS amazon console, click on Services.
  2. Type IoT Core in the search.
  3. Click on the IoT Core.
  4. Go to Manage > Things and click on Create button
  5. Click on Create a single thing.
  6. Type GarageParking as the name. Leave others as default.
  7. Click on the Next button.
  8. Click on Create certificate button.
  9. Click on Download buttons for the first 4 (certificate for the thing, public key, private key) that are circled in red.
  10. Click on the RSA 2048 bit key: VeriSign Class 3 Public Primary G5 root CA certificate.
  11. Copy the whole text and paste it into a notepad.
  12. Save the file as rootCA.pem.
  13. Organise the files under 1 folder.
  14. Click on the Activate button at the download certificates screen.
  15. The green notification appears upon successful activation. The Activate button has turned into Deactivate button.
  16. Click on the Done button.
  17. The GarageParking Thing appears in Things section.
  18. Click on Secure > Certificates.
  19. Hover over the certificate that you have created and click on the checkbox.
  20. Click on the Actions > Activate.
  21. A successful notification appears upon activation.
  22. Click on Secure > Policies.
  23. Click on the Create button.
  24. Type GarageParkingPolicy as the name, iot:* for the Action, * for the Resource ARN, allow for the effect.
  25. Click on the Create button.
  26. The GarageParking policy appears in the Policies section. Successful notification appears upon successful creation.
  27. Go to Secure > Certificates. Click on the horizontal ellipsis at the certificate.
  28. Click on Attach policy.
  29. Click on the checkbox of GarageParkingPolicy > Attach button.
  30. Successful notification appears upon attachment.
  31. Click on the horizontal ellipsis at the certificate.
  32. Click on Attach thing.
  33. Click on the checkbox of GarageParking > Attach button.
  34. Successful notification appears upon attachment.

Step 4: Setting Up Smart Garage (Part 2)

Install the required libraries

Install virtualenv
$ pip install virtualenv

In the project root folder
$ source virtualenv/env/bin/activate

To deactivate virtualenv
$ deactivate

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

<p>python server.py</p>

We hope u enjoy our tutorial! For more information on how to set up, please download the document!