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

Starling Engine

The document discusses the development of a prototype smart home system using Arduino and sensors. It presents the background and objectives of the project, which are to research smart home automation techniques and design and build a prototype smart home model. The document outlines the various components used in the system, including Arduino, sensors, actuators and the circuit diagram. It also provides the methodology, results and conclusions of the project.

Uploaded by

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

Starling Engine

The document discusses the development of a prototype smart home system using Arduino and sensors. It presents the background and objectives of the project, which are to research smart home automation techniques and design and build a prototype smart home model. The document outlines the various components used in the system, including Arduino, sensors, actuators and the circuit diagram. It also provides the methodology, results and conclusions of the project.

Uploaded by

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

Kurdistan Region Government (KRG)

Ministry of Higher Education and Scientific Research


Erbil Polytechnic University
Erbil Technical Engineering College
Mechanical and Energy Engineering Department

USING AUTOMATION FOR PROTOTYPE SMART HOUSE


USING ARDUINO AND SENSORS

A graduation project submitted in partial


fulfillment of the requirements for the
Bachelor degree in Mechanical and Energy
Engineering

By:
Jalal Khalid Omer
Azwar Hemn Salih
Muhammad Wrya Hussian
Supervised by: Dr. Diyar Jamal Dhannon

2023-2024
DECLARATION

We declare that this graduation project entitled “Using Automation for


Prototype Smart House Using Arduino and Sensors” prepared by us and it has not
been previously submitted for the award of any degree or diploma or other similar
title of this for any other examining body or university.

Name: Jalal Khalid Omer Signature:


Date:

Name: Azwar Hemn Salih Signature:


Date:

Name: Muhammad Wrya Hussian Signature:


Date:

Supervised by:
Dr. Diyar Jamal Dhannon Signature:
Date:

Head of the Department


Professor Dr. Ahmad M. Adham Signature:
Date:

II
SUPERVISOR'S STATEMENT

We certify that this project entitled " Using Automation for Prototype Smart
House Using Arduino and Sensors" was prepared by (Karwan Farooq
Nader,Farhang Sherzd) under our direct supervision at Erbil Polytechnic
University, Erbil Technical Engineering College in partial fulfillment of the
requirements for the Degree of Bachelor in Mechanical & Energy Engineering.

Signature
Name: Dr. Diyar Jamal Dhannon
Title: (Supervisor)
Date:

In view of the available recommendations, we forward this thesis for debate


by the Examination Committee.

Signature
Name: Dr. Ahmad M. Adham
Title: Professor
Date

III
EXAMINATION COMMITTEE CERTIFICATION

We certify that we have read this graduation project entitled" Using


Automation for Prototype Smart House Using Arduino and Sensors" presented by
(Jalal Khalid Omer, Azwar Hemn Salih, Muhammad Wrya Hussian). The
examining committee examined the students in its contents. In our opinion, it meets
the standard of a graduation project for the bachelor degree in Mechanical and
Energy Engineering.

Signature:
Name of examiner: Assistant Professor. Dr. Dliar Obaid Ramadan
Title: Lecturer (Chairman) Date:

Signature:
Name of examiner: Dr. Abdulrahman Bahaddin Shakr
Title: Lecturer (Member) Date:

Signature:
Name of examiner: Dr. Diyar Jamal Dhannon
Title: Lecturer (Member) Date:

Signature:
Name of Supervisor: Dr. Diyar Jamal
Title: Lecturer (Supervisor) Date:
Approved by the head of Department of Mechanical and Energy Engineering

Signature:
Name: Dr. Ahmad M. Adham
Title: Professor
Date:

IV
TABLE OF CONTENTS

TITLE PAGE

Abstract viii
Chapter 1 Introduction
1.1. Introduction 1
1.2. Problem Statement 2
1.3. Research Objectives 3
1.4. Research Outline 4
Chapter 2 Literature Review
2.1. Introduction
2.2. Mete
2.2. Conclusion 10

Chapter 3 Methodology 11
3.1. Introduction 13
3.2. Arduino 24
3.3. Circuit Diagram 25
3.4. Code 28
3.5. System working
Chapter 4 Results and Discussion 30
4.1. Introduction

Chapter 5 Conclusion
5.1. Conclusion 32

V
5.2 Recommendations and Future Works 33
References 34

LIST OF FIGURES

FIGURE NO. TITLE PAGE


