You are on page 1of 57

METAL DETECTOR

A MINI PROJECT REPORT

Submitted by

DHANAEELAN G
AJAY V
in partial fulfillment of the requirement
for the award of the degree

of

BACHELOR OF ENGINEERING
in

ELECTRICAL AND ELECTRONICS ENGINEERING

SENGUNTHAR ENGINEERING COLLEGE


(AUTONOMOUS)
(Approved by AICTE, New Delhi & affiliated to Anna University, Chennai)
Recognized Under Section 2(f) & 12(B) of the UGC Act, 1956
NAAC Accredited with ‘A’ Grade
TIRUCHENGODE – 637 205

APRIL 2024
ii

SENGUNTHAR ENGINEERING COLLEGE


(AUTONOMOUS)
TIRUCHENGODE - 637 205

BONAFIDE CERTIFICATE

Certified that this mini project report titled “METAL DETECTOR” is


the bonafide work of DHANASE E L AN G (61232113004), and AJAY V
(61232113001) who carried
out the project under my supervision. Certified further, that to the best of my
knowledge the work reported herein does not form part of any other project
report or dissertation on the basis of which a degree or award was conferred on
an earlier occasion on this or any other candidate.

SIGNATURE SIGNATURE
Dr. K. Umadevi, M.Tech., Ph.D., Mr.G.Senthilrajan M.E.,
HEAD OF THE DEPARTMENT SUPERVISOR
Professor, Assistant Professor,
Department of EEE, Department of EEE,
Sengunthar Engineering College Sengunthar Engineering College
(Autonomous), (Autonomous),
Tiruchengode - 637 205. Tiruchengode - 637 205.

Submitted for the viva-voce examination held on ………………

Internal Examiner External Examiner


iii

DECLARATION

We jointly declare that the mini project report on “METAL


DETECTOR” is the result
of original work done by us and best of our knowledge, similar work has not
been submitted to “ANNA UNIVERSITY CHENNAI” for the requirement of
Degree of B.E. This mini project report is submitted on the partial fulfilment of
the requirement of the award of Degree of B.E.

Signature

DHANASEELAN G

AJAY V

Place: Tiruchengode

Date:
iv

ACKNOWLEDGEMENT
We wish to express our sincere gratitude to our honourable Chairman
Thiru. JANSONS. T. S. NATARAJAN, for providing immense facilities at
our institution.
We wish to express our heartfelt thanks to our honourable Secretary and
Correspondent Prof. A. BALADHANDAPANI, M.A., M.Phil., and other
respected trust members for providing us with all the facilities at our institution.

We would like to express special thanks of gratitude to our Chief


Executive Officer Er. A. B. MADHAN M.E., who has been the key spring of
motivation to us throughout the completion of our course and project work.

We are very proudly rendering our thanks to our Principal


Dr. R. SATISHKUMAR M.E., Ph.D., for the facilities and the encouragement given
by him to the progress and completion of our project.

We proudly render our immense gratitude to the Head of the


Department Dr. K. UMADEVI, M.Tech., Ph.D., for his effective leadership,
encouragement and guidance in the project.

We are highly indebted to provide our heart full thanks to our


supervisor Mr. R. PRABHU M.E., for his valuable ideas, encouragement and
supportive guidance throughout the project.

We wish to extend our sincere thanks to all faculty members of our


EEE Department for their valuable suggestions, kind co-operation and constant
encouragement for successful completion of this project.

We wish to acknowledge the help received from various Departments


and various individuals during the preparation and editing stages of the
manuscript.
v

ABSTRACT

Title: Advancements in Metal Detection Technology: A Review

Metal detection technology has seen significant advancements over the years, driven by
diverse applications ranging from security screening to archaeological exploration and
industrial purposes. This paper provides a comprehensive review of recent developments in
metal detection technology, focusing on innovations in sensor design, signal processing
techniques, and application-specific adaptations.

The evolution of metal detectors from simple analog systems to sophisticated digital devices
has led to improved sensitivity, reliability, and versatility. New sensor materials and
configurations have enhanced detection capabilities, allowing for the identification of smaller
and deeper buried metal objects. Additionally, advancements in signal processing algorithms
have enabled better discrimination between metallic and non-metallic targets, reducing false
alarms and improving overall detection accuracy.

Furthermore, this review explores emerging trends such as the integration of artificial
intelligence and machine learning algorithms into metal detection systems, enabling adaptive
and autonomous operation in dynamic environments. Additionally, the utilization of
multisensor fusion techniques and the integration of complementary sensing modalities, such
as ground-penetrating radar and electromagnetic induction, have shown promise in
enhancing detection performance and target characterization.

The application-specific adaptations of metal detection technology are also discussed,


including its role in security screening, archaeological surveys, treasure hunting, construction,
and geophysical exploration. Case studies highlighting the successful deployment of
advanced metal detection systems in real-world scenarios are presented to illustrate their
practical significance and potential impact across various industries.
vi

TABLE OF CONTENTS

CHAPTER TITLE PAGE NO.

ABSTRACT v

LIST OF TABLES ix

LIST OF FIGURES x

LIST OF SYMBOLS AND ABBREVIATIONS


xii
1 INTRODUCTION 1

1.1 OVERVIEW OF THE PROJECT 1

1.2 SCOPE AND OBJECTIVES 3

1.3 THEME OF THE PROJECT 3

1.4 ALGORITHM 4

1.5 PREFACE OF THE PROJECT 4

1.6 SUMMARY 4

2 LITERATURE SURVEY 4

2.1 INTRODUCTION 5

2.2 LITERATURE SURVEY 5

2.2 CONCLUSIONS FROM THE LITERATURE REVIEW 7

3 MATERIALS & METHODS 8

3.1 INTRODUCTION 8

3.2 PROPOSED SYSTEM 8

3.3 BLOCK DIAGRAM 8

3.4 HARDWARE DISCRIPTION 9

3.4.1 Arduino 9
3.4.2 Nano Pin Configuration 11
vii

3.4.3 Product Description 15

3.4.4 Arduino Nano Specifications 15

3.4.5 Applications 15

3.5 DHT11 SENSOR 16

3.5.1 DHT11 – Temperature and Humidity Sensor 16

3.5.2 Pin Description 17

3.5.3 DHT11 Pin Discription Configuration 18

3.5.4 Applications 19

3.5.5 Specifications 19

3.5.6 Advantage 20

3.5.7 Disadvantage 20

3.6 2N2222 TRANSISTOR 20

3.6.1 2N2222 Transistor Pin Configuration 21

3.6.2 Features & Specifications 22

3.6.3 Characteristics 23

