0% found this document useful (0 votes)
69 views

Home Automation Using Arduino

This document discusses using Arduino for home automation. Some key points: - Home automation allows convenient and efficient control of lighting, temperature, and appliances via automation and remote control. - An Arduino-based system can automate functions like turning lights on with sensors or scheduling through programming. - Sensors like ultrasonic, temperature, and PIR motion can be used as inputs, connected to Arduino and controlled through code. - The Arduino interfaces with outputs like LCDs, servos, motors to automate functions in response to sensor readings.

Uploaded by

Tonmoy Sutradhar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Home Automation Using Arduino

This document discusses using Arduino for home automation. Some key points: - Home automation allows convenient and efficient control of lighting, temperature, and appliances via automation and remote control. - An Arduino-based system can automate functions like turning lights on with sensors or scheduling through programming. - Sensors like ultrasonic, temperature, and PIR motion can be used as inputs, connected to Arduino and controlled through code. - The Arduino interfaces with outputs like LCDs, servos, motors to automate functions in response to sensor readings.

Uploaded by

Tonmoy Sutradhar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Home Automation Using Arduino

Course Title: Computer Peripherals and Interfacing


Course Code: CSE 4177

Introduction:
Home Automation enables you to use your home's Lighting, Temperature and home appliances
more conveniently and efficiently. And, at the same time giving you greater levels of comfort
and security.

It can be as simple as remote or automatic control of a few lights, or it can be a complete system
that controls all major parts of your home.

Smart Home Technology is anything that gives you automatic control of things around the
home, turning it from "dumb" to smart.
Application Area:
Home automation refers to the capacity to use internet-connected equipment to operate
household appliances. It might involve pre-programming complicated heating and lighting
systems, as well as alarms and home security controls, all of which are connected via a central
hub and operated remotely via a smartphone app.
There are several applications for smart homes that are currently being used.
Some of them are mentioned below:
• Lighting.
• Safety Sensors.
• Security System.
• Temperature Control.
• Doors.
• Kitchen.
• Windows.
• Home Routines.

Technology and tools:


The main constituents of a smart home are Automation -

It refers to the ability to schedule the events beforehand so that the device learns to perform
certain activities at that particular time on a daily basis. For example, every night when you go
to sleep the lights are turned off on their own. It may also include rare incidents like turning the
lights on whenever the alarm is triggered.

Peripheral equipment (also called: input and output devices) connects a computer to other
things. It gives a computer system more features. Input is anything that goes in and output is
anything that goes out. Any device for the computer that the computer can work without is
peripheral equipment.

• Mouse
• Keyboard
• Printer
• Monitor
• Webcam
• Printer
• Scanner
• Speakers
• External Drive
• USB Flash Drive

Programming language:

C/C++
Working mechanism of Sensors:

Ultrasonic Sensor:

The HC-SR04 ultrasonic sensor uses SONAR to determine the distance of an object just like the
bats do. It offers excellent non-contact range detection with high accuracy and stable readings
in an easy-to-use package from 2 cm to 400 cm or 1” to 13 feet.

The operation is not affected by sunlight or black material, although acoustically, soft materials
like cloth can be difficult to detect. It comes complete with ultrasonic transmitter and receiver
module.
Temperature sensor:

The temperature sensor in Arduino converts the surrounding temperature to voltage. It further
converts the voltage to Celsius, Celsius to Fahrenheit, and prints the Fahrenheit temperature on
the LCD screen.

We will use a temperature sensor (TMP 36) of low voltage. Such sensors are also stable while
dealing with large capacitive loads. It is also suitable for automotive applications.

The temperature sensors TMP 35, TMP 36, and TMP 37 are the sensors with the same features.

The operating voltage of the TMP 36 sensor ranges from 2.7V to 5.5V.
PIR sensor :

PIR sensors allow you to sense motion. They are used to detect whether a human has moved in
or out of the sensor’s range. They are commonly found in appliances and gadgets used at home
or for businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR
motion" sensors.

Following are the advantages of PIR Sensors −

• Small in size
• Wide lens range
• Easy to interface
• Inexpensive
• Low-power
• Easy to use
• Do not wear out
Connection with ICs:

A microprocessor is typically used with a number of peripheral integrated circuit (IC) devices

Input Output Interface provides a method for transferring information between internal storage
and external I/O devices. Peripherals connected to a computer need special communication
links for interfacing them with the central processing unit.

Data flow from sensors through ICs to I/O devices:


Code:

#include<Servo.h>

#include<LiquidCrystal.h>

LiquidCrystal lcd(A1,10,9,6,5,3);

float value; int tmp = A0; const

int pingPin = 7; int servoPin = 8;

Servo servo1; void

setup()

Serial.begin(9600);

servo1.attach(servoPin);

lcd.begin(16, 2);

pinMode(2,INPUT);

pinMode(4,OUTPUT);

pinMode(11,OUTPUT);

pinMode(12,OUTPUT);

pinMode(13,OUTPUT);

pinMode(A0,INPUT);

digitalWrite(2,LOW);

digitalWrite(11,HIGH);

digitalWrite(3,OUTPUT);
digitalWrite(7,OUTPUT);

digitalWrite(11,OUTPUT);

digitalWrite(13,OUTPUT);

//digitalWrite(A0,OUTPUT);

void loop()

long duration, inches, cm;

pinMode(pingPin, OUTPUT);

digitalWrite(pingPin, LOW);

delayMicroseconds(2);

digitalWrite(pingPin, HIGH);

delayMicroseconds(5);

digitalWrite(pingPin, LOW);

pinMode(pingPin, INPUT);

duration = pulseIn(pingPin, HIGH);

inches = microsecondsToInches(duration); cm

= microsecondsToCentimeters(duration);

servo1.write(0);
if(cm < 40)

servo1.write(90);

lcd.setCursor(0,1);

lcd.print("Door:OPEN");

else

servo1.write(0);

lcd.setCursor(0,1);

lcd.print("Door:CLOSED");

int pir = digitalRead(2);

if(pir == HIGH)

digitalWrite(4,HIGH);

lcd.setCursor(10,0);

lcd.print("LED:ON");

//delay(5000);

}
else if(pir == LOW)

lcd.setCursor(12,0);

lcd.print("OFF");

digitalWrite(4,LOW);

value = analogRead(tmp)*0.004882814;

value = (value - 0.5) * 100.0;

lcd.setCursor(0,0);

lcd.print("Tmp:");

lcd.print(value); delay(1000);

Serial.println("temperature");

Serial.println(value); if(value

> 20)

digitalWrite(12,HIGH);

digitalWrite(13,LOW);

else

digitalWrite(12,LOW);

digitalWrite(13,LOW);

}
lcd.clear();

long microsecondsToInches(long microseconds)

{ return microseconds / 74 / 2;

long microsecondsToCentimeters(long microseconds)

{ return microseconds / 29 / 2;

Component List:
• Arduino Uno R3

• LCD 16*2

• Ultrasonic Distance Sensor

• PIR sensor

• Positional Micro Servo

• DC Motor

• H-bridge Motor Driver

• Temperature Sensor
[TMP36]

• Resistor

• Potentiometer

• LED

CONCLUSIONS:

Main purpose of home automation system is to provide ease to people to control different
home appliances with the help of the android application present in their mobile phones and to
save electricity, time and money.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy