---
title: "Smart Homes (IOT Based With MQTT)"
url: "https://maker.wiznet.io/mayuri/projects/smart-homes-iot-based-with-mqtt/"
markdown_url: "https://maker.wiznet.io/mayuri/projects/smart-homes-iot-based-with-mqtt/md"
type: "UCC: User Created Content"
author: "Chandra_Sekar"
author_url: "https://www.instructables.com/Smart-Homes-IOT-Based-With-MQTT/"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Chandra_Sekar"
original_url: "https://www.instructables.com/Smart-Homes-IOT-Based-With-MQTT/"
published: "2023-01-02"
language: "en"
hardware: ["Arduino Ethernet Shield"]
likes: 3
views: 806
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Smart Homes (IOT Based With MQTT)

> The first objective of this project is to automate homes using minimal energy.

Original author: Chandra_Sekar (source: https://www.instructables.com/Smart-Homes-IOT-Based-With-MQTT/)

## Components

- **Arduino Ethernet Shield** x 1 ([docs](https://docs.arduino.cc/retired/shields/arduino-ethernet-shield-without-poe-module))

## Article

**Arduino Uno:**

Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. **Here the Arduino Uno is to interface with sensors and ATMEL microcontroller.Ethernet Shield:**

The Arduino Ethernet Shield connects your Arduino to the internet in mere minutes. Just plug this module onto your Arduino Board, connect it to your network with an RJ45 cable (not included) and follow a few simple steps to start controlling your world through the internet.** Here the Ethernet Shield is uses to establish internet connection between our sensors and APP.Motion Detector Sensor:**

A motion detector is a device that detects moving objects, particularly people. Such a device is often integrated as a component of a system that automatically performs a task or alerts a user of motion in an area. **Here also used to detect the motion of your movement and switches the light and fan ON. Also used for intruder alert, in case pets like cats and dogs that grows in your home it won’t detect them while the intruder alert is ON.Flame Sensor:**

A flame detector is a sensor designed to detect and respond to the presence of a flame or fire. Responses to a detected flame depend on the installation, but can include sounding an alarm, deactivating a fuel line (such as a propane or a natural gas line), and activating a fire suppression system. A flame detector can often respond faster and more accurately than a smoke or heat detector due to the mechanisms it uses to detect the flame. **Here also used to detect the fire gives alert to your phone, E-mail and also the fire station.LDR:**

A LDR (or photoresistor) is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity; in other words, it exhibits photoconductivity. **Here the fan and light depending on the intensity of the light inside the room.Relay module:**

A relay is an electrically operated switch. Many relays use an electromagnet to mechanically operate a switch, but other operating principles are also used, such as solid-state relays. Relays are used where it is necessary to control a circuit by a separate low-power signal, or where several circuits must be controlled by one signal. **Here used as an electrically operated switch.Solenoid lock:**

Solenoids are basically electromagnets: they are made of a big coil of copper wire with an armature (a slug of metal) in the middle. When the coil is energized, the slug is pulled into the centre of the coil. This makes the solenoid able to pull from one end. **Here the solenoid is used for lock and unlock door.**

![](https://maker.wiznet.io/upload/ckeditor5/277542030%5F1672678782%2Epng)

---

Source: https://maker.wiznet.io/mayuri/projects/smart-homes-iot-based-with-mqtt/