3.6.4 Advantages 23

3.6.5 Disadvantages 23

3.6.6 Applications 24

3.7 LCD DISPLAY 24

3.7.1 Pin Description 24

3.7.2 I2C Module 26

3.7.3 Applications 28
3.8 SOFTWARE DISCRIPTION

3.8.1 Arduino IDE 29

viii

4 EXPERIMENTAL SETUP AND PROCEDURE 31

4.1 Introduction 31

4.2 Experimental Setup And Procedure 31

5 RESULT AND DISCUSSION 32

5.1 Introduction 32

5.2 Results 32

5.3 Summary 36

6 CONCLUSION 37

LIST OF PUBLICATIONS 38

APPENDIX 39

REFERENCES 43
ix

LIST OF TABLES
TABLE TITLE PAGE
NO. NO.

3.1 Arduino Nano Specifications 10

3.2 Nano Pin Configuration 11

3.3 DHT11 Pindiscription Configuration 18

3.4 LCD Display Pin Description 25

3.5 I2C Module Pindiscription Configuration 27


x

LIST OF FIGURES
FIGURE TITLE PAGE
NO. NO.

1.1 Problem Statement 2

3.1 Block diagram 9

3.2 Arduino Nano 10

3.3 Arduino Nano Pin Configuration 13

3.4 Arduino Nano Product Description 15

3.5 DHT11 – Temperature and Humidity Sensor 17

3.6 DHT11 – Temperature and Humidity Sensor Pin description


18

3.7 DHT11 – Temperature and Humidity Sensor Pin description


Circuit diagram 18

3.8 2N2222 Transistor 21

3.9 2N2222 Transistor Pin Configuration 21

3.10 LCD Display 25

3.11 I2C Module Pindiscription Configuration 27

3.12 ARDUINO IDE 29

4.1 Experimental setup and procedure diagram 31

5.1 Experimental Setup for Proposed System 32

5.2 0% Speed of Proposed System 32

5.3 20% Speed of Proposed System 33

5.4 40% Speed of Proposed System 33

5.5 60% Speed of Proposed System 34

5.6 80% Speed of Proposed System 34

5.7 100% Speed of Proposed System 32o Temperature 35

5.8 100% Speed of Proposed System 34o Temperature 35


xi

5.9 100% Speed of Proposed System with 35o Temperature 36


xii

LIST OF SYMBOLS AND ABBREVIATIONS

SYMBOLS
V - Voltage V
I - Ampere mA

ABBREVIATIONS
C - Celsius
LCD - Liquid Crystal Display
I2C - Inter-Integrated Circuit
PWM Pulse Width Modulation
LED Light Emitting Diode
CPU Central Processing Unit
IC Integrated Circuit
I/O Input/Output
KB Kilobytes
USB - Universal Serial Bus
ADC - Analog to Digital Convert
EEPROM - Electrically Erasable Programmable Read-only Memory
SRAM - Static Random Access Memory
PCB - Printed Circuit Board
RST - Reset
GND - Ground
DC - Direct Current
AC - Alternating Current
Vss - Power Supply
CHAPTER – 1
INTRODUCTION

The organization of the project report is detailed over these chapter


describes about the short introduction, the necessity, objectives and theme of
the project.

1.1 OVERVIEW OF THE PROJECT

The project aims to design and develop an advanced metal detection system tailored for security
applications, with a focus on enhancing detection accuracy, reducing false alarms, and improving
operational efficiency. This system will incorporate cutting-edge sensor technologies, signal
processing algorithms, and user-friendly interfaces to meet the evolving needs of security personnel in
various environments.

Key Objectives:

1. Sensor Innovation: The project will focus on the development of novel sensor configurations and
materials to enhance the sensitivity and reliability of metal detection. This includes exploring advanced
coil designs, integrating multi-frequency capabilities, and utilizing high-performance sensor materials
to improve target detection and discrimination.
2. Signal Processing Optimization: Advanced signal processing algorithms will be implemented to
enhance the system's ability to discriminate between metallic and non-metallic objects, reducing false
alarms and increasing detection accuracy. Machine learning techniques will be investigated to
adaptively learn and classify different target signatures, improving overall system performance.
3. Integration of Multisensor Fusion: The project will explore the integration of complementary sensing
modalities, such as electromagnetic induction and ground-penetrating radar, to enhance detection
capabilities and provide additional insights into target characteristics. Multisensor fusion techniques
will be employed to combine information from different sensors for improved target localization and
identification.
4. User Interface Design: A user-friendly interface will be developed to streamline the operation of the
metal detection system and provide intuitive feedback to security personnel. This includes designing
graphical user interfaces (GUIs) with real-time visualization of detected targets, customizable alert
settings, and ergonomic features for ease of use in various operational scenarios.
5. Field Testing and Validation: The developed metal detection system will undergo rigorous field testing
and validation in collaboration with security agencies and industry partners. Real-world deployment
scenarios will be simulated to evaluate the system's performance under different environmental
conditions and operational requirements.

Expected Outcomes:

 Development of an advanced metal detection system optimized for security applications, incorporating
state-of-the-art sensor technologies and signal processing algorithms.
 Improved detection accuracy and reduced false alarms through innovative sensor designs and signal
processing optimization.
 Enhanced operational efficiency and usability with a user-friendly interface, facilitating intuitive
operation and real-time monitoring by security personnel.
 Validation of the system's performance through comprehensive field testing and evaluation, ensuring
its effectiveness in real-world security scenarios.
1
Overall, the project aims to contribute to the advancement of metal detection technology for security
applications, addressing the evolving challenges and requirements in detecting concealed metallic
objects in diverse operational environments.
1.1 SCOPE AND OBJECTIVES

The project focuses on designing, developing, and implementing an advanced metal detection system
specifically tailored for security applications. The system will be capable of detecting concealed
metallic objects with high accuracy and reliability in various operational environments, including
airports, government buildings, stadiums, and public events.

Key Components of Scope:

1. Sensor Technology: Exploration of innovative sensor designs and materials to enhance sensitivity and
reliability in detecting metallic objects. This includes investigating coil configurations, multi-
frequency capabilities, and sensor integration for improved detection performance.
2. Signal Processing: Development and optimization of signal processing algorithms to differentiate
between metallic and non-metallic objects, reducing false alarms and enhancing overall detection
accuracy. Utilization of machine learning techniques for adaptive classification of target signatures.
3. User Interface: Design and implementation of a user-friendly interface for seamless operation and
monitoring by security personnel. This includes graphical visualization of detected targets,
customizable alert settings, and ergonomic features for intuitive use in diverse operational scenarios.
4. Multisensor Fusion: Integration of complementary sensing modalities, such as electromagnetic
induction and ground-penetrating radar, to augment detection capabilities and provide additional
insights into target characteristics. Implementation of multisensor fusion techniques for improved
target localization and identification.