Smart House Ix
1.1 Re. Dr. Robert Stirling 1
1.2 Failure to build starling engine 2
2.1 The Smart House in The Second Example 9
2.2 9
The Smart House in The Third Example 11
3.1 Top view of the House 11
3.1 Right Side view of the House 12
3.1 Front View of the House 14
3.2 Arduino Uno Parts 16
3.2 Arduino Nano 16
3.2 Arduino Due 16
3.2 Arduino Leonardo 16
3.2 Arduino MEGA 16
3.2 Bread Bored 17
3.2 Jumper wire 17
3.2 Relay 17
VI
3.2 LED 18
3.2 DHT sensor 18
3.2 12V Adapter 18
3.2 IR sensor 19
3.2 LDR sensor 19
3.2 19
3.2 Resistors 20
3.2 Choosing Resistors 21
3.2 Question 1 21
3.2 The LED is broken 21
3.2 150ohm resistor 21
3.2 Servo Motor 22
3.2 22
12V Fan
22
LCD
3.3 Circuit Diagram 24
3.5 Block Diagram 28
3.5 Front view of the project 29
3.5 Top view of the project 29
4.1 200Watt Light 30

VII
LIST OF ABBREVATIONS

IR Infrared Sensor
DHT Digital-output relative humidity and temperature sensor
LED Light Emitting Diode
LCD Liquid Crystal Display
LDR Light Dependent Resistor
DIY Do It Yourself
ARM Advanced RISC Machine
RISC Reduced Instruction Set Computer
DC Direct Current
USB Universal Serial Bus
I/O Input/Output
AC Alternating Current
V Volt
A Ampere
W Watt
R Resistance

VIII
ABSTRACT

In recent year’s usage of energy is very high. Researches are being done to find
alternative sources for energy. There are many ways by which modifying existing
techniques will help to reduce the usage. The paper proposes the way to build and
utilize the low cost Stirling engine for the green energy applications. The research
on Stirling engine is being increased, many inventions reveals the suitability of
engine for low power applications that includes an alternative for motors in
industries. As it knows that Stirling engine has closer theoretical Carnot cycle
efficiency. This theoretical efficiency of engine provides an alternative for various
industrial low duty applications. Finally this paper will outline theoretical
background of Stirling cycle; various design parameters, innovative use of
fabrication works and industrial implementation ways. The design process involves
the design of cylinders, its mass flow rate, amount of heat addition, heat rejection,
efficiency and many more. These sub design parameters helps in finding out power
outcome of the engine. The fabricated work involves usage of available materials
in and around effectively. As a result final assembly of the engine meets the
objective.

In a nutshell, the aims of this project include the following:

 Research on working principle of Stirling engines


 Design of a Stirling engine that could be easily fabricated for small scale
subsistence use
 Fabrication of a prototype Stirling engine and assess its performance
 Give a recommendation from the findings and a way forward

IX
CHAPTER 1 INTRODUCTION

1.1 Introduction
In 1816, a 26 year old Minister in the Church of Scotland, Reverend Dr.
Robert Stirling, of Cloag, Methvin, Perthshire (Figure 1-1), invented the first
closed-cycle regenerative air engine, commonly known as the Stirling engine, at
Galston, Ayrshire (Finkelestein).

Figure 1.2 Rev. Dr. Robert Stirling


