0% found this document useful (0 votes)
81 views62 pages

Automatic Fan Controland Intensity Control by Using Microcontroller

CSE

Uploaded by

cajilajayareeta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views62 pages

Automatic Fan Controland Intensity Control by Using Microcontroller

CSE

Uploaded by

cajilajayareeta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

AUTOMATIC FAN CONTROL AND

INTENSITY CONTROL BY USING


MICROCONTROLLER

MINI PROJECT REPORT

Submitted by

ABISHA RENGITHAM.R (960618105001)

ROHINI.P (960618105015)

SARITHA.T (960618105016)

In partial fulfillment for the award of the degreeof

BACHELOR OF ENGINEERING

in
ELECTRICAL AND ELECTRONICS ENGINEERING

DMI ENGINEERING COLLEGE, ARALVAIMOZHI

ANNA UNIVERSITY : CHENNAI 600 025

AUGEST 2021
AUTOMATIC FAN CONTROL AND
INTENSITY CONTROL BY USING
MICROCONTROLLER

MINI PROJECT REPORT

Submitted by

ABISHA RENGITHAM.R (960618105001)

ROHINI.P (960618105015)

SARITHA.T (960618105016)

In partial fulfillment for the award of the degreeof

BACHELOR OF ENGINEERING

in

ELECTRICAL AND ELECTRONICS ENGINEERING

DMI ENGINEERING COLLEGE, ARALVAIMOZHI

ANNA UNIVERSITY : CHENNAI 600 025

AUGEST 2021
ANNA UNIVERSITY : CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this mini project report “Automatic Fan Control and
Intensity Control By Using Microcontroller” Is the bonafide work of
Abisha Rengitham. R (960618105001), Rohini. P (960618105015) and
Saritha .T(960618105016) carried out the mini project work under my
supervision.

SIGNATURE SIGNATURE

Mr.Binu Packia Ananth, M.E Mrs.JaculinJenitta.K, M.E.


HEAD OF THE DEPARTMENT SUPERVISOR
Department of EEE, AP/Department of EEE,

DMI Engineering College, DMI Engineering College,

Aralvaimozhi-629 301 Aralvaimozhi-629301

Anna university project viva-voice held on: __04-08-2021_________ at DMI Engineering


College, Aralvaimozhi-629301

Internal Examiner External Examiner


ACKNOWLEDGEMENT
We are grateful and gifted in taking up this opportunity to thank the LORD
ALMIGHTY for showering his unlimited blessings upon me.

We take this opportunity to express our gratitude to our chairman,


Rev.Fr.Dr.J.E.Arul Raj and DFT managing trustee Rev.Sr.Gnanaselvam Mary,
DMI for facilitate me in the bravura college.

We wish to express our sincere thanks to our Principal Dr.V.GOPI, M.E.,


Ph.D., and our Vice Principal Dr.P.Nagarajan, M.E., Ph.D., and Rev.Sr.Xavier
Selvi Sathern Superior and our administrator Rev.Sr.Josphine Mary, DMI for the
stable and ethical support to finish my mini project success.

We wish to express our deep sense of gratitude to our esteemed Head of


EEE department Mr.Binu Packia Ananth, M.E., for his scintillating discussions
and encouragement towards our mini project work.

We are immediately pleased to thank our guide Mrs.Jaculin Jenitta.K


M.E., DMI Engineering College for his excellent guidance and co- operation
during the mini project work.

It is our pleasure to acknowledge our indebtedness to all the staff members


of our department, who aided us successfully to bring our project asan effective
one. Further thanks to non-teaching staff for extending the lab facilities.

We thank our family members and friends for their honourable support.

iii
ABSTRACT

This project is a standalone automatic fan speed controllerthat controls


the speed of an electric fan according to our requirement. Use of
embedded technology makes this closed loop feedback control system
efficient and reliable. Microcontroller (ATMega8 / 168 / 328) allows
dynamic and faster control. Liquid crystal display (LCD) makes the system
user-friendly. The sensed temperature and fan speed level values are
simultaneously displayed on the LCD panel. It is very compact using few
components and can be implemented for several applications including air-
conditioners, water- heaters, snow-melters, ovens, heat-exchangers, mixers,
furnaces, incubators, thermal baths and veterinary operating tables.
ARDUINO micro controller is the heart of the circuit as it controls all the
functions. The temperature sensor LM35senses the temperature and converts
it into an electrical (analog) signal, which is applied to the microcontroller.
The sensed and set values of the temperature are displayed on the 16x2-line
LCD. The micro controller drives Transistor to control the fan speed. This
project uses regulated 12V, 2A power supply. This project is useful in
process industriesfor maintenance and controlling of Boilers temperature.

iv
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

ABSTRACT iv

ACKNOWLEDGEMENT iii

LIST OF FIGURES viii

LIST OF ABBREVIATIONS ix

1 INTRODUCTION 1

1.1 Overview of the project 1

1.2 Fan Speed control technique 3

1.3 Problem Statement 3

1.4 Objective 4

2 LITERATURE SURVEY 4

3 SYSTEM ANALYSIS 13

3.1 Existing system 13

3.1.1 Disadvantages 14

3.2 Proposed system 14

3.2.1 Advantages 14

v
3.3 Description 14

3.4 Pulse Width Modulation 15

4 SYSTEM IMPLEMENTATION 16

4.1 Architectural structure 16

4.2 Circuit Diagram 17

4.3 Application 19

4.4 Hardware Implementation 20

4.4.1 Temperature Sensor 20

4.4.2 Liquid crystal display 22

4.4.3 Arduino UNO basic information 24

4.4.4 Specifications 29

4.4.5 General pin functions 29

4.4.6 Special pin functions 30

4.4.7 Communications 31

4.5 PIR Sensor 32

4.5.1 Operation 33

4.5.2 Product design 34

4.5.3 Security applications 34

vi
4.5.4 Placement 35

4.5.5 PIR remote based thermometer 35

4.5.6 DC motor 36

4.5.7 Power supply 37

5 Software Implementation 38

5.1 Algorithm 38

5.2 Software 41

5.2.1 Arduino IDE 42

5.2.2 Libraries 44

5.2.3 Embedded C 45

6 Results and Discussion 46

7 Conclusion 48

References 49

vii
LIST OF FIGURES

FIGURE NO FIGURE NAME PAGE NO

3.1 Pulse width Modulation 17

4.1 Block diagram of proposed system 17 18

4.2 Temperature based fan speed controller 19

4.3 Temperature sensor 23

4.4 16x2 LCD 25

4.5 Arduino UNO 29

4.6 PIR Sensor 39

4.7 DC motor 40

4.8 Power supply 41

viii
LIST OF ABBREVIATION

IOT INTERNET OF THINGS

BI BUSINESS INTELLIGENCE

HEMS HOME ENERGY MANAGEMENT SYSTEM

WSN WIRELESS SENSOR NETWORKS

GPS GLOBAL POSITIONING SYSTEM

WAMS WIDE AREA MONITORING SYSTEM

SFMD SYNCHRONIZED FREQUENCY MEASUREMENT DEVICES

PMU PHASOR MEASUREMENT UNITSi

FNET FREQUENCY MONITORING NETWORK

FDR FREQUENCY DISTURBANCE RECORDERS

NTP NETWORK TIME PROTOCOL

GUI GRAPHIC USER INTERFACE

UTC UNIVERSAL TIME COORDINATED

USB UNIVERSAL SERIAL BUS

ix
CHAPTER 1
INTRODUCTION

With the advancement in technology, intelligent systems are introduced every


