Main Process

As part of this IoT project, the main board is the Raspberry Pi 4. This is a overkill for the purpose that it is being used for, but if we want to extend the functionality, then the extra compute power can be useful.

The components used for this project are as follows:

  • Raspberry Pi 4

  • Power supply and SD card for RPi

  • DHT11 - Temperature and Moisture Sensor

  • LCD Display

  • MQ-2 Gas leak detection sensor

  • LIDAR sensor

Process

  • Firstly, Raspberry Pi is setup with Raspbian OS Lite which is a server version of the Raspbian OS (based on Debian)

  • After the raspberry pi has the OS up and running, the updates and upgrades of the packages is done

  • The packages needed for the sensors are installed in the raspberry pi

  • Then the sensors are connected to the Raspberry Pi using the GPIO pins

  • Now the values from the GPIO pins can be read using raspberry pi (using python script)

  • After we conform that the sensors are working fine and are returning data, we can write a python script to automate the processes

  • To control the appliances in the house, we can use a relay module connected to the Raspberry Pi

  • Once all the sensors and relay modules are setup with raspberry pi, we can automate the process by setting the thresholds and turning on and off the devices when a certain sensor value crosses the needed threshold.

  • By doing this automation scripting using python and testing the output, the basic home automation script is ready.

  • As discussed in the “Introduction section“, there are many more things we can do with this project.

  • Also, the Raspberry Pi can be configured with AWS CLI and can be used to send the data to a cloud AWS RDS, from which we can process it further to get the pattern of how the values are, when the humidity is dropping below 15%, etc. so that we can understand the patterns and also run the automation based on the patterns.

Updated on