(http://www.cse.iitk.ac.in/~amit/courses/371/abhishe/stirli.gif)

Stirling engine is an external combustion heat engine where heat is provided


outside the cylinder. It operates by continuous cyclic compression and
expansion of air or any other gas, the working fluid, is subjected to different
temperature levels so that there is a net conversion of heat energy to mechanical
work. In this type of engine the working fluid is constantly held inside the
cylinder. Which means the system is in thermal equilibrium. Stirling engine is
distinct from other heat engines by means of regenerator through which hot
gases moves from one chamber to another chamber. The main advantage of
Stirling engine is that it can operate with any heat source. The efficiency of this
heat engine is very high when compared to any other heat engine.(walker,1973)

1
1.2 Problem Statement

A Stirling engine problem statement could be.

Design and optimize a Stirling engine capable of efficiently converting heat


energy into mechanical work, considering factors such as temperature
differentials, material selection, and overall system efficiency.

The problems of this project are as follows

 No air entering the cylinder


 Breaking of the glass during high temperatures
 Incomplete dimensions of wheels and cylinders during turning
 Balancing small and large flywheels
 Unavailability of clean aluminium
 Air gap formation during solidification in castings of aluminium

Figure (1.2): Failure to build Sterling engine

2
1.3 Research Objective

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

The Stirling engine has over the years evolved. The most common
configurations include the Alpha, Beta and Gamma. These vary in the
arrangement of the different parts including the displacer, piston and flywheel.
The Stirling engine operates on the Stirling cycle that has a theoretical
efficiency close to the Carnot efficiency. In the theory developed later, it is
noted that addition of a regenerator in the configuration improves the overall
performance and increases the output power of the system.

2.2 Material Selection

Among the materials listed copper has high melting point and thermal
conductivity which is essential for engine and also the thermal expansion of
copper is less so the engine can be operated at high temperature for long time.
But the material cost is too high and hardness is low compared to other
materials In aluminium the thermal conductivity is high, weight is less but
material strength is less compared to copper. Thermal expansion is high so it
cannot be operated for long time at high temperatures.(Hibbeler,R.C.2005)

1
Figure (1.3): Aluminium Moulding

2
Solar Panel Example 2

Figure (2.1): The Smart


House in The First Example
In the following project, installing a temperature sensor allows you to monitor the
inside temperature of your house. You can even check the temperature in your
home at all times using a smartphone. Naturally, temperature sensors in smart
homes operate by identifying and measuring the surrounding air temperature. For
precise temperature measurement, they employ a range of devices, including heat
or infrared sensors. A smart device or central hub that may be directed by voice
commands or a mobile app receives the data from the sensor. Remotely monitoring
and adjusting your home's temperature can ensure comfort and energy efficiency.
Alternatively, you might build an automatic system in a smart home that opens and
closes windows and doors. This system can be controlled by a number of different
technologies. Using smart window sensors and locks is one of the most popular
methods. You may remotely close your doors with a smart lock by using voice
commands or smartphone apps, no matter where you are. When a window is open
or closed, smart window sensors can determine it and communicate that
information to a smart device or central hub. You can set up rules or receive
notifications so that the windows close automatically when you leave or open for
ventilation as needed. Your smart home will be more secure with these capabilities.
Additionally, the smart window sensors will be able to spot cracks. These sensors
are intended to identify alterations to the window, such as opening, closing, or
breaking. When a leak is found, the sensor can notify you via your smartphone or
set off an alarm, allowing you to take the necessary action. Your home can be
protected and you can feel at ease knowing that there's an extra layer of security.
Another application is equipping smart homes with a rain status system, the term
"smart home rain mode" describes how the system recognizes and reacts to wet
weather. Rain sensors or weather forecasting services can be integrated into the
system to enable rain detection and warnings. In this manner, you can take any
essential action and stay informed about the weather at all times. This useful
function gives your smart home an extra degree of preparation. The smart home
system may automatically change several settings, like closing windows.
In a smart home, "fire status" refers to the system's capacity to identify and react to
a fire or smoke emergency in addition to installing a fire alarm system in your
house. Smoke detectors and heat sensors that are linked to a central hub or smart
device are common components of smart home fire detection systems. The system
can sound an alert if it detects smoke or fire, send notifications to your phone, and
if needed, make an emergency service call.
4
In addition to establishing a door code, a smart home also has a password-protected
door that may be unlocked with a password rather than a standard key. Because
you can simply change passwords as needed and you don't need to carry a physical
key with you. You may monitor and remotely regulate entrance to your home with
certain smart locks that include password-protected doors. You can also receive
alerts on your phone whenever someone opens the door. By keeping you informed
about who is entering and leaving your house, this feature provides an additional
layer of security.
By utilizing smart appliances or voice commands, you can control the lighting in
your room in a smart home. This includes managing indoor lighting with a smart
device. You may dim, turn on, turn off, change the color, and even schedule or
automate routines with smart light switches or lights. It's a practical method to
conserve energy and create the ideal atmosphere. Motion sensors—also referred to
as operating motion lights or motion detectors—are useful for preventing lights
from being left on needlessly and for saving energy. The lights turn on when the
sensor detects movement, and they automatically turn off after a predetermined
amount of time if no movement is detected. This useful feature—a sensor that
turns off outside lights when there is enough natural light from the sun—helps to
increase the automatic power of a smart home. When the light outside is sufficient,
the sensor determines how much sunlight there is and shuts off the lights. This
feature makes use of artificial light only when necessary (Eng.mohamed
Abdelsamie 2017).

5
Figure (2.1): The Smart House in The Second Example

Example 3: Placing a sensor along with setting a door squire will increase home
security. The alarm will sound if the door is broken or attempted to be opened by
an unauthorized person (Setumadhava Kathavate. 2016).

Figure (2.1): The Smart House in The Third Example

6
2.2 Conclusion

Undoubtedly, any of the cutting-edge devices found in smart homes are a huge
benefit to homeowners in terms of home safety and security as well as lower fuel
and electricity expenses. Naturally, in this modern age, employing these home
conveniences is becoming more common, and in the near future, the majority of
homes will be used per the residents' material capabilities.
Typically, smart home projects include a lot of objects.

In our project, we also included a heater and fan. We also utilized an IR light for
the sink and an LDR light for security in the living room. For security reasons, one
light would always be left on if the house was empty at night. Lastly, we use
potentiometers to unlock doors.

Older Projects My Project

Face ID Door Fingerprint Door Using Heater With Fan

Password Door Motion And Light IR Sensor For Sink

Light Sensor With Light Sensor With Potentiometer For Door


Light Solar
Fan With DHT Fulling Water Tank
LDR For Security
Bin Password Security
Table (1)

7
CHAPTER 3 EXPERIMENTAL SYSTEM AND PROCEDURES
(PROGRAMMING) 3.1 Introduction
We will walk you through the project's process in this section.
Using AutoCAD, we first created a plan to build a house with these measurements.

Figure (3.1): Top View of the House

Figure (3.1): Right Side View of the House

8
Figure (3.1): Front View of the House

9
Following the house, we intended to use Arduino to construct some smart
applications, such as:
i. Temperature sensor control of the heater and fan
ii. LDR-based light control
iii. IR light control
iv. Door operation by potentiometer

We needed the following items in order to create this project:

3.2 Arduino: Arduino is an open-source electronics platform that is widely used


for creating interactive projects and prototypes. It was first introduced in 2005 by a
team of developers in Italy and has since grown into a global community of
makers, hobbyists, and professionals who use Arduino for a wide range of
applications. The Arduino platform consists of hardware and software components
that allow users to easily create microcontroller-based projects. Arduino boards are
equipped with microcontrollers that can be programmed to interact with various
sensors, actuators, and other electronic components, enabling users to create
custom electronic systems. One of the key features of Arduino is its ease of use.
The programming language used for Arduino is based on C/C++, but is simplified
and tailored to make it accessible even to beginners. The Arduino software
includes a user-friendly Integrated Development Environment (IDE) that makes it
easy to write, compile, and upload code to an Arduino board.
Arduino has become popular in the maker and DIY communities due to its
versatility, low cost, and ease of use. It has been used to create a wide range of
projects, from simple LED blinkers to complex robotic systems. Arduino has also
found its way into various professional fields, such as engineering, prototyping,
and research.

Different components that make up an Arduino board:

10
Figure (3.2): Arduino UNO board

Power Supply: The power supply circuitry on an Arduino board is responsible for
providing the microcontroller and other components with the appropriate voltage
and current. This is typically done through a USB port or a DC power jack.
Input/output (I/O) Pins: The I/O pins on an Arduino board allow users to connect
external devices and sensors to the board. These pins can be used for both digital
and analog input/output, meaning that they can be used to control both binary
signals (on/off) and analog signals (varying voltage levels).
Analog input pins: The Arduino UNO board has 6 analog input pins, labeled
“Analog 0 to 5.” These pins can read the signal from an analog sensor like a
temperature sensor and convert it into a digital value so that the system
understands. These pins just measure voltage and not the current because they have
very high internal resistance. Hence, only a small amount of current flows through
these pins. Although these pins are labeled analog and are analog input by default,
these pins can also be used for digital input or output.
Digital pins: You can find these pins labeled “Digital 0 to 13.” These pins can be
used as either input or output pins. When used as output, these pins act as a power
supply source for the components connected to them. When used as input pins,
they read the signals from the component connected to them. When digital pins are
used as output pins, they supply 40 milliamps of current at 5 volts, which is more
than enough to light an LED. Some of the digital pins are labeled with tilde (~)
symbol next to the pin numbers (pin numbers 3, 5, 6, 9, 10, and 11). These pins act
11
as normal digital pins but can also be used for Pulse-Width Modulation (PWM),
which simulates analog output like fading an LED in and out.

Some of the most commonly used types of Arduino

Arduino Uno: The Uno is one of the most popular Arduino boards. It has 14
digital input/output pins, six analog inputs, and is powered by a USB cable or an
external power supply.
Arduino Nano: The Nano is a smaller version of the Uno, and is more compact
and affordable. It has 14 digital input/output pins, eight analog inputs, and can be
powered by a USB cable or an external power supply.
Arduino Mega: The Mega is a more powerful Arduino board, with 54 digital
input/output pins and 16 analog inputs. It also has a larger memory and more
processing power than the Uno.
Arduino Due: The Due is an advanced Arduino board, featuring a 32-bit ARM
Cortex-M3 processor and a variety of digital and analog input/output pins. It is
ideal for more complex projects that require higher processing power.
Arduino Leonardo: The Leonardo is similar to the Uno, but has a different
microcontroller that allows it to act as a USB keyboard or mouse. It has 20 digital
input/output pins and 12 analog inputs.

12
Figure (3.2): Arduino Leonardo

Figure (3.2): Arduino MEGA

Figure (3.2): Arduino Due

Figure (3.2): Arduino Nano

13
Jumper wires: are a type of electrical wire that are used to connect components on
a breadboard or other circuit board.

Figure (3.2): Types of Jumper wires


Bread Bored
A breadboard is a type of prototyping board used in electronics to make temporary
circuits. It allows you to quickly and easily connect electronic components together
without the need for soldering.

Figure (3.2): Bread Board

Relay: A relay module is an electronic device that allows an Arduino or other


microcontroller to control high voltage or high current circuits. The relay module
consists of a small circuit board with one or more
relays, which are electromechanical switches that can
be controlled by an electrical signal. To use a relay
module with an Arduino, you typically need to connect
the relay module to the Arduino using jumper wires.

14
Figure (3.2): Relay

Relays are commonly used with Arduino microcontrollers for controlling high-
voltage or high-current devices. While relays are generally reliable, there are a
few common problems that can occur:
Insufficient power supply: Relays require an adequate power supply to operate
correctly. If the power supply voltage is too low, the relay may not switch
reliably or may not switch at all.
Insufficient current: Arduino's digital output pins can provide a limited
amount of current, typically around 20-40mA. Some relays may require higher
currents to switch reliably. In such cases, a transistor or a dedicated relay driver
circuit may be necessary to amplify the current from the Arduino pin.
Back EMF (Electromotive Force): When a relay switches off, it generates a
voltage spike called back EMF, which can damage the Arduino or other
sensitive components. To protect against this, a diode called a fly back diode or
freewheeling diode is typically connected in parallel with the relay coil to
dissipate the back EMF.
Mechanical wear and tear: Relays consist of moving parts, and over time,
mechanical wear and tear can occur. This can lead to reduced reliability or
failure of the relay to switch. If you notice intermittent switching or complete
failure, it may be necessary to replace the relay.
Noise and interference: Relays switching high-voltage or high-current loads
can generate electrical noise and electromagnetic interference (EMI). This
interference can affect other components in the circuit, leading to unexpected
behavior or malfunctions. Proper shielding, grounding, and isolation techniques
should be employed to minimize the impact of noise and interference.

15
LED: LED (Light Emitting Diode) lights are a type of electronic lighting that
use a semiconductor material to produce light when an electric current is passed
through it. LED lights are energy-efficient, long-lasting, and available in a
range of colors and brightness levels. We use LED lights with an Arduino, you
we connect them to one of the digital output pins on the board.

Figure (3.2): The LEDs

Temperature sensor: This module uses a thermistor to detect the ambient


temperature where the resistance of a thermistor will increase when the ambient
temperature decreases.

Figure (3.2): DHT


12v Adapter: A power supply adapter that provides from
7 to 12V of DC is required. The adapter is plugged onto
the wall socket and the other end goes directly onto the
board’s AC socket.

Figure (3.2): 12V Adapter


16
IR sensor: An infrared proximity sensor or IR Sensor is an electronic device that
emits infrared lights to sense some aspect of the surroundings and can be employed
to detect the motion of an object. As this is a passive sensor, it can only measure
infrared radiation.

Figure (3.2): IR sensor

LDR sensor: LDR project uses the photo resistor to light an LED. The LED will
light up whenever there is dark or no light over the sensor.

Figure (3.2): LDR sensor

Resistors: As the name suggests, resistors resist the flow of electricity and the
higher the value of the resistor, the more it resists and the less electrical current
will flow through it. We are going to use this to control how much electricity flows
through the LED and therefore how brightly it shines.

17
Figure (3.2): Resistor

Choosing Resistor

18
Figure (3.2): Choosing Resistors

Note:
You need to be familiar with the LED's working voltage and current to select
resistance. For instance, see table (2):
Color Range Vf Ampere

19
Red 1.8v-2.1v 20mA
Green 2v-3.1v 20mA
Blue 3v-3.7v 20mA
Yellow 1.9v-2.2v 20mA
White 3v-3.4v 20mA
Table (2)

Question 1: Find the suitable resistor for this case.


Question (1)
Calculation:

For red LED, I use a resistance of 150 ohm; Figure (3.2): Question 1
otherwise, the LED breaks and separates
from the circuit.

𝐴𝐵 ∗ 10𝐶 ∓ D
15 ∗ 101 ± 5%
150 ± 5%

Figure (3.2): 150ohm

20
Figure (3.2): The LED is broken
Servo motor: are used to control the position
of objects, rotate objects, move legs, arms or
hands of robots, move sensors etc. with high
precision. Servo motors are small in size, and
because they have built-in circuitry to control
their movement, they can be connected
directly to an Arduino. Figure (3.2): Servo motor

Potentiometer: A potentiometer is a simple mechanical


device that comes in many different forms. It provides a
variable amount of resistance that changes as you
manipulate it. The examples in this project uses a
potentiometer with a twisting servomotor.

12V Fan: The fan work with 12V DC.


Heater: Since I couldn't use a heater for this project, Figure (3.2): Potentiometer I
used LEDs instead.
LCD: A type of alpha numeric or graphic display based on liquid crystals. LCDs
are available in a many sizes, shapes, and styles. It has 2 rows with 16 characters
each.

21
Figure (3.2): LCD

Figure (3.2): 12vFan


(Geddes. 2016)
(Fitzgerald, Shiloh and Igoe. 2012)
(RS. 2024)
(Digikey. n.d)

3.3 How to join components:

22
Figure (3.3): Circuit Diagram

Recommendations for achieving a good wire connection:

i. Take care of damaged wires: Before beginning any project, inspect the wires
you wish to use because sometimes there are problems with your connection but
you don't notice any results because of the damage. A voltmeter is a tool that may
be used to evaluate wires. For example, it can be used to read the voltage of a
battery and then check if the wires have the same voltage or not. ii. Whenever
you make a connection, you should start with a wire of one type, such as a
voltage, ground, or signal wire. If you don't, you might lose track and unsure
about what to do next.
iii. Before connecting, clean the wires.
iv. Avoid using force since the jumper wire head in the board breaks as a result.
v. When connecting parts, take the shortest route possible.
vi. Make use of color. Utilize blue for ground, yellow or orange for signal, and
red and black for voltage.

23
3.4 Software Code
The code that you see below has been generated using Arduino software:
// number one Fan
#include "DHT.h"
#define DHTPIN 4
#define DHTTYPE DHT11
#define RELAY_FAN_PIN A5
#define led 2 const int
TEMP_THRESHOLD_UPPER = 35; const
int TEMP_THRESHOLD_LOWER = 20;
DHT dht(DHTPIN, DHTTYPE); float
temperature;

//number two LDR const


int ldrPin = A3;
const int ledPin = 3;
int ldrValue = 0;

//number three IR int


LEDpin = 10; int
obstaclePin = 5; int
hasObstacle = LOW;

// number four
#include <Servo.h>
Servo myServo;

//number Five
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
Serial.begin(9600);
dht.begin();
pinMode(RELAY_FAN_PIN, OUTPUT);
pinMode(led, OUTPUT);
pinMode(ledPin, OUTPUT);
pinMode(LEDpin, OUTPUT);
pinMode(obstaclePin, INPUT);
lcd.backlight(); lcd.init();
myServo.attach(9);
}

void loop() { delay(500);


temperature = dht.readTemperature();
if (isnan(temperature)) {

24
Serial.println("Failed to read from DHT sensor!");
} else {
if (temperature > TEMP_THRESHOLD_UPPER) {
Serial.println("The fan is turned on");
digitalWrite(RELAY_FAN_PIN, HIGH);
} else if (temperature < TEMP_THRESHOLD_LOWER) {
Serial.println("The led is turned on");
digitalWrite(2, HIGH);
}
{ ldrValue=analogRead(ldrPi
n); if(ldrValue <18)
digitalWrite(ledPin,HIGH);
else if(ldrValue >30)
digitalWrite(ledPin,LOW);

} { hasObstacle =
digitalRead(obstaclePin);

if (hasObstacle == HIGH) {
Serial.println("Stop something is ahead!!");
digitalWrite(LEDpin, LOW);
}
else {
Serial.println("Path is clear");
digitalWrite(LEDpin, HIGH);
}
} { lcd.clear();
lcd.setCursor(0,0);
lcd.print("Humidity=");
lcd.print((float)dht.readHumidity());
lcd.print("%"); lcd.setCursor(0,1);
lcd.print("Temp=");
lcd.print((float)dht.readTemperature());
lcd.print("Celsius");
} { int analogValue = analogRead(A0);
int angle = map(analogValue, 0, 1023, 0, 90);

myServo.write(angle);
Serial.print("Analog: ");
Serial.print(analogValue);
Serial.print(", Angle: ");
Serial.println(angle);
delay(10);
}
}
}

25
3.5 Block Diagram

Input Output

Light

26
LDR sensor

Arduino
Light

IR sensor

LCD Display
DHT sensor

DHT sensor Fan and Heater

Potentiometer
Servo Motor

Figure (3.5): system Block Diagram

Saddam. (2015)
Bhatt, A. (n.d)
Kumar, P. (n.d)

27
Figure (3.5): Front view of the project

28
Figure (3.5): Top view of the project

CHAPTER 4 RESULTS AND DISCUSSION


4.1 Introduction
With this example, allow us to demonstrate a significant difference:
For instance, if 100 lights in a large supermarket each have a 200 watt light source,
and those lights run for three hours every day without your requirement, you will
waste a lot of money. Let's examine kWh and price by $ in the Kurdistan region in
Table (3). Politics, the state of the economy, the price of fuel, the amount of energy
consumed, the distribution of electricity, and electricity theft are some of the
variables that affect electricity costs over time.
kWh for a Regular House 0.014$
kWh for a Business 0.18$ (Not consistent)
kWh for a City House (such as Altun City) 0.12$
kWh for an Apartment 0.12$
Table (3)

29
Figure (4.1): 200watt light

Relation between price and Year


25000

20000

15000
Price $

10000

5000

0
1 2 3 4 5
Series1 3888 7776 11664 15552 19440
Year

You spend 19440$ = 25,452,694,80 IQD in five years. As you can notice it; it's all
a loss. if a photocell is used. The lights only come on at night and go off during the
day (Ritchie, C, 2023).
A space heater will use between 1,500 and 1,800 watts. That means that in one
hour, it will consume 1.5 to 1.8 kilowatt-hours (kWh) of electricity. In one day, that
equates to approximately 12 to 14.4 kWh for eight hours working. In one month,
a space heater can consume up to 360 to 432 kWh and over 4320-5184 kWh in one

30
year. $ 𝑓𝑜𝑟 𝑎 𝑦𝑒𝑎𝑟 = 𝑝𝑟𝑖𝑐𝑒 × 𝐾𝑤. ℎ = 5184 ∗ 0.014$ = 72.576$ = 95.000𝐼𝑄𝐷
And for Air Cooler: 500watt working 8 hours=1440Kwh for a Year
$ 𝑓𝑜𝑟 𝑎 𝑦𝑒𝑎𝑟 = 𝑝𝑟𝑖𝑐𝑒 × 𝐾𝑤. ℎ = 1440 ∗ 0.014$ = 20.16$ = 26.500𝐼𝑄𝐷 You
may argue that this is a tiny expense, but taking charge of your home's affairs
yields seven benefits, and as you gain more control, costs will also change.
i. Lowers electricity costs ii. Accuracy is high iii. Comfortable
condition iv. Quick reaction v. Safety vi. Easier life vii. There
are occasions when we need a controller to do a task.
CHAPTER 5 CONCLUSION

5.1. Conclusion

We designed a miniature house for our project using the AutoCad application. The
sink's infrared sensor was utilized to detect light, and when the system is
operational, the light turns on when you wash your hands, and we utilized LED
lighting in the living room for two reasons: first, it's cost-effective and secure, and
the system can regulate temperature using DHT while a potentiometer is used to
open and close the door. We can now claim that the system gives us a safer
existence.

In the traditional house, we had no control and had to perform all household
chores, which wearied us. In the new house, we had control and could see how the
system functioned without our manual intervention.

You must always connect resistors in the circuit if they are required and select
appropriate resistors because we have always had problems when we didn't utilize
resistors.

We encountered three main issues: first, the Arduino only provided 5V for the 12V
fan, so in order for the fan to function, we needed 12V. Initially, we tried setting up
a 9V battery to increase the supply of voltage, but this was a terrible method
because We lost six batteries that way because the battery voltage drops quickly
and constantly. We got frustrated with this, so we decided to try another approach,
which involved using a 12V adaptor. This was a wise choice for our situation.
Another issue arose when we joined the wires on the breadboard without using
colors to indicate them. Following that, we used colors to clarify the types of the

31
wires. The last issue was with the code; the system slows down by seconds if many
codes with varying delays are written on the Arduino software.

The final topic I want to discuss is the project cost. While all other projects' details
and quality depend on cost, if you think like an efficient engineer, you can build
something good and high-quality by spending a small amount of money. When we
compare our expenditure to previous projects, it indicates that we are efficient
engineers because only efficient engineers are able to organize quality with money.

5.2 Recommendations

If anyone wants to make a smart house, we recommend creating a filling water