day. Everything is getting more sophisticated and intelligible. There is an increase in
the demand of cutting-edge technology and smart electronic systems.
Microcontrollers play a very important role in the development of the smart systems
as brain is given to the system. Microcontrollers have become the heart of the new
technologies that are being introduced daily. A microcontroller is mainly a single
chip microprocessor suited for control and automation of machines and processes.
Today, microcontrollers are used in many disciplines of life for carrying out
automated tasks in a more accurate manner. Almost every modern-day device
including air conditioners, power tools, toys, office machines employ
microcontrollers for their operation. Microcontroller essentially consists of Central
Processing Unit (CPU), timers and counters, interrupts, memory, input/output ports,
analog to digital converters (ADC) on a single chip. With this single chip integrated
circuit design of the microcontroller the size of control board is reduced and power
consumption is low. This project presents the design and simulation of the fan speed
control system using PWM technique based on the room temperature. A
temperature sensor has been used to measure the temperature of the room and
the speed of the fan is varied according to the room temperature using PWM
technique. The duty cycle is varied from 0 to 100 to control the fan speed depending
upon the room temperature, which is displayed on Liquid Crystal Display.

1
1.1 OVERVIEW OF THE PROJECT

With the advancement in technology, intelligent systems are introduced every day.
Everything is getting more sophisticated and intelligible. There is an increase in the
demand of cutting-edge technology and smart electronic systems. Microcontrollers play a
very important role in the development of the smart systems as brain is given to the system.
Microcontrollers have become the heart of the new technologies that are being introduced
daily. A microcontroller is mainly a single chip microprocessor suited for control and
automation of machines and processes. Today, microcontrollers are used in many
disciplines of life for carrying out automated tasks in a more accurate manner. Almost
every modern day device including air conditioners, power tools, toys, office machines
employ microcontrollers for their operation. Microcontroller essentially consists of Central
Processing Unit (CPU), timers and counters, interrupts, memory, input/output ports, analog
to digital converters (ADC) on a single chip. With this single chip integrated circuit design
of the microcontroller the size of control board is reduced and power consumption is low.
This project presents the design and simulation of the fan speed control system using PWM
technique based on the room temperature. A temperature sensor has been used to measure
the temperature of the room and the speed of the fan is varied according to the room
temperature using PWM technique. The duty cycle is varied from 0 to 100 to control the
fan speed depending upon the room temperature, which is displayed on Liquid Crystal
Display.
Pulse Width Modulation, or PWM, is a technique for getting analog results with digital
means. Digital control is used to create a square wave, a signal switched between on and
off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts)
by changing the portion of the time the signal spends on versus the time that the signal
spends off. The duration of "on time" is called the pulse width.

2
To get varying analog values, we change, or modulate, that pulse width. If we repeat this
on-off pattern fast enough with an LED for example, the result is as if the signal is a steady
voltage between 0 and 5v controlling the brightness of the LED.

1.2 FAN SPEED CONTROL TECHNIQUE

A low-frequency pulse-width modulation (PWM) signal, usually in the range of


about 30Hz, whose duty cycle is varied to adjust the fan’s speed is used. An inexpensive,
single, small pass transistor can be used here. It is efficient because the pass transistor is
used as a switch.

One disadvantage of this approach, however, is that it can make the fan noisy
because of the pulsed nature of the signal. The PWM waveform’s sharp edges cause the
fan’s mechanical structure to move (like a badly-designed loudspeaker), which can easily
be audible.

This project is a standalone automatic fan speed controller that controls the speed of
an electric fan according to the requirement. Use of embedded technology makes this
closed-loop feedback-control system efficient and reliable. The microcontroller
(MCU) ATMega8/168/328 allows dynamic and faster control and the LCD makes the
system user-friendly. Sensed temperature and fan speed levels are simultaneously displayed
on the LCD panel.

The project is very compact and uses a few components only. It can be implemented
for several applications including air-conditioners, water-heaters, snow-melters, ovens,
heat-exchangers, mixers, furnaces, incubators, thermal baths and veterinary operating
tables. The project will help save energy/electricity.

3
1.3 PROBLEM STATEMENT

Most human feels the badly designed about changing the fan rate level physically
when the room temperature changes. Along these lines, the programmed fan framework
that consequently changes the velocity level as indicated by temperature changes is
prescribed to be fabricated for tackling this issue.

1.4 OBJECTIVE
To develop a low cost, user friendly automated temperature-controlled fan regulator
which reduces power consumption and also assist people who are unable to control the
speed of fan from their locations.

4
CHAPTER 2

LITERATURE SURVEY

Power Consumption Rate of India The U.S. Energy Information Administration


provides data for India from 1980 to 2015. The average value for electricity consumption of
India during that period was 15.1 billion kilowatt-hours with a minimum of 1.8 billion
kilowatthours in 1980 and a maximum of 46.17 billion kilowatt hours in 2014.

Review of Relevant projects


There are some abstractions of publications which are relevant to our proposed
system. According to those publications we have included the information about existing
system. The existing system has scope of upgrade. And existing system has some
limitations. We have gathered lot of information from the literature and have discussed here.
The information we have gathered which are about Automatic control fan using various
electronic component and Arduino as well. We have got additional knowledge from
particular publication about human sensing device. We have gathered knowledge about our
proposed system from some article as well which has been published by an organization.

5
M. Charishma and D.S.K. Chandrasekar (2018) discovered Comparison of PI,
Fuzzy and Sliding Mode Control Techniques in Speed Control of BLDC Motor
explains the concept of Developments made in the fields of control system engineering is
responsible for paradigm shift in technology and industries. The paper constitutes of BLDC
motor load fed from Luo converter. A Luo converter is special DC-DC converter with a
single switch. The negative output elementary Luo converter is employed for conversion of
voltages. The input for BLDC motor load is fed from a three phase VSI with 120⸰
conduction mode. In this paper speed control of BLDC motor is done by employing various
controllers like PI, fuzzy logic and SMC controllers. The converter system used here is Luo
converter for DC-DC conversion followed by three phase inverter circuit for DC-AC
conversion to energise BLDC. The input DC power is generated by photovoltaic systems.
For obtaining maximum power from PV system, MPPT algorithm also used. The circuit is
simulated in MATLAB Simulink. The step responses of three controllers compared from
the obtained results. The optimum speed control is seen in SMC controller when compared
to fuzzy and PI.

Jival Angeti, Adamu S. Kadala and Gadada (2019) discovered Speed Control of
BLDC Motor using Fuzzy: Tuned PID Controller explains the concept of Brushless DC
(BLDCM) Motor is becoming more prominent and more attractive as the demand for
efficiency, reliability, torque control, precise speed and ruggedness increases. BLDC Motor
as the name implies they have neither brushes nor commutators, the commutation of BLDC
Motor is performed with the help of Electronic circuit, and these Motors have several
advantages over Brushed DC Motor which include: better torque versus speed
characteristic, higher efficiency, better dynamic response due to low rotor inertia, higher
speed range etc. This paper presents the execution of PID controller and Fuzzy Tuned PID
controller utilizing Simulink display. Tuning the PID gains and processing utilizing
conventional PID controller is troublesome and poor vigorous, it doesn't give fulfilled

6
control characteristic when compare with Fuzzy Tuned PID controller. From the simulation
results it is clearly demonstrated that Fuzzy Tuned PID controller gives better control
execution when compared with conventional PID controller. MATLAB/SIMULINK
environment is utilized to do the examination above

Alsayid, basim, salah, wael a and alawneh, yazeed (2019) discovered Modelling
Of Sensored Speed Control Of BLDC Motor explains the concept of recent
developments in the field of magnetic materials and power electronics, along with the
availability of cheap powerful processors, have increased the adoption of brushless
direct current (bldc) motors for various applications, such as in home appliances as
well as in automotive, aerospace, and medical industries. The wide adoption of this
motor is due to its many advantages over other types of motors, such as high efficiency,
high dynamic response, long operating life, relatively quiet operation, and higher speed
ranges. This paper presents a simulation of digital sensor control of permanent magnet
bldc motor speed using the matlab/simulink environment. A closed loop speed control
was developed, and different tests were conducted to evaluate the validity of the
control algorithms. Results confirm the satisfactory operation of the proposed control
algorithms

A. Darcy gnana jegha, m.s.p. Subathra, nallapaneni manoj kumar and aritra
ghosh (2020) discovered optimally tuned interleaved luo converter for pv array fed
bldc motor driven centrifugal pumps using whale optimization algorithm—a resilient
solution for powering agricultural loads explains the concept of the use of brushless
direct current (bldc) motors are gaining much prominence in water pumping systems (wps),
especially for agricultural purposes.

