Starling Engine
Starling Engine
By:
Jalal Khalid Omer
Azwar Hemn Salih
Muhammad Wrya Hussian
Supervised by: Dr. Diyar Jamal Dhannon
2023-2024
DECLARATION
Supervised by:
Dr. Diyar Jamal Dhannon 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:
Signature
Name: Dr. Ahmad M. Adham
Title: Professor
Date
III
EXAMINATION COMMITTEE CERTIFICATION
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
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.
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).
1
1.2 Problem Statement
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.
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
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).
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.
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.
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
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.
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
13
Jumper wires: are a type of electrical wire that are used to connect components on
a breadboard or other circuit board.
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.
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.
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)
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%
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
21
Figure (3.2): LCD
22
Figure (3.3): Circuit Diagram
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 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);
}
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
Potentiometer
Servo Motor
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
29
Figure (4.1): 200watt light
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
32
REFERENCES
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).
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).
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