tank. Perhaps you are bored of frequently refilling the water tank. You can use a
sensor to determine when the tank is empty and instruct the water pump to run
until the tank is full, at which time the pump will turn off. Or a house with all
smart appliances and gadgets, it means you can communicate with almost all the
equipment and electronics in the house, which is a fantastic idea. If your house is
named Lucy, for instance, you can instruct Lucy to turn things on or off. It might
also provide you with guidance and details on whatever you asked for.
Smart house security features including fire protection in the kitchen, use of
fingerprints instead of potentiometers for doors, automated closing of windows
during bad weather, and notification of an infant crying in bed to parents.

32
REFERENCES

1. Demianchuk, R. (2019) Smart House Systems. Thesis. Centria University of


Applied Sciences. Available at:
https://www.theseus.fi/bitstream/handle/10024/267753/Demianchuk_Roman
.
pdf?sequence=2&isAllowed=y

2. Hibbeler, R. C. (2005). Mechanics of Materials. 6th ed. Published by


Pearson: Prentice Hall. Martini, W. R. (2004).
http://ndl.ethernet.edu.et/bitstream/123456789/26576/1/Mechanics%20of
%20Materials%208th%20Edition%20R.C.%20Hibbeler.pdf

3. Mariotti, T. 2023, ‘Smart home statistics (2024)’, Real Estate Blog,


Rubyhome, 6 August. Available at:
https://www.rubyhome.com/blog/smarthome-stats/ (Accessed 18 April
2024).

4. Countfire. (n.d) ‘The rise of the automated home’, Construction Industry.


Available at: https://www.countfire.com/blog/the-rise-of-the-automatedhome
(Accessed 18 April 2024).

5. AHRAE (2020) Addendum d to ANSI/ASHRAE Standard 55-2017:


Thermal Environmental Conditions for Human Occupancy. Available at:
https://www.ashrae.org/file%20library/technical%20resources/standards%20
and%20guidelines/standards%20addenda/55_2017_d_20200731.pdf
(Accessed 18 April 2024).

6. Geddes, M. (2016), Arduino project handbook, San Francisco, USA:


William Pollock, p.p: 22-59, 86-99, 102-130. Available at: https://ss-
valpovo.hr/wpcontent/uploads/2020/01/arduinoprojecthandbook.pdf

7. Fitzgerald, S. Shiloh, M. and Igoe, T. (2012), Arduino projects book, Torino,


Italy. Available at: arduino-projects-book.pdf
33
8. RS (2024) A complete guide to resistors. Available at:
https://uk.rsonline.com/web/content/discovery/ideas-and-advice/resistors-
guide (Accessed at: 18 April 2024).

9. Digikey (n.d) LED Series Resistor Calculator. Available at:


https://www.digikey.com/en/resources/conversion-calculators/conversioncal
culator-led-series-resistor (Accessed 18 April 2024).

10. Google Finance was used for converting money. Available at:
https://www.google.com/finance/quote/USD-
IQD?sa=X&sqi=2&ved=2ahUKEwiFutWI3MuFAxXq3QIHHdxqBcMQmY
0JegQIERAo (Accessed 15 April 2024).

11. The ETC (2019) How to make a Mini Smart House, YouTube. 20 Sep.
Available at: https://www.youtube.com/watch?v=qWvBQdf0Vi0 (Accessed
19 April 2024).

12. Eng.mohamed Abdelsamie (2017) Smart home automation system using


IOT, YouTube. 20 November. Available at: https://www.youtube.com/watch?
v=pfc1IoTOn8s (Accessed 19 April 2024).

13. Setumadhava Kathavate (2016) Wireless Smart home concept using Arduino,
YouTube. 11 December. Available at: https://www.youtube.com/watch?
v=h9u8wPiamqE (Accessed 19 April 2024).

14. Ritchie, C. (2023) Understanding your energy usage, learn how to calculate
power consumption by kWh per month, Save on Energy. Available at:
https://www.saveonenergy.com/resources/energy-consumption/ (Accessed:
20 April 2024).

15. Kumar, P. (n.d) Sensor Data Monitoring On Android Phone, Engineers


Garage. Available at: https://www.engineersgarage.com/sensor-
datamonitoring-on-android-phone/ (Accessed: 23 April 2024).

34
16. Saddam. (2015) Humidity and temperature measurement using Arduino,
Circuit Digest, 17 July, Available at:
https://circuitdigest.com/microcontroller-projects/arduino-
humiditymeasurement (Accessed: 23 April 2024).

17. Bhatt, A. (n.d) How to Design a Multi-Use Level Indicator Using Arduino,
Engineers Garage. Available at: https://www.engineersgarage.com/how-
todesign-a-multi-use-level-indicator-using-arduino/ (Accessed: 23 April
2024).

35

You might also like