In most cases, the bldc based wps is powered using electricity from the grid, which is
vulnerable to disruptive events causing a resilience problem. However, to avoid the

7
resilience issue, grid-interactive solar photovoltaics (pv) are being used, and this is due
to the increased penetration of distributed generation sources into the grid. In these
systems, based on the inherent nature of solar pv, power converters are preferred, and
as a result, problems like switching losses and maintaining steady-state voltages are
commonly seen. In this paper, a framework of pv powered wps with scope for
optimizing controller parameters is proposed to avoid the above-raised issues. Based
on the proposed framework, the overall structure of the pv powered wps is modeled,
designed, and analyzed. In the proposed system, the power output from solar pv is fed
to the bldc motor and the grid. If any problem arises in obtaining the power from solar
pv, grid-interaction helps to run the motor at required speeds making the wps resilient
to unexpected disruptions and vice versa. F or retrieving the generated power from pv
array, a positive interleaved luo converter (i-luo) is used, which boosts the output with
minimum switching losses. To maintain the steady-state voltage at the output of the i-
luo converter, a proportional-integral (pi) controller whose parameters are tuned by
whale optimization algorithm (woa) is used. This voltage is fetched to the bldc motor
via a 3-phase (3-ф) inverter and then to the grid via a single-phase (1-ф) inverter. The
overall system is simulated and experimentally validated, with a detailed analysis of
the observed results. The results include the various performance characteristics of the
solar pv, converter, and bldc motor. Besides, by using the field-programmable gate
array (fpga) based spartan6e controller, the performance of the i-luo is examined
experimentally

Huang Jigang, Fang Hui & Wang Jie (2019) discovered A PI controller
optimized with modified differential evolution algorithm for speed control of BLDC
motor explains the concept of a proportional integral (PI) controller that optimized with the
modified different evolutional (DE) algorithm is proposed for speed control of brushless
direct-current (BLDC) motor. The parameters of PI controller are tuned by the modified DE

8
algorithm which based on adaptive mutation factor, multivariable fitness function and the
starting rule for the modified algorithm. The performances of proposed controller, the
conventional PI controller and the PI controller optimized with standard DE controller (PI-
SDE controller) are investigated and compared in simulation. Also, the proposed controller
is compared with other optimization controller in this study. The simulation results and the
experimental verification show that the proposed controller leads to the smaller overshoot,
less setting time and rising time compared to other controllers in this study. The results also
show that the proposed controller can accelerate the response speed of BLDC motor,
strengthen the robustness and guarantee motor runs smoothly as well as precisely. This
work indicates the distinguished performance of proposed controller for the speed control
of BLDC motor

R. Dhanasekar s. Ganesh kumara and m. Rivera (2019) discovered improved


speed control of bldc motor using luo converter by sliding mode control explains the
concept of the classical buck converter for bldc motor applications do not meet the load
requirement containing more ripples on the output voltage and parasitic effects explains the
concept of brushless dc (bldc) motor is commonly employed for many industrial
applications due to their high torque and efficiency. This article produces an optimal
designed controller of brushless dc motor speed control depending on the genetic algorithm
(ga). The optimization method is used for searching of the ideal proportional–integral-
derivative (pid) factors. The controller design methods of brushless dc motor includes three
kinds: trial and error pid design, auto-tuning pid design and genetic algorithm based
controller design. A pid controller is utilizing by conducted integral absolute error criterion
(iae) and integral squared error (ise) error criterion for bldc motor control system. rapid
controller is designed to enhance the system performance by means of genetic algorithm.
Pid controller coefficients (���� , ������ ���� ) are calculated by ga to produce optimal pid as
hybrid pid with ga controller .the closed loop speed response of PID controller is

9
experimented for IAE and ISE error criteria. The suggested controller GA_PID is planned,
modeled and simulated by MATLAB/ software program. A comparison output system
performance monitored for every controller schemes. The results display that the time
characteristics performance of GA-PID controller based on ISE objective function has the
optimal performance (rise time, settling time, percentage overshoot) with other
techniques.In order to overcome this effect, the additional filter elements are added in the
luo-converter to eliminate the output ripples and effectively enhance the output voltage
level. the output stage of the luo converter is comprised of an inductor and capacitor so it
naturally acts as filter. the output stage stores and delivers energy to the load and smoothens
the output voltage to produce a constant output voltage. the luo converter acts as both buck
and boost converter by varying the duty cycle. thus this luo converter is used for the
proposed bldc motor drive. the sliding mode controller is used to make the speed of the
system constant in a small amount of time.

Muhammed a.ibrahim , ausama kh. Mahmood , nashwan saleh sultan (2019)


discovered optimal pid controller of a brushless dc motor using genetic algorithm
explains the concept of brushless dc (BLDC) motor is commonly employed for many
industrial applications due to their high torque and efficiency. This article produces an
optimal designed controller of Brushless DC motor speed control depending on the genetic
algorithm (GA). The optimization method is used for searching of the ideal
Proportional–Integral-Derivative (PID) factors. The controller design methods of brushless
DC motor includes three kinds: trial and error PID design, auto-tuning PID design and
genetic algorithm based controller design. A PID controller is utilizing by conducted
Integral absolute error criterion (IAE) and integral squared error (ISE) error criterion for
BLDC motor control system. A GA-PID controller is designed to enhance the system
performance by means of genetic algorithm. PID controller coefficients (���� , ������ ���� ) are
calculated by GA to produce optimal PID as hybrid PID with GA controller .The closed

10
loop speed response of PID controller is experimented for IAE and ISE error criteria. The
suggested controller GA_PID is planned, modeled and simulated by MATLAB/ software
program. A comparison output system performance monitored for every controller schemes.
The results display that the time characteristics performance of GA-PID controller based on
ISE objective function has the optimal performance (rise time, settling time, percentage
overshoot) with other techniques

Zhi qi, qian shi and hui zhang (2019) discovered tuning of digital pid controllers
using particle swarm optimization algorithm for a can-based dc motor subject to
stochastic delays explains the concept of the tuning problem of digital proportional-
integral-derivative (pid) parameters for a dc motor controlled via the controller area
network (can). First, the model of the dc motor is presented with its parameters being
identified with experimental data. By studying the can network characteristics, we obtain
the can-induced delays related to the load rate and the priorities. Then, considering the
system model, the network properties, and the digital pid controller, the tuning problem of
pid parameters for the can-based dc motor is transformed into a design problem of a static-
output-feedback controller for a time-delayed system. To solve this problem, particle
swarm optimization algorithm and linear-quadratic-regulator method are adopted by
incorporating the sufficient condition of time-varying delay system. Finally, the
effectiveness of the proposed pid tuning strategy is validated by experimental results.

Tarek hassanmohamed and mohamed abdelhamid mohamedalamin ,ammar and


m.hassa (2017) discovered adaptive position control of a cart moved by a dc motor
using integral controller tuned by jaya optimization with balloon effect explains the
concept of this study suggests an adaptive linear position control of a car moved by an
armature-controlled dc motor. In this study, jaya optimization algorithm supported by
balloon effect (be) is used to tune the parameters of the controller of the car position. Be is
introduced to improve response of the classical jaya algorithm in face of the external
11
disturbance and system parameters changes. In the suggested technique, an objective
function (of) of the modified jaya depends on the updated values of the controller gains and
identified value of the motor open loop transfer function. System with the suggested
controller has been evaluated in case of step load disturbance and motor parameters
changes. Simulation and experimental results supported that suggested adaptive controller
using modified jaya improved the total system performance at moments of load disturbance
and uncertainties of system parameters.

Falih.S.M. Alkhafaj , W. Z. Wan Hasan , M.M. Isa, N. Sulaiman (2019)


