กลับไปหน้ารวมไฟล์
home-automation-and-internet-of-things-using-arduino-mega-25-ceb4d9-en.md

The project was created to see how I could implement the latest technology for home automation using different components and an Arduino Mega 2560 development board. Also, I wanted to see how I can communicate with some of the devices installed in this project from a distance using an ESP 32 development board, needed to control and monitor some parts of the home using Wi-Fi and an application called Blynk.

This project consists of two parts: first is the part where most of my sensors are controlled by Arduino Mega 2560, and the second part is where I monitor and control other components using ESP32 development board and Blynk app, using Wi-Fi communication.

The components that are connected to Arduino Mega 2560 board are:

  • MQ 5 gas sensor, used to detect gas leakage in the house;
  • Buzzer, to alert us when we there is a gas leakage, a flooding, or a fire inside the house;
  • Water sensor, used to detect any water leakage in the bathroom;
  • Fan or a 5v dc motor, used as a fan to reduce the temperature inside the house;
  • DHT 22 temperature and humidity sensor, used to monitor the temperature and humidity inside the house;
  • Flame sensor, used to detect a fire inside the house;
  • Pir sensor, used to detect movement inside the house;
  • Light sensor, used to detect the level of light inside the house;
  • Led, used to make light inside the house when is dark;
  • 16x2 LCD with i2c interface, used to show some messages;
  • RFID, used to open or close the entrance door, depending on the access level of the user;
  • MG 90 S servo motor, used to open the entrance door, if a valid access card is used near the RFID.

The components that are connected to ESP 32 development board are:

  • DHT 22 temperature and humidity sensor, used to monitor the temperature and humidity inside the house, and to send all that data to Blynk application installed on our phone, to see in real time using Wi-Fi, what the temperature and humidity is inside the house;
  • MG 90 S servo motor, used to open the garage door from the distance with Blynk app;
  • Fan or a 5v dc motor, used to reduce the temperature inside the house at a push of a button using Blynk app.

All the parts required can be bought online from different companies.

Blynk app is free to use for a certain number of devices, here is the link for more information: https://blynk.io/.

Centralized Household Control Hub

This project utilizes the massive I/O capability of the Arduino Mega 2560 to create a unified smart home controller.

  • Blynk IoT Interface: Connected to the internet via an ESP-01 module, the Mega communicates with the Blynk smartphone app. This allows the user to control relays, dim lights, and view sensor data from anywhere in the world.
  • High-Power Relay Bank: Manages up to 8 independent AC channels (Lights, Fan, AC unit) using an opto-isolated relay module, with the Mega's large number of digital pins easily handling the load.

Local Intelligence

  • Offline Ruleset: Even if the internet goes down, the Mega continues to execute local rules (e.g., turning on outdoor lights at a specific time) using an integrated DS3231 RTC.

With the help of Arduino Mega 2560 development board I have build the following applications:

  1. Application to detect a gas leakage, using MQ 5 gas sensor and the buzzer.
  2. Application to detect a flooding in the bathroom, using water sensor module and the buzzer.
  3. Application to maintain a certain temperature inside the house, using DHT 22 sensor and a 5v dc motor.
  4. Application to detect fire inside the house, using infrared sensor (fire sensor module), and a buzzer.
  5. Application to turn on the lights inside the house automatically, if there is movement detected and is dark inside the house, using PIR sensor, and a light sensor.
  6. Application to have access inside the house, using an RFID module, 16 x 2 LCD module with i2c interface and an MG 90 S servo motor.

Using ESP 32 development board I have build the following applications:

  1. Application to see the temperature and humidity on the phone, using DHT 22 sensor and Blynk app;
  2. Application to control the garage door from the phone, using MG 90 S servo motor and Blynk app;
  3. Application to control the fan, in my case 5v dc motor, using 5v dc motor and Blynk app.

Using all these applications any one can build a smart home to make their life better and more comfortable.

Images of the project

fig.1.Front of the house

In the image above there is the RFID access point, above that is a 16 x 2 LCD with blue backlight, a front door and a garage door, both are controlled using MG 90 servo motor.

fig.2. Topview of the sensors

In fig.2 there is a top view of some of the sensors installed in this project.

fig3. RFID and LCD

fig.4 House illuminated at night

fig.5 Blynk app on the phone

In fig.5, you can see the temperature and humidity being measured in real time, receiving data from the DHT 22 sensor, and below there is a button for a fan called “CLIMA” and a slider button for the garage door.

All of the components used with Blynk app help us to monitor and control the house from any place as long as we are connected to the internet.

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Blynk"
author: "IETI_Robert"
category: "Home & Automation"
components:
  - "1x Arduino Mega 2560"
  - "1x Buzzer"
  - "1x Grove - Water Sensor"
  - "1x Jumper wires (generic)"
  - "1x 5 V Power supply"
  - "2x DHT22 Temperature Sensor"
  - "1x RFID reader (generic)"
  - "1x Development Kit Accessory, DC Motor"
  - "1x ESP32"
  - "1x PIR Sensor, 7 m"
  - "1x Gravity: Analog LPG Gas Sensor (MQ5) For Arduino"
  - "1x 1N4001 – High Voltage, High Current Rated Diode"
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x LIGHT sensor"
  - "1x Infrared Module (Generic)"
  - "2x SG90 Micro-servo motor"
  - "1x 9V Power supply"
  - "4x LED (generic)"
  - "4x Resistor 100 ohm"
description: "IOT Home automation"
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX18gm22PV+rlzJHsqGjrHz4amKbkTEj/HVH9vCmnLgcOTiYDtmQuRvyknpvCWvkNEo5jwY5prLGU2g=="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/home-automation-and-internet-of-things-using-arduino-mega-25-ceb4d9_cover.jpg"
lang: "en"
likes: 7
passwordHash: "82975cee48762594109d62657c388c9bf763fb674c23df69ea71dd4e50952d0f"
price: 2450
seoDescription: "Build a Home automation and Internet of Things system using Arduino Mega 25 for your next IOT project."
tags:
  - "home automation"
  - "remote control"
  - "internet of things"
title: "Home automation and Internet of Things using Arduino Mega 25"
tools: []
videoLinks: []
views: 6119