Objectives:

1. Develop an advanced metal detection system optimized for security applications, focusing on
enhancing sensitivity, reliability, and detection accuracy.
2. Design innovative sensor configurations and materials to improve target detection and discrimination,
particularly in challenging environments with high levels of background noise and interference.
3. Implement signal processing algorithms to differentiate between metallic and non-metallic objects,
reducing false alarms and enhancing the system's ability to detect concealed threats.
4. Create a user-friendly interface for intuitive operation and real-time monitoring by security personnel,
facilitating efficient deployment and utilization of the metal detection system in various operational
environments.
5. Evaluate the performance of the developed system through rigorous field testing and validation,
ensuring its effectiveness and reliability in real-world security scenarios.
6. Contribute to the advancement of metal detection technology for security applications, addressing the
evolving challenges and requirements in detecting concealed metallic objects in diverse operational
environments.

Overall, the project aims to deliver a robust and reliable metal detection system that enhances security
measures by accurately detecting concealed metallic objects, thereby safeguarding public safety and
infrastructure.

2
1.1 THEME OF PROJECTS

The overarching theme of the project is to contribute to the advancement of security


measures through the development and implementation of state-of-the-art metal detection
systems. This theme encompasses several key aspects:

1. Innovation: The project seeks to foster innovation in metal detection technology, exploring
novel sensor designs, signal processing algorithms, and integration techniques to improve
detection capabilities and reduce false alarms.
2. Collaboration: Collaboration with security agencies, industry partners, and academic
institutions will be emphasized to ensure that the developed metal detection systems meet
the specific needs and requirements of various security applications.
3. Impact: The ultimate goal of the project is to have a tangible impact on enhancing security
measures in diverse operational environments, including airports, government buildings,
public events, and critical infrastructure facilities.
4. Adaptability: Emphasis will be placed on designing metal detection systems that are
adaptable to different operational scenarios and capable of detecting a wide range of metallic
objects with high accuracy and reliability.
5. Accessibility: Ensuring that the developed metal detection systems are user-friendly and
accessible to security personnel of varying technical backgrounds is essential to facilitate
widespread adoption and effective utilization.

3
1.1ALGORITHAM
Designing an algorithm for a metal detector involves several key steps, including signal processing, feature
extraction, and classification. Below is an outline of a basic algorithm for a metal detector:
1. Signal Acquisition:
• Collect raw data from the metal detector's sensor coils.
• The data typically consists of amplitude or phase measurements at different frequencies.
2. Preprocessing:
• Remove any noise or interference from the raw sensor data.
• Apply filtering techniques such as median filtering or low-pass filtering to clean the signal.
3. Feature Extraction:
• Extract relevant features from the preprocessed signal that characterize metallic objects.
• Common features may include amplitude peaks, frequency shifts, or phase changes.
4. Classification:
• Utilize a classification algorithm to distinguish between metallic and non-metallic objects based on the
extracted features.
• Popular classification techniques include:
• Thresholding: Setting a threshold value above which signals are classified as metallic.
• Machine Learning: Train a classifier (e.g., Support Vector Machines, Random Forests, Neural
Networks) on labeled data to automatically classify signals.
• Pattern Recognition: Compare extracted features with predefined patterns of metallic objects.
5. Output:
• Output the classification result, indicating whether a metallic object is detected or not.
• Optionally, provide additional information such as the estimated size or depth of the detected object.

4
1.1 PREFACE OF THE PROJECT