discovered A response time reduction for DC motor controller using SISO technique
explains the concept of In an industrial controller, over five decades there are many
attempts had been proposed to improve a method of tuning proportional gains of PID
controller. Where in the review there is a very little attention have been paid to use
satisfactory tuning to get maximum performance. This paper proposes an alternative
solution to maximize optimization for a controller-based DC motor. The novel
methodology relies on merge proper tuning with optimization using SISO-Optimization
technique-based tune ). The comparative study has been done by utilizing classical tuning
methods Z N, SIMC, CHR, and AMIGO, to obtain suitable tuning to be joined with. The
proposed PID controller was examined in term of response time characteristics. This
strategy provides a superior reduction in peak overshoot Pos, dead time td, rise time tr,
settling time ts, and peak time tp, that could be utilized to improve the responses of a DC
motor controller. Based on comparison results, it was founded that a CHR based
SISO_optimization playing a superior role over others in term of Pos 0%, td 0.1811µsec., tr
17.2 µsec, ts30.7 µsec, tp 80 µsec, and the number of iterations filter No 9.Ultimatly,this
work overcome the majority of previouse work that related with this approach.

Fadhil A. Hasan, Lina J. Rashad (2019) discovered Fractional-order PID


controller for permanent magnet DC motor based on PSO algorithm explains the
12
concept of this paper proposes the fractional-order proportional integral derivative (FOPID)
controller, as a speed controller for permanent magnet direct current (PMDC) motor,
instead of the traditional integer-order PID controller. The FOPID controller is the general
form of the integer-order PID controllers, which found wide applications in all engineering
fields. In this work a hybrid M-file and SIMULINK program is developed to simulate the
overall system, the FOPID controller has five associated parameters. The optimum values
of those parameters are found out by using particle swarm optimization technique.
Simulation results show excellent command speeds tracking and superior dynamic response
in conjunction with that of the integer-order PID controller. The proposed controller shows
a high ability to overcome any external disturbance the system may be exposed; also, it
performs a high degree of robustness to control the system in motoring and regenerative
operating mode.

Bonzou adolphe kouassi; yiming zhang; sie ouattara; mesmin j. Mbyamm kiki (2019)
discovered PID tuning of chopper fed speed control of dc motor based on ant colony
optimization algorithm explains the concept of problems of optimization are very important
for both the worlds of sciences and industry. Owing to their practicality such as tiny
dimensions, velocity, lower building costs, safety operations, dc motor has been used as a
key aspect of industrial applications.

However, it is hard to acquire the correct controlling parameter values. The most
common control is the pid (proportional-integrated-derivative) controller due to its
efficiency and simple operation. this paper provides an approach of determining the
optimum control parameters of pid for the chopper fed speed motor control using the
ant colony optimization (aco). The efficiency and validity of the design method based
on aco are shown in the simulation outcomes.

13
CHAPTER 3

SYSTEM ANALYSIS

3.1 EXISTING SYSTEM

Facing the control difficulties caused by high order dynamics, nonlinearity and
multi-source disturbances, the traditional cascade PI control strategy for SST cannot ensure
the satisfactory control performance, especially under the condition of the wide-range load
regulation. Many improved and advanced control strategies have been developed to handle
the aforementioned difficulties. Some improved control strategies based on cascade PI
control strategy have been proposed, such as neuro PID and also developed to enhance the
control performance. Even though the control effect was demonstrated in numerical
simulations, these control strategies were rarely used in practical units due to the following
reasons:

(1) These control strategies have a large computation complexity and thus makes them
difficult to be implemented in the platform of the distributed control system (DCS).

(2) Some control strategies have a strong dependence on the accurate mathematical model
of SST while the accurate SST model is very hard to obtain and it changes with the
working condition

3.1.1 DISADVANTAGES

· Arduino uno is the heart of the circuit. If controller is damaged the whole system will
be interrupt

14
3.2 PROPOSED SYSTEM

In the proposed systems, microcontroller plays a vital role in the smart


systems development. Microcontrollers have become an essential part in the
present technologies that are being presented daily. This article discusses
temperature based fan speed control and monitoring system using an Arduino
system.This system is used to control the cooling system automatically based
on the room temperature. The system uses an Arduino board to implement a
control system. Since this system is proposed to control the cooling system and
it is very important to know Arduino controlled system well.

3.2.1 ADVANTAGES

· Increases the PWM frequency which in turn

· Increases average motor current, and the fan speeds up

3.3 DESCRIPTION

The temperature-based fan speed control system can be done by using an


electronic circuit using an Arduino board. Now Arduino board is very
progressive among all electronic circuits, thus we employed Arduino
board for fan speed control. The proposed system is designed to detect the
temperature of the room and send that information to the Arduino board. Then
the Arduino board executes the contrast of current temperature and set
temperature based on the inbuilt program of the Arduino.

The outcome obtained from the operation is given through the o/p port of an
Arduino board to the LCD display of related data. The generated pulses from

15
the board which is further fed to the driver circuit to get the preferred output
to the fan.

3.4 PULSE WIDTH MODULATION (PWM):


Pulse Width Modulation, or PWM, is a technique for getting analog results
with digital means. Digital control is used to create a square wave, a signal
switched between on and off. This on-off pattern can simulate voltages in
between full on (5Volts) and off (0 Volts) by changing the portion of the time the
signal spends on versus the time that the signal spends off. The duration of "on
time" is called the pulse width. To get varying analog values, we change, or
modulate, that pulse width. If we repeat this on-off pattern fast enough with an
LED for example, the result is as if the signal is a steady voltage between 0 and 5v
controlling the brightness of the LED. In the graphic below, the green lines
represent a regular time period. This durationor period is the inverse of the PWM
frequency.

Fig.3.1 Pulse Width Modulation

16
CHAPTER 4

SYSTEM IMPLEMNENTATION

4.1 ARCHITECTURAL STRUCTURE

LCD Display

(Temperature
sensor)

PIR SENSOR
Arduino
Board FAN

Fig 4.1 Block diagram of proposed system

The above figure represents the block diagram representation of the proposed
concept. The temperature sensor DHT11 is interfaced with Arduino to fetch the data of
temperature in the room. The data is processed if the temperature is high fan speed is more
relatively if the temperature is low fan speed is low. Moreover, if the temperature is below
the threshold set then fan will be in off condition. The data related to temperature, fan speed

17
is displayed on the LCD for user interaction. The fan speed is controlled relatively with the
temperature using PWM pins available on the Arduino. As duty cycle of PWM signal
increases the fan speed increases and the same is true conversely.

4.2 CIRCUIT DIAGRAM

Fig.4.2 Circuit diagram ofTemperature based fan speed controller

Description:

I used an LCD shield to display the current temperature and speed of the fan, but
you can use the circuit without the LCD display. You also need to select the
transistor by the type offan that you use. In my case I used the well-known BD139
transistor and a 9V battery to provide power to the fan and transistor. The LM35
temperature sensor and red led are powered with 5V from the Arduino board.

18
As you can see in the sketch on the first line I included the Liquid Crystal library
(header) that includes useful functions to use when an LCD is connected to the
Arduino board. Then I setthe pins for the sensor, led and fan.

The most important part is to set the variables temp Min andtemp Max with
your desired values. Temp Min is the temperature at which the fan starts to spin
andtemp Max is the temperature when the red led lights warning you that the
maximum temp was reached. For example if you set tempMin at 30 and tempMax
at 35 thenthefanwillstartspinningat30°Candreachitsmaximum speed at 35°C.

We store the temperature value in the temp variable and then use some if()
functions to check if temp is lower than temp Min and if so let the fan OFF
(LOW). The next if() is to check if temperature is higher than the min Temp and
lower than the temp Max and if so then use the map() function to re-map the temp
value from one value to another. In our case fan Speed will havea value of 32 at
temp Min and 255 at tempMax. These values are used to control the speed of the
fan using PWM and the analog Write().

The fan LCD re-maps the temp to allow the display of fanSpeed ina 0 to 100%
range so you can say that the speed of the fan is directly dependent of the LM35’s
temperature. When the temperature reaches the value set in tempMax the fan will
be at its maximum spinning velocity and the LCD will display FANS:100%
even though the temperature might increase above tempMax.

