Coder Social home page Coder Social logo

parikshitpagare / smart-home-automation-rtos Goto Github PK

View Code? Open in Web Editor NEW
68.0 3.0 8.0 4.42 MB

A complete home automation system developed on ESP32 microcontroller using freeRTOS. The system is controlled wirelessly via Bluetooth with an android app developed using MIT App Inventor.

License: MIT License

C++ 100.00%
bluetooth buzzer dht11 esp32 freertos ldr-sensor mit-app-inventor mq2-sensor oled-display-ssd1306 relays

smart-home-automation-rtos's Introduction

Home automation system developed on ESP32 microcontroller using freeRTOS with smart features. The entire system is controlled wirelessly via Bluetooth with a dedicated Android app.

 

Recognition

About 'Smart Home Automation'

When we think of home automation we generally visualize switching on/off some buttons, temperature monitoring, etc.

It is not smart automation in true sense

  • To achieve true home automation Real Time Operating System (RTOS) is integrated in the system which can perform multiple things simultaneously.
  • The system is smart enough to automatically trigger actions based on certain events happening in real time.

Demo

Complete Version

Short Version

Features

  • Wireless control with Bluetooth
  • Dedicated Android app
  • Activity monitoring on OLED display and app
  • Temperature sensing using DHT11 sensor
  • Light intensity sensing using LDR
  • Fan/Light control in 3 modes - manual, automatic (based on sensors) and off
  • Person detection at door using ultrasonic sensor
  • Touch detection on door with alarm using ESP32 inbuilt touch sensor
  • Smoke detection with alarm using MQ2 sensor

Hardware

System Overview

  • The entire system is custom made with wiring and placements planned according to requirements.
  • It is developed to resemble a room in a house.

Requirements

  • ESP32 Microcontroller
  • DHT11 Temperature and Humidity sensor
  • LDR module
  • MQ2 Gas/Smoke Sensor
  • Ultrasonic Sensor
  • OLED display
  • Relay
  • Buzzers
  • Leds
  • Bulb
  • DC fan

Schematic

Components can be assembled and connected as shown in the schematic.

Software

To program the microcontroller Arduino IDE is used which is compatible with ESP32.

How to connect ESP32 with Arduino IDE?

Libraries

Certain libraries are required for proper functioning of the microcontroller and interfaced components.

Real Time Operating System

  • Another important software required is freeRTOS which is responsible for real time functioning of components present in the system.
  • ESP32 supports freeRTOS out of the box in Arduino IDE with its own flavour on the top of original for proper integration.

Android App

The Android app is developed on MIT App Inventor platform.

Working

Connecting to App

  • Connect/Disconnect button is provided in the app to connect with the system via Bluetooth.
  • There is no external bluetooth module used as the ESP32 microcontroller has one builtin.

Activity Monitoring

  • All the sensor activity and switch controls are monitored on OLED display that is interfaced using I2C communication protocol.
  • The same is monitored on the android app.

Temperature and Light Sensing

  • DHT11 digital sensor is used to sense temperature in the room and it is monitored on App/OLED.
  • Light intensity in the room is sensed using a LDR (Light Dependent Resistor) module. This is used for automatic switching of bulb as explained later.

Safety System

  • For safety purpose, a smoke detection unit is implemented with MQ2 sensor which activates a buzzer and Led in presence of smoke.
  • The buzzer turns off automatically once the smoke disappears.

Security System

A security system is implemented on the door using Ultrasonic and Touch sensors.

Person Detection

  • If a person comes in the range of ultrasonic sensor mounted on the door, the App/OLED displays presence of the person and Led turns on to notify the same.

Touch Detection

  • If a person touches the door handle a buzzer is activated and App/OLED displays presence of touch along with an Led indicator.
  • It can be deactivated by pressing the turn off button on app.
  • Touch sensing is implemented using ESP32 inbuilt touch sensor.

Fan/Light Control

The fan/bulb is operated in 3 modes using relays,

Manual Mode

  • Buttons on the App are used to manually switch on/off the bulb and fan.

Automatic Mode

  • Automated switching of fan and light based on temperature monitored by DHT11 sensor and light intensity measured by LDR (Light Dependent Resistor) respectively is implemented.
  • The fan automatically turns on when the temperature crosses threshold value of 33°C and turns off when it falls below the threshold.
  • Based on the lighting conditions in the room sensed by LDR, the bulb turns on automatically when light intensity falls below certain threshold and vice versa.

Off Mode

  • Everything can be switched off at once with one button on the app when leaving the room.

Creator

Parikshit Pagare

smart-home-automation-rtos's People

Contributors

parikshitpagare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.