` In an era marked by heightened security concerns and evolving threats, the need for robust
and efficient security measures has become paramount. Metal detection systems serve as a
frontline defense, playing a crucial role in detecting concealed metallic objects that may pose
potential risks in various environments, ranging from airports and government buildings to
public events and critical infrastructure facilities.

This project aims to address the pressing need for advanced metal detection systems tailored
for security applications. By leveraging cutting-edge technology and innovative approaches,
the project seeks to enhance the performance, reliability, and adaptability of metal detection
systems, ultimately contributing to bolstering security measures and safeguarding public
safety.

The genesis of this project stems from a recognition of the limitations and challenges faced
by conventional metal detection systems. Traditional approaches often struggle with high
false alarm rates, difficulty in discriminating between metallic and non-metallic objects, and
limitations in adaptability to diverse operational environments. Thus, there arises a
compelling need to innovate and advance metal detection technology to meet the evolving
demands of security stakeholders.

Through interdisciplinary collaboration and concerted efforts, this project endeavors to push
the boundaries of metal detection technology. By exploring novel sensor designs, signal
processing algorithms, and integration techniques, the project seeks to develop next-
generation metal detection systems capable of detecting concealed metallic objects with
unparalleled accuracy and efficiency.

5
CHAPTER 1
LITERATURE REVIEW

Metal detectors are widely used in archaeological surveys for locating buried artifacts, coins, and historical
relics. Literature in this area highlights the importance of integrating metal detection with archaeological
methodologies to systematically survey and excavate sites.
Studies have examined the effectiveness of different metal detector configurations, search strategies, and data
interpretation techniques for archaeological applications, contributing to the discovery and preservation of
cultural heritage.
Industrial Inspection:

Metal detection systems are employed in industrial settings for quality control, product inspection, and safety
compliance. Research in this domain focuses on optimizing detection performance for detecting contaminants in
food products, pharmaceuticals, and other manufactured goods.
Recent advancements include the development of multi-frequency metal detectors, real-time monitoring
systems, and integration with other inspection technologies such as X-ray imaging and magnetic resonance
imaging (MRI) for comprehensive inspection capabilities.
Geophysical Exploration:

Metal detection technology is utilized in geophysical exploration for locating buried utilities, archaeological
features, and mineral deposits. Studies in this field explore the use of metal detectors alongside other
geophysical techniques, such as ground-penetrating radar (GPR) and magnetometry, to improve subsurface
imaging and interpretation.
Advances in instrumentation, data processing algorithms, and survey methodologies have led to more accurate
and efficient detection of buried metallic objects, benefiting various industries including construction,
environmental monitoring, and resource exploration.
Emerging Trends:

Emerging trends in metal detection technology include the integration of artificial intelligence (AI) and machine
learning techniques for automated target recognition, adaptive signal processing, and predictive maintenance of
metal detection systems.
Additionally, there is growing interest in miniaturization, portability, and wireless connectivity of metal
detectors, enabling their deployment in diverse environments and applications, including wearable devices for
personal security and environmental monitoring.
In summary, the literature survey highlights the multifaceted nature of metal detection technology and its
widespread applications across different sectors. By synthesizing knowledge from diverse fields and embracing
emerging trends, researchers can continue to advance the capabilities and effectiveness of metal detection
systems for various practical purposes.

6
CHAPTER-2
Materials and Methods

1. Sensor Setup:
• Select appropriate sensor configuration based on the specific application requirements (e.g., single-coil,
concentric coil, double-D coil).
• Choose sensor materials and dimensions to optimize sensitivity, depth penetration, and target
discrimination.
• Ensure proper calibration of sensors to account for environmental factors and signal variations.
2. Signal Acquisition:
• Use analog or digital signal acquisition systems to capture raw sensor data.
• Sample the sensor signals at a sufficient rate to capture relevant frequency components.
• Implement anti-aliasing filters to prevent aliasing artifacts during digitization.
3. Preprocessing:
• Apply preprocessing techniques to clean and enhance the raw sensor data.
• Remove noise and interference using filtering methods such as median filtering, low-pass filtering, or
adaptive filtering.
• Normalize the signal to ensure consistent amplitude and reduce variability.
4. Feature Extraction:
• Extract relevant features from the preprocessed signal to characterize metallic objects.
• Common features include amplitude peaks, frequency shifts, phase changes, and temporal patterns.
• Use signal processing techniques such as Fourier analysis, wavelet transforms, or time-domain analysis
to extract features.
5. Classification:
• Choose appropriate classification algorithms based on the extracted features and target detection
requirements.
• Consider thresholding techniques for simple binary classification (metallic vs. non-metallic).
• Explore machine learning algorithms (e.g., support vector machines, neural networks, random forests)
for more complex classification tasks.
• Train the classification model using labeled data and validate its performance using cross-validation or
other evaluation metrics.
6. Integration and Deployment:
• Integrate the developed algorithm into the metal detection system hardware and software architecture.
• Implement user interfaces for system control, parameter adjustment, and result visualization.
• Test the integrated system in controlled laboratory settings and real-world environments to evaluate
performance and reliability.
• Conduct field trials and validation studies in collaboration with end-users or stakeholders to assess
practical usability and effectiveness

7
2.1 CONCLUSIONS FROM THE LITERATURE REVIEW

1. Advancements in Sensor Technology: The literature review highlights significant


advancements in sensor technology for metal detection systems. Innovations in coil designs,
sensor materials, and configurations have led to improvements in sensitivity, depth
penetration, and target discrimination capabilities. These advancements have contributed to
the development of more effective and reliable metal detection systems across various
applications.
2. Signal Processing Techniques: Researchers have explored a wide range of signal processing
techniques to enhance the performance of metal detection systems. From traditional
methods such as thresholding and Fourier analysis to more advanced approaches like wavelet
transforms and machine learning algorithms, the literature reveals a rich landscape of signal
processing methodologies tailored to different detection requirements and operational
environments.
3. Application-Specific Adaptations: The literature underscores the importance of tailoring
metal detection systems to specific applications and operational contexts. Whether deployed
for security screening, archaeological surveys, industrial inspection, or geophysical
exploration, customizing sensor configurations, signal processing algorithms, and user
interfaces is essential to maximizing detection accuracy and usability in diverse scenarios.
4. Challenges and Future Directions: Despite the progress made in metal detection
technology, several challenges remain. These include the detection of small or deeply buried
objects, discrimination in cluttered environments, and susceptibility to environmental noise
and interference. Future research directions may involve the integration of advanced sensor
modalities, machine learning techniques, and novel signal processing algorithms to address
these challenges and further enhance detection capabilities.
5. Interdisciplinary Collaboration: The literature review highlights the interdisciplinary nature
of metal detection research, with contributions from fields such as materials science, electrical
engineering, computer science, archaeology, and geophysics. Collaborative efforts between
researchers, practitioners, and industry stakeholders have been instrumental in driving
innovation and pushing the boundaries of metal detection technology.

8
3.1 BLOCK DIAGRAM

1. A block diagram represents the components or stages of a system and the connections
between them. Below is a simplified block diagram illustrating the main components of a
metal detection system:

9
temperature, fan speed 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.

LCD Display With


Power Supply 12V
I2C Module

Arduino
NANO

Temperature Sensor : FAN


DHT 11 Sensor

Figure 3.1 Block diagram


3.2 HARDWARE DISCRIPTION
3.2.1 ARDUINO
Arduino is a single-board microcontroller meant to make the application more
accessible which are interactive objects and its surroundings. The hardwarefeatures with an
open-source hardware board designed around an 8-bit Atmel AVR microcontroller or a 32-
bit Atmel ARM.
Current models consists a USB interface, 6 analog input pins and 14 digital I/O
pins that allows the user toattach various extension boards.

1
0
Figure 3.2 Arduino Nano

Figure 3.2 shows the Arduino Nano. The Nano is inbuilt with the ATmega328P
microcontroller, same as the Arduino UNO.

The main difference between them is that the UNO board is presented in PDIP
(Plastic Dual-In-line Package) form with 30 pins and Nano is available in TQFP (plastic quad
flat pack) with 32 pins.

The extra 2 pins of Arduino Nano serve for the ADC functionalities, while UNO has 6
ADC ports but Nano has 8 ADC ports. The Nano board doesn’t have a DC power jack as
other Arduino boards, but instead has a mini-USB port.

This port is used for both programming and serial monitoring. The fascinating
feature in Nano is that it will choose the strongest power source with its potential
difference, and the power source selecting jumper is invali

Table 3.1 Arduino Nano Specifications


Arduino Nano Specifications
Microcontroller ATmega328P
Architecture AVR
Operating Voltage 5 Volts
Flash Memory 32 KB of which 2 KB used by
Bootloader

10
SRAM 2KB
Clock Speed 16 MHz
Analog I/O Pins 8
EEPROM 1 KB
DC Current per I/O Pins 40 milliamps
Input Voltage (7-12) Volt
Digital I/O Pins 22
PWM Output 6
Power Consumption 19 milliamps
PCB Size 18 x 45 mm
Weight 7 gms

3.2.2 Nano Pin Configuration


The Nano Pin configuration is a 30 pin chip as figure 3.18 shown the pin diagram
above. Many pins of the chip here have more than one function. We willdescribe functions
[29] of each pin in below table 3.2.
Table3.2 Arduino Nano Pin Configuration

Pin No. Pin name Description Secondary Function


Digital I/O Pin Serial
1 D1/TX I/O
TX Pin
Digital I/O Pin Serial
2 D0/RX I/O
TX Pin
Reset ( Active Low)
3 RESET Input

Supply Ground
4 GND Power

Digital I/O Pin


5 D2 I/O

Digital I/O Pin


6 D3 I/O

Digital I/O Pin


7 D4 I/O

Digital I/O Pin


8 D5 I/O

11
Digital I/O Pin
9 D6 I/O

12
Digital I/O Pin
10 D7 I/O

11 D8 I/O
Digital I/O Pin
Digital I/O Pin
12 D9 I/O

Digital I/O Pin


13 D10 I/O

Digital I/O Pin


14 D11 I/O

Digital I/O Pin


15 D12 I/O

Digital I/O Pin


16 D13 I/O

+3.3V Output (from


17 3V3 Output
FTDI)
ADC reference
18 AREF Input

Analog Input Channel 0


19 A0 Input

Analog Input Channel1


20 A1 Input

Analog Input Channel 2


21 A2 Input

Analog Input Channel 3


22 A3 Input

Analog Input Channel 4


23 A4 Input

Analog Input Channel 5


24 A5 Input

Analog Input Channel 6


25 A6 Input

Analog Input Channel 7


26 A7 Input

+5V Output (From On-


Output
board Regulator)
27 +5V or or +5V (Input
Input from
External PowerSupply

Reset ( Active Low)


28 RESET Input

13
Supply Ground
29 GND Power

Supply voltage
30 VIN Power

Figure 3.3 Arduino Nano Pin Configuration

There are totally three ways to power the Nano are:

 USB Jack: Connect the mini USB jack to a phone charger or computerthrough a
cable and it will draw power required for the board to function.

 Vin Pin: The Vin pin can be supplied with a unregulated 6-12V to powerthe
board.

The on-board voltage regulator regulates it to +5V

 +5V Pin: If you have a regulated +5V supply then you can directly providethis o the

14
+5V pin of the Arduino.

There are totally 14 digital Pins and 8 Analog pins on your Nano board. The
digital pins can be used to interface sensors by using them as input pins or drive loads
by using them as output pins. A simple function like pinMode() and digitalWrite()
can be used to control their operation. The operating voltage is 0Vand 5V for digital
pins. The analog pins can measure analog voltage from 0V to 5V using any of the 8
Analog pins using a simple function liken analogRead().

These pins apart from serving their purpose can also be used for special
purposes which are discussed below:

 Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and
transmit TTL serial data. They are connected with the corresponding
ATmega328P USB to TTL serial chip.

 External Interrupt 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.

 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output
byusing analogWrite() function.

 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins areused
for SPI communication.

 In-built LED Pin 13: This pin is connected with an built-in LED, whenpin
13 is HIGH – LED is on and when pin 13 is LOW, its off.

 I2C A4 (SDA) and A5 (SCA): Used for IIC communication using Wirelibrary.

 AREF: Used to provide reference voltage for analog inputs with


analogReference() function.

 Reset Pin: Making this pin LOW, resets the microcontroller.

15
3.2.3 Product Description

Figure 3.4 Arduino Nano Product Description


To connect and program this development board you need to have Arduino IDE
installed in your computer and the Mini USB Programming Cable. After installing the IDE
you just need to go to TOOLS> BOARDS> Arduino Nano and you are ready to upload
the programs with the help of Mini USB B cable. Its programming is not different from
Arduino UNO.

3.2.4 Arduino Nano Specifications

 It has 22 I/O pins in total in which 14 are Digital (6 are PWM output) and 8 are
Analog pins.
 Operating Voltage (Logic Level): 5V.
 Supports Serial, I2C, SPI Communication Protocols.
 Flash memory: 32KB in which 2KB is used by Bootloader
 Clock speed: 16MHz
 DC Current per I/O Pin: 40 mA
 SRAM : 2KB, EEPROM: 1KB

3.2.5 Applications

 Samples of electronic systems & products.


 Automation.

16
 Several DIY projects.
 Control Systems.
 Embedded Systems.
 Instrumentation.
3.5 DHT11 Sensor

Humidity is the measure of water vapour present in the air. The level of humidity in
air affects various physical, chemical and biological processes. In industrial applications,
humidity can affect the business cost of the products, health and safety of the employees. So,
in semiconductor industries and control system industries measurement of humidity is very
important. Humidity measurement determines the amount of moisture present in the gas that
can be a mixture of water vapour, nitrogen, argon or pure gas etc… Humidity sensors are of
two types based on their measurement units. They are a relative humidity sensor and
Absolute humidity sensor. DHT11 is a digital temperature and humidity sensor.

3.5.1 DHT11 – Temperature and Humidity Sensor

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor
can be easily interfaced with any micro-controller such as Arduino, Raspberry Pi etc… to
measure humidity and temperature instantaneously. DHT11 humidity and temperature sensor
is available as a sensor and as a module. The difference between this sensor and module is the
pull-up resistor and a power-on LED. DHT11 is a relative humidity sensor. To measure the
surrounding air this sensor uses a thermistor and a capacitive humidity sensor. DHT11 is a
popular temperature and humidity based digital sensor. There is an upgraded version of the
DHT11 temperature and humidity sensor available, which is DHT22 Sesnor with higher
sensing ranges. The sensor uses a capacitive humidity sensor and a thermistor based
temperature sensor to measure the ambient humidity and temperature. The humidity sensing
ranges from 20% to 90% with ±5% accuracy and the temperature sensing ranges from 0
degrees to the 50 degrees Celcius with ±2°C accuracy. The sampling time of this sensor is 2
seconds almost. This Temperature and Humidity Sensor uses digital pins to communicate
with the microcontroller unit and does not have any kind of analog pins.The module also has
the inbuilt pull-up resistor and additional filter capacitor to

17
support the DHT11 sensor. Thus the module is available in ready to go mode and can be
directly connected with the microcontroller unit without using any kind of additional
components. DHT11 sensor consists of a capacitive humidity sensing element and a
thermistor for sensing temperature.

Figure 3.5 DHT11 – Temperature and Humidity Sensor and Pinout


The humidity sensing capacitor has two electrodes with a moisture holding substrate
as a dielectric between them. Change in the capacitance value occurs with the change in
humidity levels. The IC measure, process this changed resistance values and change them
into digital form. For measuring temperature this sensor uses a Negative Temperature
coefficient thermistor, which causes a decrease in its resistance value with increase in
temperature. To get larger resistance value even for the smallest change in temperature, this
sensor is usually made up of semiconductor ceramics or polymers.The temperature range of
DHT11 is from 0 to 50 degree Celsius with a 2-degree accuracy. Humidity range of this
sensor is from 20 to 80% with 5% accuracy. The sampling rate of this sensor is 1Hz .i.e. it
gives one reading for every second. DHT11 is small in size with operating voltage from 3 to
5 volts. The maximum current used while measuring is 2.5mA. DHT11 sensor has four pins-
VCC, GND, Data Pin and a not connected pin. A pull-up resistor of 5k to 10k ohms is
provided for communication between sensor and micro-controller.the DHT11 sensor is
shown in figure 3.5.

3.5.2 Pin Description

The below figure (3.6) is showing the pinout of the DHT11 sensor. Connect 3.3-5.5V
in the VCC (+) pin and ground on the GND(-) pin. Connect the middle pin which is a digital
output of the sensor module with a microcontroller digital I/O pin. Use

18
the referenced library that is given below of this page for interfacing the sensor with the
microcontroller unit.

Figure 3.6 DHT11 – Temperature and Humidity Sensor Pin discription

 Pin 1: Power VCC(+) (3.3VDC to 5.5VDC )


 Pin 2: Digital Serial Data Output
 Pin 3: Ground

Figure 3.7 DHT11 – Temperature and Humidity Sensor Pin description Circuit diagram

3.5.3 DHT11 Pindiscription Configuration

Table3.3 DHT11 Pindiscription Configuration

No: Pin Name Description

For DHT11 Sensor

1 Vcc Power supply 3.5V to 5.5V

19
2 Data Outputs both Temperature and Humidity through serial Data

3 NC No Connection and hence not used

4 Ground Connected to the ground of the circuit

For DHT11 Sensor module

1 Vcc Power supply 3.5V to 5.5V

2 Data Outputs both Temperature and Humidity through serial Data

3 Ground Connected to the ground of the circuit

3.5.4 Applications

 Measure temperature and humidity


 Local Weather station
 Automatic climate control
 Environment monitoring

3.5.5 Specifications

 Operating Voltage: 3.3V to 5.5V


 Digital I/O
 5 Hz sampling rate (Once every 2 Seconds)
 Measuring current: 0.3mA
 Low power consumption
 Temperature range: 0 to 50 degree C
 Humidity range: 20% to 90%

11
0
 Accuracy: ±2°C and ±5%
 Dimension: 3.5 x 2 x 6.5 cm

3.5.6 Advantage:

 The main advantage of the sensor is easy to use and portability. Many other sensors,
which are used to measure the temperature, like AH10 & NTC, are composed of
SMD components and are a bit bulky.
 The second advantage of the sensor is that it gives data out via a single pin. This
reduces complexity, but it is also a disadvantage of the sensor.
 Thirdly it is cheap and easily available also it comes with the combination of
measuring Humidity (AH10 exception).
 this dht11 sensor is very easy to use so, you can use this sensor into any of your iot
project when you have to use this dht11 sensor with arduino nano. you can use easily.
3.5.7 Disadvantage:

 The main disadvantage of the sensor is the covering in which the sensor is enclosed.
As it is made of plastic, so it is prone to melt due to intense heat.
 Secondly, due to long time exposed to high humid environment the sensor can
accumulate the water vapors due to heat and humidity, as water inside the covering
after condensation.
 The third which is the largest is that of the delay which is required for the sensor to
work and be detected by the microcontroller.
3.6 2N2222 Transistor

The NPN transistor like 2N2222 is most frequently used for VHF (very high
frequency) amplifier & switching applications. The design of this transistor can be done using
silicon material. This kind of transistor is considered a normal transistor, so it is used like an
NPN transistor. It is used as a small signal transistor frequently. This article discusses an
overview of a 2N2222 transistor. The 2N2222 transistor is a common NPN BJT & it is
mainly used in the applications of switching & amplifying with less power. This transistor is
mainly designed for low power, low to medium current, medium voltage & works at fairly
high speeds.In the 2N2222 NPN transistor, a single P-doped layer is embedded among two
N-doped layers. This transistor includes three

20
terminals like Base, Emitter & Collector. 2N2222 transistor symbol is shown below figure
3.8.

Figure 3.8 2N2222 Transistor


2N2222 transistor offers constant DC collector current like 800mA, so it is necessary
to use where low to medium current is necessary. It functions on the value of high transition
frequency like 250MHz through 10ns delay time, 225ms storage time, 60ms fall time & 25ms
rise time. It is available in the TO-92 package. Alternative 2N2222 transistors are; BC636,
BC549, BC639, 2N2369, BC547, 2N3055, 2N3906,
2N3904 & 2SC5200. Equivalent 2N2222 transistors are; 2N3904 (PNP), 2N2907 (PNP),
2N3906 (PNP), S9014, BC637, BC148, MPS2222, 2N4403, PN2222, N2222 & KN2222.

3.6.12N2222 Transistor Pin Configuration

The pin configuration of the 2N2222 transistor is shown below. This transistor
includes three pins & its each pin functionality is discussed below figure (3.9).

Figure 3.9 2N2222 Transistor Pin Configuration

21
 Pin1 (Collector): This is the first pin of the transistor & it is an o/p pin. The
main function of this pin is to provide transistor current toward the o/p load.
 Pin2 (Base): The base pin is a control pin & it is a second pin of the transistor.
The main function of this pin is to control the current from emitter to base.
 Pin3 (Emitter): The emitter pin is the third pin of the transistor & it is used to
drain out the complete current of the transistor.

3.6.2 Features & Specifications

The features & specifications of the 2N2222 NPN transistor include the following.
 The polarity of Transistor – NPN
 Type of termination –Through Hole
 Configuration of pin – a
 Number of Pins -3
 The voltage from collector terminal to emitter is 50V once the base terminal is
open
 The voltage from the emitter to the base terminal is 6V once the collector terminal
is open
 The voltage from the collector terminal to the base is 75V once the emitter
terminal is open
 The current Gain of DC is 100
 DC collector current is 800mA
 Accessible in the Package of To-92
 Total power dissipation is 1W
 The maximum base current is 5mA
 Input capacitance is 25pF
 Fall time is 60ns
 Output capacitance is 8pF
 Turn-on time is 25ns
The configuration modes of the 2N2222 NPN transistor include common emitter (CE),
common collector (CC) & common base (CB). These three configurations are very helpful
for amplifying voltage, current & power very easily in different applications based on the
requirement.

22
3.6.3 Characteristics

The key characteristics of 2N2222 are discussed below.


 The transistor’s completer power should not go above 500mW.
 The maximum handling frequency capacity is 250MHz.
 The maximum tolerance is 60V across its two terminals like base & collector.
 For the 10mA collector current & for 10V, the DC current is approximately 75mA.
3.6.4 Advantages

The main advantages of using the 2N2222 transistor include the following.
 This is the most commonly used type of transistor
 In electronic circuits, most of the switching applications can be done by using this
transistor
 It is capable of handling fairly high magnitude currents as compared to other
similar transistors.
 This transistor switches the load current with 800 mA through it, which is high as
compared to others.
 So this capability will make the device ideal in the applications of linear
amplifiers.
 Small size
 Less weight
 Voltage gain is high
 Low source voltage
 Low cost
 Longer life
3.6.5 Disadvantages

The main disadvantages of using the 2N2222A transistor include the following.
 Sensitive
 Depends on Temperature
 Input impedance is low
 Faults cannot be found easily due to small size
 It is extremely hard to replace with new ones by unsoldering
 It does not function efficiently like a relay or electrical, mechanical switches.

23
3.6.6 Applications

The applications of the 2N2222 transistor include the following.

 As compared to the normal NPN BC547 transistor, the 2N2222 is extremely


similar, but 2N2222 allows 800mA of collector current & also 652mW of power
dissipation which can be utilized for driving larger loads as compared toBC547.
 So, the 2N2222 transistor is the best choice for switching high current loads
 This kind of transistor is mainly used for amplifying current
 This transistor can be used as a switch for automatically switch ON/OFF any
appliances.
 It is used for PWM due to its quick response
 Because of its fast response time, it can be used for pulse width modulation.
 It is typically used in automation & embedded projects.
 Audio Preamplifiers
 Sensor Circuits
 Audio Amplifier Stages
 Used to switch several loads simultaneously
 RF Circuits
 Darlington Pairs
 These transistors are used in Motor drive circuits like VFD or variable
frequency drives.
 Used in Rectifier Circuits & DC Inverters
 It is used as an amplifier to amplify voltage, current & power.
 Darlington pair transistors are used for attaining the maximum current from the
emitter terminal to the collector.
3.7 LCD Display

In LCD 16×2, the term LCD stands for Liquid Crystal Display that uses a plane panel
display technology, used in screens of computer monitors & TVs, smartphones, tablets,
mobile devices, etc. Both the displays like LCD & CRTs look the same but their operation is
different. Instead of electrons diffraction at a glass display, a liquid

24
crystal display has a backlight that provides light to each pixel that is arranged in a rectangular
network is shown in figure 3.10.

Every pixel includes a blue, red, green sub-pixel that can be switched ON/OFF. Once all
these pixels are deactivated, then it will appear black and when all the sub-pixels are
activated then it will appear white. By changing the levels of each light, different colour
combinations are achievable.

Figure 3.10 LCD Display

3.7.1 PIN DESCRIPTION

Table 3.4 LCD Display Pin Description

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

Selects command register when low; and data Register Select


4
register when high
Low to write to the register; High to read from the register
5 Read/write
Sends data to data pins when a high to low pulse is
6 Enable
given
7 DB0
8 DB1
9 DB2
10 8-bit data pins DB3
11 DB4
12 DB5
13 DB6

25
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

Working Principle

The basic working principle of LCD is passing the light from layer to layer
through modules. These modules will vibrate & line up their position on 90 o that permits
the polarized sheet to allow the light to pass through it. The displays of LCD's are thinner
as compared to CRTs. As compared to LED screens, LCD has less power consumption
because it functions on the fundamental principle of blocking light instead of dissipating.

Registers of LCD

The registers used in LCD are two types like data register & command register.
The register can be changed by using the RS pin out. If we set ‘0’ then it is command
register and if it is ‘1’ then it is data register.

Command Register

The main function of the command register is to save instructions illustrated on


LCD. That assists in data clearing & changes the cursor location & controls the display.

Data Register

The data register is used to save the date to exhibit on the LCD. Once we
transmit data to LCD, then it shifts to the data register to process the data. If we fix the
register value at one that the data register will start working.

3.7.2 I2C MODULE

The I2C is a serial communication protocol, it has two terminals, one is of the clock
and the other is for serial data communication is shown in figure 3.11. This device is an
example of the serial protocol and can be used with other electronic devices to communicate
through serial communication. The I2C has the SDA and SCL terminals,

26
the SCL is the clock line that transfers data depending on its High and Low states whereas the
SDA is a data line, which contains the data to be sent or received to any device according to
the states of a clock. The other two terminals are of Vcc and the ground which is used to
complete the circuit of the I2C and on the other side of the board, there are pins known as
LED, which are connected to the potentiometer (embedded on the board) which can vary the
resistance of the I2C circuit. We can also use these terminals to control the resistance of the
circuit of I2C by some other methods like using an LDR or transistor.

Figure 3.11 I2C Module

GND is a ground pin. Connect it to the ground of the ESP8266.

VCC supplies power to the module and LCD. Connect it to the ESP8266’s VIN pin or an
external 5V power supply.

SDA is the I2C data pin. Connect it to the ESP8266’s I2C data pin.

SCL is the I2C clock pin. Connect it to the ESP8266’s I2C clock pin.

Table 3.5 I2C Module Pindiscription Configuration

Name Description
Pin No.

Pin no. 1 VSS Power supply (GND)

Pin no. 2 VCC Power supply (+5V)

Pin no. 3 VEE Contrast adjust

27
0 = Instruction input1
Pin no. 4 RS
= Data input

0 = Write to LCD Module 1


Pin no. 5 R/W
= Read from LCD module

Pin no. 6 EN Enable signal

Pin no. 7 D0 Data bus line 0 (LSB)

Pin no. 8 D1 Data bus line 1

Pin no. 9 D2 Data bus line 2

Pin no. 10 D3 Data bus line 3

Pin no. 11 D4 Data bus line 4

Pin no. 12 D5 Data bus line 5

Pin no. 13 D6 Data bus line 6

Pin no. 14 D7 Data bus line 7 (MSB)

APPLICATIONS
 This Project For Location Of Fault In Underground Cable In The

28
RuralAreas Where Underground Transmission System Is Used
 High voltage transmission line used

 Power system sized used


3.8 SOFTWARE DISCRIPTION

3.8.1 ARDUINO IDE

The Arduino Integrated Development Environment (IDE) is a software


application that is used to program and develop code for Arduino boards is shown in figure
3.12. It provides a user-friendly interface for writing, compiling, and uploading code to the
board. In our project, the Arduino IDE is used to program the ESP8266 NodeMcu board.

Figure3.12 ARDUINO IDE

Features:

Some of the features of the Arduino IDE include:

• Code Editor: The IDE provides a code editor with features such as syntax
highlighting, auto-indentation, and code completion, making it easier to write code.

• Compiler: The IDE includes a compiler that translates the code written in the editor
into machine-readable code that can be understood by the Arduino board.

• Serial Monitor: The IDE provides a serial monitor that allows you to view and send
data between the Arduino board and the computer over the serial port.

29
• Library Manager: The IDE includes a library manager that allows you to easily add
and manage libraries, which are pre-written code that can be used in your Arduino
projects.

• Board Manager: The IDE includes a board manager that allows you to select and
install the necessary drivers and board files for the specific Arduino board you are
using.

• Sketches: The IDE refers to Arduino programs as sketches. You can create, open,
and save sketches from within the IDE.

30
CHAPTER – 4

EXPERIMENTAL SETUP AND PROCEDURE

4.1 INTRODUCTION

This chapter consists of the pictorial representation and analysis of the


hardware module and result of this proposed method.

4.2 EXPERIMENTAL SETUP AND PROCEDURE


Temperature sensor DHT11 Temperature and Humidity sensor senses the
temperature and converts it into an electrical (analog) signal, which is applied to the
ATMega328P microcontroller of the Arduino Nano Board. The analog value is
converted into a digital value. Thus the sensed values of the temperature and speed of
the fan are displayed on the LCD. When the temperature exceeds 30°C the fan starts
rotating. A low-frequency pulse-width modulation (PWM) signal, 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 is shown
in figure 4.1.

Figure 4.1 Experimental setup and procedure diagram

31
CHAPTER – 5
RESULT AND DISCUSSION
5.1 INTRODUCTION

This chapter presents the analysis and simulation results obtained from
theprocess of automatic speed control of fan at room temperature.

5.2 RESULTS

The following figures display the results of the hardware setup.

Figure 5.1 Experimental Setup for Proposed System

Figure 5.2 0% Speed of Proposed System

32
Figure 5.3 20% Speed of Proposed System

Figure 5.4 40% Speed of Proposed System

33
Figure 5.5 60% Speed of Proposed System

Figure 5.6 80% Speed of Proposed System

34
Figure 5.7 100% Speed of Proposed System 32o Temperature

Figure 5.8 100% Speed of Proposed System 34o Temperature

35
Figure 5.9 100% Speed of Proposed System with 35o Temperature

5.3 SUMMARY
The hardware results of the proposed system were shown in Figure 5.1 to 5.9 and
discussed in this chapter.

36
CHAPTER – 6
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 (DHT11). 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.

37
LIST OF PUBLICATIONS
[1]. Gukan P and Premnath R, “Automatic Speed Control of Fan At Room Temperature ”
presented a Project demo in Tech Demoday - 2K23 in Sengunthar Engineering College in 31st March
2023.

38
APPENDIX
#include <LiquidCrystal_I2C.h>
#include "DHT.h" LiquidCrystal_I2C
lcd(0x27, 16, 2);
#define DHTPIN 12 // what pin we're connected to
//#define DHTTYPE DHT11 // DHT 11
#define DHTTYPE DHT11 // DHT 11
#define pwm 9
int TempMin = 25; // the temperature to start the fan 0%
int TempMax = 50; // the maximum temperature when fan is at 100% byte
degree[8] =
{
0b00011,
0b00011,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
// Initialize DHT sensor for normal 16mhz Arduino DHT
dht(DHTPIN, DHTTYPE);

void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.createChar(1, degree);
lcd.clear();

39
lcd.print("Fan Speed");
lcd.setCursor(0, 1);
lcd.print(" Controlling ");
delay(2000);
analogWrite(pwm, 255);
lcd.clear();
lcd.print("Using DHT Sensor");
lcd.setCursor(0, 1); lcd.print("The
IoT Projects"); delay(2000);
lcd.clear();

dht.begin();
}

void loop() {
// Wait a few seconds between measurements. delay(2000);

// Reading temperature or humidity takes about 250 milliseconds!


// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) float h =
dht.readHumidity();
// Read temperature as Celsius float t
= dht.readTemperature();

// Check if any reads failed and exit early (to try again). if
(isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!"); return;

40
}

Serial.print("Humidity: ");
Serial.print(h); Serial.print("
%\t");
Serial.print("temperature: ");
Serial.print(t);
Serial.print(" *C ");

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("temp: ");
lcd.print(t); // Printing terature on LCD lcd.print("
*C");
lcd.setCursor(0, 1); if
(t < 28 )
{
analogWrite(9, 0);
lcd.print("Fan OFF");
delay(100);
}

else if (t >= 28 && t <= 29)


{
analogWrite(pwm, 51);
lcd.print("Fan Speed: 20%");
delay(100);
}

else if (t >= 29 && t <= 30)

41
{
analogWrite(pwm, 102);
lcd.print("Fan Speed: 40% ");
delay(100);
}

else if (t >= 30 && t <= 31)


{
analogWrite(pwm, 153);
lcd.print("Fan Speed: 60% ");
delay(100);
}

else if (t >= 31 && t <= 32)


{
analogWrite(pwm, 204);
lcd.print("Fan Speed: 80%");
delay(100);
}
else if (t >= 32)
{
analogWrite(pwm, 255);
lcd.print("Fan Speed: 100% ");
delay(100);
}
delay(3000);
}

42
REFERENCES
1. Shivshankar Adsule, Shivani Mohite, Rahul Patil, Namrata Dhawas R,” Automatic
Temperature Based Fan SpeedController Using Arduino”,IJIRT,volume 2,issue 4 2020.

2. Shwetha Baligar S,Srinidhi Joshi S,Sujay Mudhole S,Spoorti Jadhav S, Chaitanya


Jambotkar K ,”Temperature Based Speed Control of Fan Using Arduino”,IJIRT,volume
5,issue 10,2019.

3. Srinivas P, Kavinkumar B, Arun Venkat A, Dr.R.Senthil Kumar ,” Temperature based Fan Speed
Controller”,volume 2, issue 7,2020.

4. Vijayakumar S,Thilagavathi B,Vignesh V,Rajasekar C,Lavanpriya C,” Design and Fabrication of


Automatic FanSpeed Control”,an international open access journal,volume 2 page19-24 2017.

5. Nigade, A S,Deepanshu Verma, Brajesh Kumar Pandey and Pranjal Srivastav ,”


temperature based automatic fan speed controller”, International Journal of Current
Research,volume 4,page29436-29440,2016.

6. www.circuitstoday.com

7. www.quartzcomponents.com

8. www.researchgate.net

9. www. ijret.org

10. www.arduino.com

43

You might also like