19
The rest of the explanation can be read in the comments area of the Arduino
sketch. In the next project I will make a temperature protection circuitthat will turn
off the power of equipment when its temperature has reached a certain value.

4.3 APPLICATION:

1. Temperature based fan speed controller is useful for cooling the processor in
the laptops and personal computers “more efficiently”. Generally, fan in laptop
comes with only two or three possible speeds. So, it results in more power
consumption.

2. The fan designed in this project, has different values of speed according to
temperature change. This can be also used in small scale industries for cooling the
electrical/mechanical equipment. The whole circuit except motor and fan can be
manufactured on a single PCB, and it can be used for temperature-based control
operations.
ADVANTAGES:

1. This project can be used in Home.

2. This project can be used in Industry.

3. This will help in saving the energy / electricity.

4. To monitor the environments that is not comfortable, or possible, for humans

to monitor, especially for extended periods of time.


5. Prevents waste of energy when it’s not hot enough for a fan to be needed.

6. To assist people who are disabled to adjust the fan speedautomatically.

DISADVANTAGES:
1. It can only be maintained by technical person. Thus, itbecomes difficult to
20
be maintained.

2. Due to temperature variation, after sometimes itsefficiency may decrease.

4.4 HARDWARE IMPLEMENTATION

4.4.1 TEMPERATURE SENSOR:

We are using LM 35 as temperature sensor. LM 35 is a precision temperature


sensor whose output is linearly proportional to Celsius Temperature. The LM35 is
rated to operate from -55° Centigrade to 150° Centigrade with a linear scale
factor of

+10mv/° C

Fig 4.3 temperature sensor

FEATURES:
 Calibrated directly in degree Celsius (centigrade)
 Linear +10.0 mV/ degree Celsius
21
 0.5 degree Celsius accuracy (at +25degree Celsius)
 Rated for full -55-to-+150-degree Celsius range
 Suitable for remote applications
 Low cost due to wafer-level trimming
 Operates from 4 to 30 volts

 Less than 60 Micro ampere current drains


 Low self-heating, 0.08 degree Celsius in still air
 Nonlinearity only +/- 1/4 degree Celsius typical
 Low impedance output, 0.1 Ohm for 1mA load

4.4.2 LIQUID CRYSTAL DISPLAY:

The LCD is a dot matrix liquid crystal display that displays alphanumeric
characters and symbols. 16X2 LCD digital display has been used in the system
to show the room temperature. Liquid Crystal Display screen is an electronic
display module and find a wide range of applications. A 16x2 LCD display is very
basic module and is very commonly used in various devices and circuits. These
modules are preferred over sevensegments and other multi segment LEDs. The
reasons being: LCDs are economical; easily programmable; have no limitation
of displaying special & evencustom characters (unlike in seven segments),
animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such
lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has
two registers, namely, Command and Data.The command register stores the
command instructions given to the LCD. A command is an instruction given to
LCD to doa predefined task like initializing it, clearing its screen, setting the cursor

22
position, controlling display etc. The data register stores the data to be displayed on
the LCD. The data is the ASCII value of the character to be displayed on the LCD.

Fig.4.4 16x2 LCD

PIN DESCRIPTION:

Pin Function Name


No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
23
3 Contrast adjustment; through a variable VEE
Resistor

4 Selects command register when low; and data register Register


when high Select
Low to write to the register; High to read from the
5 Read/write
register

6 Sends data to data pins when a high to low Enable


pulse is given
7 DB0
8 DB1
9 DB2
10 8-bit data pins DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

4.4.3 ARDUINO UNO BASIC INFORMATION:


Arduino is an open-source electronics platform based on easy- to-use
hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger
on a button, or a Twitter message - and turn it into an output - activating a motor,
turning on an LED, publishing something online. You can tell your board what to do
by sending a set of instructions to the microcontroller on the board. To do so you use the

24
Arduino programming language (based on Wiring), and the Arduino Software (IDE), based
on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers -
students, hobbyists, artists, programmers, and professionals - has gathered around
this open-source platform, their contributions have added up to an incredible
amount of accessible knowledge that can be of great help to novices and experts alike.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming.
As soon as it reached a wider community, the Arduino board started changing to
adaptto new needs and challenges, differentiating its offer from simple 8-bit boards
to products for IoT applications, wearable,3D printing, and embedded environments.
All Arduino boards are completely open-source, empowering users to build them
independently and eventually adapt them to their particular needs. The
software, too, is open-source, and it is growing through the contributions of users
worldwide its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use
for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and
Linux. Teachers and students use it to build low- c o s t scientific instruments,
to prove chemistry and physics principles, or to get started with programming and
robotics. Designers and architects build interactive prototypes, musicians and artists
use it for installations and to experiment with new musical instruments. Makers, of
course, use it to build many of the projects exhibited at the Maker Faire, for
example. Arduino is a key tool to learn new things. Anyone - children, hobbyists,
artists, programmers - can start tinkering just following the step- b y - s t e p

25
instructions of a kit, or sharing ideas online with other members of the Arduino
community.

There are many other microcontrollers and microcontroller platforms


available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets,
MIT's Handyboard, and many others offer similar functionality. All of these tools take the
messy details of microcontroller programming and wrap it up inan easy-to-use package.

Arduino also simplifies the process of working with microcontrollers, but it offers some
advantage for teachers, students, and interested amateurs over other systems:

1.Inexpensive - Arduino boards are relatively inexpensive compared to other


microcontroller platforms. The least expensive version of the Arduino module can be
assembled byhand, and even the pre-assembled Arduino modules cost less than $50

2.Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh


OSX, and Linux operating systems. Most microcontroller systems are limited to
Windows.
3.Simple, clear programming environment - The Arduino Software (IDE) is easy-
to-use for beginners, yet flexible enough for advanced users to take advantage of as
well. For teachers, it's conveniently based on the Processing programming
environment, so students learning to program in that environment will be familiar
with how the Arduino IDE works.
4.Open source and extensible software - The Arduino software is published as
open source tools, available for extension by experienced programmers. The
language can be expanded through C++ libraries, and people wanting to understand
the technical details can make the leap from Arduino to the AVRC programming
language on which it's based. Similarly, you can add AVR-C code directly into
your Arduino programs ifyou want to.

26
5.Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commonslicense, so experienced circuit designers can
make theirown version of the module, extending it and improving it. Even relatively
inexperienced users can build the breadboard version of the module in order to
understand how it works and save money.

27
Fig.4.5 Arduino UNO

Arduino is an open-source platform used for building electronics papers.


Arduino consists of both a physical programmable circuit board (often referred
to as a microcontroller) and a piece of software, or IDE (Integrated
Development Environment) that runs on your computer, used to write and
upload computer code to the physical board.
The Arduino platform has become quite popular with people just starting out
with electronics, and for good reason. Unlike most previous programmable
circuit boards, the Arduino does not need a separate piece of hardware (called a
programmer) in order to load new code onto the board – you can simply use a
USB cable. Additionally, the Arduino IDE uses a simplified version of C++,
making it easier to learn to program. Finally, Arduino provides a standard form
factor that breaks out the functions of the microcontroller into a more accessible
package. The Arduino is a microcontroller board based on the ATmega8. It has
14 digital -input/output pins (of which 6 can be used as PWM outputs), 6 analog

28
inputs, a 16 MHz ceramic resonator, 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 a AC-to-DC adapter
or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-
to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to
version R2) programmed as a USB-to-serial converter. Revision 2 of the Uno
board has a resistor pulling the 8U2 HWB line to ground, making it easier to put
into DFU mode. Revision of the board has the following new features:
• 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two
other new pins placed near to the RESET pin, the IOREF that allow the shields
to adapt to the voltage provided from the board. In future, shields will be
compatible with both the board that uses the AVR, which operates with 5V and
with the Arduino Due that operates with 3.3V. The second one is a not
connected pin that is reserved for future purposes.
4.4.4 SPECIFICATIONS

Microcontroller : ATmega328

Operating Voltage
(recommended)
(limits)
Voltage
Input
6-20V
: 5V : : 7-12V

Digital I/O Pins : 14 (of which 6 provide


PWMoutput)

Analog Input Pins 6

DC Current per I/O Pin :40 mA

DC Current for 3.3V Pin :50 mA

Flash Memory :32 KB of which 0.5 KB used by

29
: Bootloader

SRAM :2 KB

EEPROM :1 KB

Clock Speed :16 MHz

4.4.5 GENERAL PIN FUNCTIONS:

1.LED: There is a built-in LED driven by digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
2.VIN: The input voltage to the Arduino/Genuino board when it's
using an external power source (as opposed to 5 volts from the USB
connection or other regulated power source). You can supply voltage
through this pin, or, if supplying voltage via the power jack, access it
through this pin.
3.5V: This pin outputs a regulated 5V from the regulator on the board.
The board can be supplied with power either from the DC power jack (7 -
20V), the USB connector (5V), or the VIN pin of the board (7-20V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and
can damage the board.
4.3V3: A 3.3-volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
5.GND: Ground pins.
6.IOREF: This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly
configured shield can read the IOREF pin voltage and select the
appropriate power source or enable voltage translators on the outputs to
work with the 5V or 3.3V.
7.Reset: Typically used to add a reset button to shieldswhich block
the one on the board.

30
4.4.6 SPECIAL PIN FUNCTIONS

Each of the 14 digital pins and 6 Analog pins on the Uno can be
used as an input or output, using pinMode(),digitalWrite(), and
digitalRead() functions. They operate at 5 volts. Each pin can provide
or receive 20 mA as recommended operating condition and has an
internal pull-up resistor (disconnected by default) of 20-50k ohm. A
maximum of 40mA is the value that must not be exceeded on any I/O
pin to avoid permanent damage to the microcontroller.The Uno has 6
analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure
from ground to 5 volts, though is it possible to change the upper end
of their range using the AREF pin and the analogReference() function.

In addition, some pins have specialized functions:

1.Serial: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX)
TTL serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.
2.External Interrupts: pins 2 and 3. These pins can be configured to
trigger an interrupt on a low value, a rising or falling edge, or a change in
value.
3.PWM(Pulse Width Modulation) 3, 5, 6, 9, 10, and 11 Can provide 8-bit
PWM output with the analogWrite() function.
4.SPI(Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12
(MISO), 13 (SCK). These pins support SPI communication using
the SPI library.

31
5.TWI(Two Wire Interface): A4 or SDA pin and A5 or SCL pin. Support
TWI communication using the Wire library.
 AREF(Analog REFerence: Reference voltage for the analog
inputs.

4.4.7 COMMUNICATION:

The Arduino/Genuino Uno has a number of facilities for


communicating with a computer, another Arduino/Genuino board, or
other microcontrollers. The ATmega328 provides UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1
(TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software
on the computer. The 16U2 firmware uses the standard USB COM
drivers, and no external driver is needed. However, on Windows, a .inf
file is required. The Arduino Software (IDE) includes a serial monitor
which allows simple textual data to be sent to and from the board. The
RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the
computer (but not for serial communication on pins 0 and 1). A
SoftwareSerial library allows serial communication on any of the Uno's
digital pins.

4.4.8 AUTOMATIC (SOFTWARE) RESET:

Rather than requiring a physical press of the reset buttonbefore


an upload, the Arduino/Genuino Uno board is designed in a way that
allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of the

32
ATmega8U2/16U2 is connected to the reset line of the ATmega328 via
a 100 nanofarad capacitor. When this line is asserted (taken low), the
reset line drops long enough to reset the chip.

This setup has other implications. When the Uno is connected to either
a computer running Mac OS X or Linux, it resets each time a
connection is made to it from software (via USB). For the following
half-second or so, the bootloader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload
of new code), it will intercept the first few bytes of data sent to the
board after a connection is opened.

4.5 PIR SENSOR

A passive infrared sensor (PIR sensor) is an electronic sensor that


measures infrared (IR) light radiating from objects in its field of view. They are
most often used in PIR-based motion detectors. PIR sensors are commonly used
in security alarms and automatic lighting applications.

PIR sensors detect general movement, but do not give information on


who or what moved. For that purpose, an imaging IR sensor is required.

PIR sensors are commonly called simply "PIR", or sometimes "PID", for
"passive infrared detector". The term passive refers to the fact that PIR devices
do not radiate energy for detection purposes. They work entirely by
detecting infrared radiation (radiant heat) emitted by or reflected from objects.

All objects with a temperature above


emit heat energy in the form of electromagnetic radiation. Usually, this
radiation isn't visible to the human eye because it radiates at infrared

33
wavelengths, but it can be detected by electronic devices designed for such a
purpose.

4.5.1 OPERATION

A PIR sensor can detect changes in the amount of infrared radiation


impinging upon it, which varies depending on the temperature and surface
characteristics of the objects in front of the sensor. When an object, such as a
person, passes in front of the background, such as a wall, the temperature at that
point in the sensor's field of view will rise from room temperature to body
temperature, and then back again. The sensor converts the resulting change in
the incoming infrared radiation into a change in the output voltage, and this
triggers the detection. Objects of similar temperature but different surface
characteristics may also have a different infrared emission pattern, and thus
moving them with respect to the background may trigger the detector as well.

PIRs come in many configurations for a wide variety of applications. The most
common models have numerous Fresnel lenses or mirror segments, an effective
range of about 10 meters (30 feet), and a field of view less than 180. Models
with wider fields of view, including 360°, are available, typically designed to
mount on a ceiling. Some larger PIRs are made with single segment mirrors and
can sense changes in infrared energy over 30 meters (100 feet) from the PIR.
There are also PIRs designed with reversible orientation mirrors which allow
either broad coverage (110° wide) or very narrow "curtain" coverage, or with
individually selectable segments to "shape" the coverage.

4.5.2 PRODUCT DESIGN

The PIR sensor is typically mounted on a printed circuit board containing


the necessary electronics required to interpret the signals from the sensor itself.
The complete assembly is usually contained within a housing, mounted in a
location where the sensor can cover the area to be monitored.

34
The housing will usually have a plastic "window" through which the
infrared energy can enter. Despite often being only translucent to visible light,
infrared energy is able to reach the sensor through the window because the
plastic used is transparent to infrared radiation. The plastic window reduces the
chance of foreign objects (dust, insects, etc.) from obscuring the sensor's field of
view, damaging the mechanism, and/or causing false alarms. The window may
be used as a filter, to limit the wavelengths to 8-14 micrometres, which is
closest to the infrared radiation emitted by humans. It may also serve as a
focusing mechanism;

When used as part of a lighting system, the electronics in the PIR typically
control an integral relay capable of switching mains voltage. This means the
PIR can be set up to turn on lights that are connected to the PIR when
movement is detected. This is most commonly used in outdoor scenarios either
to deter criminals (security lighting) or for practical uses like the front door light
turning on so you can find your keys in the dark.

Additional uses can be in public toilets, walk-in pantries, hallways or anywhere


that automatic control of lights is useful. This can provide energy savings as the
lights are only turned on when they are needed and there is no reliance on users
remembering to turn the lights off when they leave the area.

4.5.3 SECURITY APPLICATIONS

When used as part of a security system, the electronics in the PIR


typically control a small relay. This relay completes the circuit across a pair
of electrical contacts connected to a detection input zone of the burglar alarm
control panel. The system is usually designed such that if no motion is being
detected, the relay contact is closed—a 'normally closed' (NC) relay. If motion
is detected, the relay will open the circuit, triggering the alarm; or, if a wire is
disconnected, the alarm will also operate.

35
4.5.4 PLACEMENT

Manufacturers recommend careful placement of their products to prevent


false alarms (i.e., any detection not caused by an intruder).

They suggest mounting the PIRs in such a way that the PIR cannot "see" out of
a window. Although the wavelength of infrared radiation to which the chips are
sensitive does not penetrate glass very well, a strong infrared source (such as
from a vehicle headlight or sunlight) can overload the sensor and cause a false
alarm. A person moving on the other side of the glass would not be "seen" by
the PID. That may be good for a window facing a public sidewalk, or bad for a
window in an interior partition.

It is also recommended that the PIR not be placed in such a position that
an HVAC vent would blow hot or cold air onto the surface of the plastic which
covers the housing's window. Although air has very low emissivity (emits very
small amounts of infrared energy), the air blowing on the plastic window cover
could change the plastic's temperature enough to trigger a false alarm.

Sensors are also often designed to "ignore" domestic pets, such as dogs or cats,
by setting a higher sensitivity threshold, or by ensuring that the floor of the
room remains out of focus.

Since PIR sensors have ranges of up to 10 meters (30 feet), a single detector
placed near the entrance is typically all that is necessary for rooms with only a
single entrance. PIR-based security systems are also viable in outdoor security
and motion-sensitive lighting; one advantage is their low power draw, which
allows them to be solar-powered

4.5.5 PIR REMOTE BASED THERMOMETER

Designs have been implemented in which a PIR circuit measures the


temperature of a remote object. In such a circuit, a non-differential PIR output is
used. The output signal is evaluated according to a calibration for the IR
36
spectrum of a specific type of matter to be observed. By this means, relatively
accurate and precise temperature measurements may be obtained remotely.
Without calibration to the type of material being observed, a PIR thermometer
device is able to measure changes in IR emission which correspond directly to
temperature changes, but the actual temperature values cannot be calculated.

Fig 4.6 PIR SENSOR

4.5.6 DC MOTOR

A DC motor is any of a class of rotary electrical motors that converts direct


current electrical energy into mechanical energy. The most common types rely
on the forces produced by magnetic fields. Nearly all types of DC motors have
some internal mechanism, either electromechanical or electronic, to periodically
change the direction of current in part of the motor. DC motors were the first
form of motor widely used, as they could be powered from existing direct-
current lighting power distribution systems. A DC motor's speed can be
controlled over a wide range, using either a variable supply voltage or by
changing the strength of current in its field windings. Small DC motors are used
in tools, toys, and appliances. The universal motor can operate on direct current
but is a lightweight brushed motor used for portable power tools and appliances.
Larger DC motors are currently used in propulsion of electric vehicles, elevator
and hoists, and in drives for steel rolling mills. The advent of power

37
electronics has made replacement of DC motors with AC motors possible in
many applications.

Fig 4.7 DC Motor

4.5.7 POWER SUPPPLY

A power supply is an electrical device that supplies electric power to


an electrical load. The primary function of a power supply is to convert electric
current from a source to the correct voltage, current, and frequency to power the
load. As a result, power supplies are sometimes referred to as electric power
converters. Some power supplies are separate standalone pieces of equipment,
while others are built into the load appliances that they power. Examples of the
latter include power supplies found in desktop computers and consumer
electronics devices. Other functions that power supplies may perform include
limiting the current drawn by the load to safe levels, shutting off the current in
the event of an electrical fault, power conditioning to prevent
or voltage surges on the input from reaching the load, power-factor correction,
and storing energy so it can continue to power the load in the event of a
temporary interruption in the source power (uninterruptible power supply). The
source power may come from theelectric power grid, such as an electrical outlet,
energy storage devices such as batteries
or alternators, solar power converters, or another power supply. The input and
output are usually hardwired circuit connections, though some power supplies
employ wireless energy transfer to power their loads without wired connections.

38
Some power supplies have other types of inputs and outputs as well, for
functions such as external monitoring and control.

Fig 4.7 Power Supply

CHAPTER 5

SOFTWARE IMPLEMENTATION

5.1 ALGORITHM:

 Set the baud rate as 9600 for serial communication.


Includethe LCD.h and DHT11 header file in the sketch.
 Read the value from the DHT11 temperature sensor and store it in a variable
temp_sens.
Comparethestoredvaluewiththethresholdset to switch ON the fan.
 Iftemperaturesensorvalueislessthan26°C motor will be in the OFF state.
 If temperature sensor value is equal to 26°C motor will be in the ON state and
will be rotating at 20% of its maximum speed.
 If temperature sensor value is equal to 27°C motor will be in the ON state and
will be rotating at 40% of its maximum speed.
 If temperature sensor value is equal to 28°C motor will be in the ON state and
will be rotating at 60% of its maximum speed.
 If temperature sensor value is equal to 29°C motor will be in the ON state and
will be rotating at 80% of its maximum speed.

39
 If temperature sensor value is greater than 29°C motor will be in the ON state
and will be rotating at 100% of its maximum speed.
 Monitor the temperature continuously and take the necessary action
depending upon the value of sensor.

CODE

#include <LiquidCrystal.h>
LiquidCrystallcd(7,6,5,4,3,2);

inttempPin = A1; // the output pin of


LM35int fan = 11; // the pin where fan
is int led = 8; // led pin

int temp;

inttempMin = 30; // the temperature to start the fan

inttempMax = 70; // the maximum temperature when fan is


at100%

intf
anS
pe
ed; i
ntfa
nL
CD;

void setup() {
pinMode(fan,

40
OUTPUT);
pinMode(led,
OUTPUT);
pinMode(tempPin,
INPUT);
lcd.begin(16,2);

void loop() {

temp = readTemp(); // get the temperature

if(temp <tempMin) { // if temp is lower than minimum temp


fanSpeed = 0; // fan is not spinning digitalWrite(fan,
LOW);

if((temp >= tempMin) && (temp <= tempMax)) { // if temperatureis


higher than minimum temp

fanSpeed = map(temp, tempMin, tempMax, 32, 255); // the actual speed


of fan

fanLCD = map(temp, tempMin, tempMax, 0, 100); // speed of fanto


display on LCD

analogWrite(fan, fanSpeed); // spin the fan at the fanSpeedspeed

if(temp >tempMax) { // if temp is higher than


tempMaxdigitalWrite(led, HIGH); // turn on led

41
} else { // else turn
of leddigitalWrite(led, LOW);

lcd.print("TEMP: ");

lcd.print(temp); // display the


temperaturelcd.print("C ");

lcd.setCursor(0,1); // move cursor to next


linelcd.print("FANS: ");

lcd.print(fanLCD); // display the fan


speedlcd.print("%");

del
ay(
200)
; lc
d.cl
ear()
;

intreadTemp() { // get the temperature and convert it tocelsius

temp =
analogRead(tempPin);
return temp *
0.48828125;

42
5.2 SOFTWARE

In this system, following software’s are used,

1.ARDUINO IDE

2.LIBRARIES

3.EMBEDDED C

5.2.1 ARDUINO IDE

Arduino is a prototype platform (open-source) based on an easy-to-use


hardware and software. It consists of a circuit board, which can be programmed
(referred to as a microcontroller) and a ready-made software called Arduino
IDE (Integrated Development Environment), which is used to write and upload
the computer code to the physical board. Arduino provides a standard form
factor that breaks the functions of the micro-controller into a more accessible
package.

Arduino is a prototype platform (open-source) based on an easy-to-use


hardware and software. It consists of a circuit board, which can be programmed
(referred to as a microcontroller) and a ready-made software called Arduino
IDE (Integrated Development Environment), which is used to write and upload
the computer code to the physical board. The key features are:

· Arduino boards are able to read analog or digital input signals from
different sensors and turn it into an output such as activating a motor, turning
LED on/off, connect to the cloud and many other actions.

· You can control your board functions by sending a set of instructions to


the microcontroller on the board via Arduino IDE (referred to as uploading
software).

43
· Unlike most previous programmable circuit boards, Arduino does not
need an extra piece of hardware (called a programmer) in order to load a new
code onto the board. You can simply use a USB cable.

· Additionally, the Arduino IDE uses a simplified version of C++, making


it easier to learn to program.

· Finally, Arduino provides a standard form factor that breaks the


functions of the micro-controller into a more accessible package.

Various kinds of Arduino boards are available depending on different


microcontrollers used. However, all Arduino boards have one thing in common:
they are programmed through the Arduino IDE. The differences are based on
the number of inputs and outputs (the number of sensors, LEDs, and buttons
you can use on a single board), speed, operating voltage, form factor etc. Some
boards are designed to be embedded and have no programming interface
(hardware), which you would need to buy separately. Some can run directly
from a 3.7V battery, others need at least 5V.

Arduino consists of both a physical programmable circuit board (often


referred to as a microcontroller) and a piece of software, or IDE (Integrated
Development Environment) that runs on your computer, used to write and
upload computer code to the physical board. Arduino is an open-source
computer hardware and software company, project, and user community that
designs and manufactures single-board microcontrollers and microcontroller
kits for building digital devices and interactive objects that can sense and
control objects in the physical world. The project's products are distributed as
open-source hardware and software, which are licensed under the GNU Lesser
General Public License (LGPL) or the GNU General Public License (GPL)
44
permitting the manufacture of Arduino boards and software distribution by
anyone. Arduino boards are available commercially in preassembled form, or as
do-it-yourself (DIY) kits. Arduino board designs use a variety of
microprocessors and controllers. The boards are equipped with sets of digital
and analog input/output (I/O) pins that may be interfaced to various expansion
boards (shields) and other circuits. The boards feature serial communications
interfaces, including Universal Serial Bus (USB) on some models, which are
also used for loading programs from personal computers. The microcontrollers
are typically programmed using a dialect of features from the programming
languages C and C++. In addition to using traditional compiler tool cha ins, the
Arduino project provides an integrated development environment (IDE) based
on the Processing language project.

5.2.2 LIBRARIES

The Arduino environment can be extended through the use of libraries,


just like most programming platforms. Libraries provide extra functionality for
use in sketches, e.g. working with hardware or manipulating data. To use a
library in a sketch, select it from Sketch > Import Library. A number of libraries
come installed with the IDE, but you can also download or create your own. See
these instructions for details on installing libraries.

Standard Libraries Used

· Ethernet-for connecting to the internet using the Arduino Ethernet Shield,


Arduino Ethernet Shield 2 and Arduino Leonardo ETH.

· PCD8544 - for controlling or to communicate with Nokia 5110 lcd.

· Wi-Fi - for connecting to the internet using the Arduino Wi-Fi shield.

· Ubi-dot Library- to connect with ubidot.com.

5.2.3 EMBEDDED C

45
Embedded C is a set of language extensions for the C programming
language by the C Standards Committee to address commonality issues that
exist between C extensions for different embedded systems. Historically,
embedded C programming requires nonstandard extensions to the C language in
order to support exotic features such as fixed-point arithmetic, multiple distinct
memory banks, and basic I/O operations.

EMBEDDED PROGRAMMING

Embedded refers to the combination of hardware and software.


Embedded systems programming is the programming of an embedded system in
some device using the permitted programming interfaces provided by that
system. Embedded Java is an example of a development environment for
programming embedded systems that will execute Java programs. Arduino is a
very minute part of embedded systems; in fact, we can call it as an application
product of embedded system. Arduino is just any other microcontroller board,
with a specifically designed API and software which makes programming it
very easy. Arduino is just a drop of water in Embedded System Ocean.

46
CHAPTER 6

REULTS AND DISCUSSION

The following table depicts the results obtained by operating the


prototype model at various different temperatures. It defines the behaviour of
the embedded system about how it reacts to variation of temperature at real time.

Table 6.1 Results of embedded system designed

The following represents graphical representation of tabulated data.

Fig. 6.1 Temperature Vs Duty cycle

47
Fig. 6.2 Temperature Vs Speed of Fan

HARDWARE SETUP

48
CHAPTER 7

CONCLUSION

Arduino based temperature-controlled fan is implemented. Thus, here fan


speed has been controlled by using Pulse Width Modulation and Arduino board
according to the temperature sensed by the help of Temperature and Humidity
Sensor (DHT22). The idea of the project is to change the fan temperature
automatically. PWM technique is found to be the best technique for controlling
the fan speed using the sensed temperature. The system is working properly.
The speed of fan depends on the temperature and there is no need for regulating
the
fan speed manually again and again.

49
REFERENCES

• Deepa, M. U., and G. R. Bindu. "Performance analysis of BLDC motor


drive with power factor correction scheme." 2016 IEEE International
Conference on Power Electronics, Drives and Energy Systems (PEDES).
IEEE, 2016.

• Dhanasekar, R., et al. "Improved Source End Power Factor Enhancement


of BLDC Motor Using Bridgeless-Landsman Converter." 2018
International Conference on Computation of Power, Energy, Information
and Communication (ICCPEIC). IEEE, 2018.

• R.Babu Ashok and B.Mahesh Kumar, “Comparative analysis of BLDC


motor for different control topologies,”Energy Procedia 117, pp.314- 320,
May. 2017.

• Kumar, S. Ganesh, and S. Hosimin Thilagar. "Soft sensing of speed in


load torque estimation for boost converter fed DC motor." IECON 2013-
39th Annual Conference of the IEEE Industrial Electronics Society. IEEE,
2013.

• Mehta, N. D., A. M. Haque, and N. D. Mehta. "Design And Simulation


Of Luo Converter For Dc Motor Control For An Electric Vehicle

50
Applications." Int. J. Appl. Res. Sci. Eng. ISSN (Online Biomed. Med.
Sci. (2017): 57-61.

• Srinivasan, G.K. & Srinivasan, H.T (2013) “ Passivity Based control of


Luo converter”. Journal of Electrical Engineering, 13. 159-163.

• Khan, Asim Ali, and Nushkam Rapal. "Fuzzy PID controller: design,
tuning and comparison with conventional PID controller." 2006 IEEE
International Conference on Engineering of Intelligent Systems. IEEE,
2006.

• Hashim, Aamir. "Optimal speed control for direct current motors using
linear quadratic regulator." Journal of Engineering and Computer Science
(JECS) 14.2 (2019): 48-56.

• Mohamed, Tarek Hassan, Mohamed Abdelhamid Mohamed Alamin, and


Ammar M. Hassan. "Adaptive position control of a cart moved by a DC
motor using integral controller tuned by Jaya optimization with Balloon
effect." Computers & Electrical Engineering 87 (2020): 106786.

• Puangdownreong, Deacha. "Fractional order PID controller design for


DC motor speed control system via flower pollination algorithm." ECTI
Transactions on Electrical Engineering, Electronics, and
Communications 17.1 (2019): 14-23.

• Hasan, Md Asif, Raj Kumar Mishra, and Srishti Singh. "Speed Control of
DC Motor Using Adaptive Neuro Fuzzy Inference System Based PID
Controller." 2019 2nd International Conference on Power Energy,
Environment and Intelligent Control (PEEIC). IEEE, 2019.

51
• Agnihotri, Akshay, Rahul Sharma, and Harjit Pal Singh. "Performance
Analysis of DC motor using PID controller tuned by Metaheuristic
Techniques."

• Kouassi, Bonzou Adolphe, et al. "PID Tuning Of Chopper Fed Speed


Control Of DC Motor Based On Ant Colony Optimization
Algorithm." 2019 IEEE 3rd International Electrical and Energy
Conference (CIEEC). IEEE, 2019.

• Hasan, Fadhil A., and Lina J. Rashad. "Fractional-order PID controller for
permanent magnet DC motor based on PSO algorithm." International
Journal of Power Electronics and Drive Systems 10.4 (2019): 1724.

• Alkhafaji, Falih SM, et al. "A response time reduction for DC motor
controller using SISO technique." Indonesian Journal of Electrical
Engineering and Computer Science 17.2 (2020): 895-906.

• El-Saadawi, Magdi M., et al. "Identification and Speed Control of DC


Motor Using Fractional Order PID: Microcontroller." European Journal
of Electrical Engineering and Computer Science 4.1 (2020).

52

You might also like