Workspace Automation 2
Workspace Automation 2
A PROJECT REPORT
BACHELOR OF SCIENCE
IN
ELECTRONICS AND COMMUNICATION SYSTEMS
Submitted By
SWETHA.M (21BEC013)
MARCH 2024
i
CERTIFICATE
submitted to the Bharathiar University, in Partial fulfillment of the requirements for the
a record of original project work done by SWETHA.M (21BEC013) during the period of
Sri Krishna Arts and Science College, Coimbatore under my supervision and guidance and
the project report has not formed the basis for the award of any Degree/ Diploma/
ii
DECLARATION
requirements for the award of the Degree of Bachelor of Science in Electronics and
Dr. S. Shankar, M.Sc., M.Phi, Ph.D. Assistant Professor, Department of Electronics and
Communication Systems, Sri Krishna Arts and Science College, Coimbatore. The project
report has not formed the basis for the award of any Degree/ Diploma/ Associateship/
iii
ACKNOWLEDGEMENT
First of all, I thank Almighty for guiding me throughout this endeavor. The satisfaction that
accompanies the successful completion of any task would be incomplete without the mention
of the people who made it possible, whose constant guidance and encouragement crowned
my efforts with success in various stages. There are number of people who helped me to get
through this and finish the course.
I immensely grateful and thankful to Smt. S. Malarvizhi, Chairperson and Managing Trustee,
Sri Krishna Institutions, Mr. K. Adithya, Managing Trustee and Secretary, Sri Krishna
Institutions, Dr. K. Sundararaman, Chief Executive Officer, Sri Krishna Institutions,
Coimbatore, Dr. R. Jagajeevan, Principal, Sri Krishna Arts and Science College, Coimbatore,
Dr. O.M. Saravanakumar, Department Head of Electronics Communication Systems and
Dr. V. A. Rinsey Antony, Dean of Applied Sciences, Sri Krishna Arts and Science College,
Coimbatore for giving me the opportunity and support to pursue our undergraduate degree.
I express my deep sense of gratitude and thanks to
Dr SHANKAR S Assistant Professor, Department of Electronics and Communication
Systems for supervising my project work, and for not only nourishing electronics but also
inculcating good qualities in me. His insight and advises were always valuable and
appreciated.
I extend my earnest gratitude to the faculty members of Electronics and Communication
Systems , Sri Krishna Arts and Science College, Coimbatore for their supports in many ways.
The Department of ECS has provided the support and lab facilities for the completion of this
work.
I am using this opportunity to express our gratitude to friends and everyone who supported
me throughout this course of study. I thankful for their aspiring guidance, invaluably
constructive criticism and friendly advice during the project work.
Especially, my foremost gratitude and respect go to my parents, for their unconditional love
and dedication. I would like to deeply appreciate them for all the sacrifices they made for me,
and for providing me an everlasting support for doing my undergraduate degree.
iv
TABLE OF CONTENTS
2 HARDWARE ARCHITECTURE 8
3 HARDWARE DESCRIPTION 14
3.1 Node ESP 8266 14
3.2 Flame Sensor 21
3.3 IR Sensor 24
3.4 LCD 26
3.5 I2C 30
3.6 2V Motor 32
v
3.7 Switching Device 35
3.7.1 Relay 35
3.8 Buzzer 38
4 SOFTWARE DESCRIPTION 40
5.1 Results 58
5.2 Discussions 60
6.1 Conclusion 61
Reference 63
Reference Website 64
vi
ABSTRACT
This project presents the development of an automation system utilizing two ESP8266 nodes
—a master and a slave—to manage parking spaces and enhance fire safety measures. The
master node, equipped with an LCD display, provides real-time updates on parking
availability, while the slave node integrates sensors such as IR and flame sensors for parking
occupancy detection and fire detection, respectively. Upon detecting a fire incident, the
system triggers an alarm, activates a water sprinkler system, and provides visual and audible
alerts for immediate action. Additionally, the slave node controls power to a workstation's fan
and light, ensuring energy efficiency. Seamless communication between the nodes facilitates
efficient data exchange and coordination, enhancing the system's overall functionality. Future
enhancements include remote monitoring, advanced analytics, and integration with smart
infrastructure to further improve efficiency and safety. Overall, the proposed system offers a
comprehensive solution for parking management and fire safety in various settings.
vii
FIGURE CAPTIONS
Figure Page
Title of the Figure
Number Number
Block Diagram of Benefits of Workspace
1.1 Automation 6
Viii
ix
WORKSPACE AUTOMATION 2023-2024
CHAPTER 1
INTRODUCTION
At its core, workspace automation aims to reduce manual intervention in repetitive tasks,
enabling employees to focus on more strategic and value-added activities. By automating
routine processes, organizations can achieve greater efficiency, accuracy, and consistency
in their operations, leading to improved performance and outcomes.
Manual processes are prone to errors and inconsistencies, which can have
significant implications for organizational performance and reputation. Workspace
automation ensures accuracy and consistency in tasks such as data entry, document
processing, and compliance, minimizing the risk of errors and enhancing operational
reliability.
The rise of remote work and digital collaboration has accelerated the adoption
of workspace automation. Automation enables seamless communication, collaboration,
and workflow management in virtual work environments, ensuring continuity of
operations and productivity regardless of location.
related processes such as data privacy, security, and audit trails, organizations can
mitigate risks and protect against potential liabilities.
As the time spent inside the office and comfort level is rising, the office room is alter for
automatic control and observation of various parameters. Internet of things (IoT) system
proposed in this paper based on arm controller and Thingspeak cloud provide solution for
automatic control of office room appliances such as light, fan, AC by considering human
comfort. Various office room parameters like temperature, light intensity, connected load,
energy consumption, voltage and current consumption can also be monitored and analyzed
from anywhere over the internet. Electrical appliances will turn on only when there is
presence detected by the PIR sensors. Workable room environment such as light intensity and
room temperature are maintained and monitored by using lux sensor and temperature sensor
respectively. The room automation system based on IoT consist of sensors (temperature
sensor, lux sensor), arm controller board, multifunction energy meter, ESP8266 Wi-Fi
module and Wi-Fi router.
Publisher: Alochana Chakra Journal Volume IX, Issue IV, April/2020 ISSN NO:2231-3990
Home automation and the Internet of Things are important fields of research which are
thoughtto gain a lot more public attention in the years to come. Cloud computing has the
potential toprovide easy access to home automation for the general public by providing easy
to use onlineservices. Open and standardised protocols for home automation devices further
increase theconvenience by offering more choice and freedom to the customer. The “IOT
based Interactive Controlling andMonitoring System for home automation” is a
newtechnological advancement which can control and monitordevices nor only for home
automation but any real lifeappliances remotely. Any automation project using
embeddedsystem like PIC Microcontroller provides an intelligent , lowcost, energy
preserving system for homes ,schools ,hospitals. Electricalappliances will turn on only when
there is presence detected by thePIR sensors. Workable room environment such as light
intensity androom temperature are maintained and monitored by using lux sensorand
temperature sensor respectively. The room automation system based on IoT consists of
sensors (temperature sensor, lux sensor), armcontroller board, multifunction energy meter,
ESP8266 Wi-Fi moduleand Wi-Fi router.
Authors: Asilahtul Afrına Samsudın1 , Norharyati Harum , Nur Atikah Arbain , Erman Hamid
Publisher: Alochana Chakra Journal Volume IX, Issue IV, April/2020 ISSN NO:2231-3990
One of the primary motivations for embarking on the workspace automation project
is the imperative to adapt to digital transformation. As organizations undergo
digitalization initiatives to stay competitive in today's fast-paced business landscape,
there is a pressing need to modernize work environments and leverage technology to
drive innovation. Workspace automation aligns with this overarching goal by harnessing
advanced technologies such as artificial intelligence, robotics, and data analytics to
create smarter, more agile workplaces capable of meeting the demands of the digital age.
CHAPTER 2
HARDWARE ARCHITECTURE
ESP8266 Module: Similar to the master node, the slave node will be powered by
an ESP8266 module to communicate with the master node and control various
sensors and actuators.
Sensors:
1. IR Sensor: Used for detecting vehicles entering or leaving the
parking area.
Control Logic:
The slave node will process data from sensors and execute control logic accordingly. For
the parking system, it will monitor vehicle presence using the IR sensor and control the
motor to open/close gates. For fire detection, it will monitor the flame sensor and trigger
alarms and alerts if a fire is detected. It will communicate with the master node to
provide status updates and receive control commands.
Communication Protocol:
The master and slave nodes will communicate via a custom protocol over Wi-Fi. The
protocol will include commands for data exchange, status updates, and control signals.
Power Supply:
Both nodes will require a stable power supply, which can be provided through a suitable
power adapter or a battery system with adequate voltage and current capacity.
The electronics for both nodes will be housed in suitable enclosures to protect them from
environmental factors such as dust, moisture, and temperature fluctuations.
Mounting hardware will be provided to securely install the nodes in their respective
locations.
The LCD display provides a visual interface for the parking system, showing
information such as available parking spaces, occupied spaces, and other relevant
details. It receives data from the master node and presents it to the user.
The slave node is responsible for collecting data from various sensors and controlling
the automation components based on the received information. It communicates with
the master node via Wi-Fi.
The infrared (IR) sensor detects the presence of vehicles in the parking spaces. It
sends signals to the slave node indicating whether a parking spot is occupied or
vacant.
The flame sensor detects the presence of flames or fire within the parking area. It
provides fire detection and monitoring capabilities.
The motor is used for activating the sprinkler system when a fire is detected. The
slave node can control the motor to activate the sprinkler system and sprinkle water
to extinguish the fire.
The relay module allows the automation system to control different electrical devices
or circuits. It can switch power on/off to components such as lights, motors, or other
AC/DC devices.
The bulb is used for power control. The slave node can control the bulb to provide
power to specific components or circuits based on the system requirements.
The buzzer generates audible alerts or alarms. It can be used for indicating parking
availability, sounding an alarm in case of fire detection, or other critical events.
The LED serves as a visual indicator. It can be used to display system status, indicate
parking availability, or provide feedback on different conditions, as controlled by the
slave node.
Both the master and slave nodes are equipped with Wi-Fi capabilities, allowing them
to communicate with each other over a wireless network. This enables data exchange
and coordination between the two nodes.
The automation system consists of two main components: the master node and the slave
node. The master node includes an ESP8266 module connected to an LCD display for visual
information presentation. The slave node, also equipped with an ESP8266 module,
incorporates various sensors such as an IR sensor for vehicle detection and a flame sensor for
fire detection. The slave node controls a motor for activating the sprinkler system in case of a
fire. Additionally, a 2-channel relay is used to control power to devices, including a bulb for
power control, a buzzer for audible alerts, and an LED for visual indications. Both nodes
communicate with each other using Wi-Fi connectivity provided by the ESP8266 modules.
The master node serves as the central control unit, receiving and processing data from the
slave node. It establishes communication with the slave node via Wi-Fi connectivity to gather
information on parking space occupancy and sensor readings. Based on this data, the master
node generates appropriate commands to control and coordinate the system's functions.
The slave node is responsible for data collection and sensor monitoring. It utilizes sensors
like the IR sensor to detect the presence of vehicles in parking spaces and the flame sensor to
identify fire incidents. When the slave node detects a vehicle or fire, it transmits this
information to the master node for analysis and decision-making.
In the event of a fire detection, the slave node activates the motor, which triggers the
sprinkler system. By engaging the motor, the slave node initiates the release of water from
the sprinklers, promptly extinguishing the fire and preventing its escalation.
For power control, the system incorporates a 2-channel relay. This relay module enables the
slave node to manage the electrical supply to different devices. For example, it can activate
or deactivate a bulb for lighting purposes, initiate a buzzer for audible alerts, or control an
LED for visual indications. These components provide real-time feedback and communicate
important system statuses, such as parking availability or fire detection.
CHAPTER 3
HARDWARE DESCRIPTION
3.1Node ESP8266
The ESP8266 microcontroller module stands as a pivotal component within the expansive
landscape of Internet of Things (IoT) applications. Its core boasts the robust Tensilica L106
32-bit microcontroller, capable of reaching clock speeds of up to 80 MHz. This potent
microcontroller empowers the ESP8266 to execute diverse user applications with efficiency
while seamlessly interacting with a plethora of peripherals. However, the true hallmark of the
ESP8266 lies in its integrated Wi-Fi module, which serves as the gateway to the digital
realm. This built-in Wi-Fi capability enables effortless connectivity to local networks and
facilitates communication with a myriad of devices and servers across the internet, making
the ESP8266 an indispensable asset in IoT deployments where connectivity is paramount.
Beyond its wireless prowess, the ESP8266 features an array of GPIO pins, each offering
versatile configuration options for digital input or output. These GPIO pins serve as conduits
for interfacing with an extensive range of sensors, actuators, and external devices, enabling
intricate interactions within IoT ecosystems. Moreover, certain iterations of the ESP8266
boast analog input pins, providing the ability to capture nuanced analog sensor data, such as
temperature gradients or ambient light levels. Memory-wise, the ESP8266 is endowed with
onboard flash memory for storing program code, data, and configuration settings,
supplemented by RAM for transient data storage and program execution.
Complementing its memory resources are a suite of peripherals, including SPI, I2C, UART,
PWM, and ADC interfaces, each facilitating seamless communication with external devices
and sensors. This broad peripheral support expands the ESP8266's utility across diverse
applications, from sensor networks to industrial automation systems. Programming the
ESP8266 is a straightforward affair, with developers afforded the flexibility to utilize familiar
environments such as the Arduino IDE or delve into more advanced development using C/C+
+ with the Espressif IoT Development Framework (ESP-IDF).
Applications:
Wireless Data Logging: The ESP8266 can collect data from sensors
and transmit it wirelessly to a server or cloud platform for storage and
analysis.
Fig3.1 ESP8266
The ESP8266 module plays a crucial role in the implementation of this automation
project, serving different functions in both the master and slave nodes.
By incorporating the ESP8266 module in both the master and slave nodes,
the automation system benefits from wireless communication, efficient data
exchange, and effective control. This integration enables real-time monitoring
of parking spaces, rapid response to fire incidents, and seamless coordination
of various system components.
3. Wemos D1 Mini:
At the heart of a FLAME sensor lies its sensor element, meticulously crafted from
semiconductor materials engineered to exhibit high sensitivity to specific wavelengths of
light emitted by flames. This sensitivity extends across the infrared (IR) and visible light
spectrum, enabling the sensor to discern the distinctive flickering patterns characteristic
of flames amidst ambient illumination.
To enhance its discerning capabilities, FLAME sensors are equipped with specialized
optical filters. These filters meticulously sift through incoming light, selectively
permitting wavelengths associated with flames to pass while effectively mitigating
interference from extraneous light sources, such as sunlight or artificial illumination.
Upon detecting flame signatures, the sensor's intricate signal processing circuitry swiftly
swings into action. Employing a sophisticated array of amplifiers, filters, and threshold
detectors, this circuitry meticulously analyzes the electrical signals generated by the
sensor element, parsing out flame-related phenomena from background noise with
remarkable precision.
The output interface of FLAME sensors serves as the conduit through which their
insights are communicated to broader systems. Whether through digital signals
conveying the binary presence or absence of flames, or analog signals offering nuanced
insights into flame intensity, these interfaces play a pivotal role in orchestrating swift
responses to emergent fire threats.
Crafted with durability and resilience in mind, FLAME sensors are engineered to
withstand the rigors of diverse environments, from scorching industrial settings to
outdoor installations exposed to the elements. Such robustness ensures uninterrupted
operation, even in the face of challenging conditions, safeguarding lives and assets alike.
Integrated seamlessly into broader systems encompassing fire alarm panels, gas detection
networks, and industrial control setups, FLAME sensors stand as indispensable sentinels,
tirelessly vigilant against the specter of fire. Their swift detection capabilities and
unwavering reliability empower stakeholders to proactively mitigate risks, fostering
environments characterized by enhanced safety and peace of mind.
Working principle
Output Generation: Based on the analysis of the electrical signals, the FLAME
sensor generates an output signal indicating the presence or absence of flames.
This output can be in digital form, such as a logic high or low, or analog form,
such as a voltage level proportional to flame intensity.
Integration: FLAME sensors can be integrated into larger systems, such as fire
alarm panels, gas detection networks, or industrial control systems. They provide
crucial inputs for initiating alarms, activating suppression systems, or triggering
safety protocols in response to fire hazards.
Application
Fire Alarm Systems: FLAME sensors serve as vital components in fire alarm
systems for residential, commercial, and industrial buildings. They detect the
presence of flames and trigger alarms, alerting occupants and emergency
responders to potential fire incidents.
Gas Appliances: FLAME sensors are integrated into gas-powered appliances like
furnaces, boilers, and water heaters to monitor the combustion process. They
detect the presence of flames and ensure proper ignition and combustion,
enhancing efficiency and safety while preventing gas leaks or incomplete
combustion.
Vehicle Fire Suppression Systems: FLAME sensors are utilized in vehicle fire
suppression systems installed in buses, trains, airplanes, and heavy machinery.
They detect fires in engine compartments, cargo areas, or other critical zones,
activating fire suppression mechanisms to extinguish flames and prevent further
damage.
monitor combustion processes, turbine engines, and other critical equipment for
signs of fire or overheating, helping prevent catastrophic failures and ensuring
continuous operation.
3.3 IR Sensor
An infrared (IR) sensor is a device designed to detect and measure infrared radiation
emitted or reflected by objects. These sensors are widely used in various applications,
including proximity sensing, object detection, temperature measurement, and motion
detection. The fundamental principle behind IR sensors lies in their ability to detect
variations in IR radiation levels, which are then translated into electrical signals for
further processing.
To enhance sensitivity and specificity, IR sensors may incorporate optical elements such
as lenses, filters, or mirrors. These components help focus IR radiation onto the detector
element and may also filter out unwanted wavelengths, allowing the sensor to target
specific IR bands or reject sources of interference.
IR sensors can operate in either active or passive modes. Active IR sensors emit their
own IR radiation and measure the reflection or absorption of this emitted radiation by
nearby objects. In contrast, passive IR sensors detect the IR radiation naturally emitted
by objects due to their temperature, without emitting any IR radiation themselves.
Working principle
Detection of Infrared Radiation: IR sensors contain a detector element that is
sensitive to infrared radiation. When an object emits or reflects infrared radiation,
the detector element interacts with this radiation.
Output Signal Generation: Based on the processed electrical signal, the IR sensor
generates an output signal that indicates the presence or absence of IR radiation.
This output signal can be in digital form, such as a logic high or low, or analog
form, such as a voltage or current level proportional to the intensity of the
detected IR radiation.
Active vs. Passive Operation: IR sensors can operate in either active or passive
modes. Active IR sensors emit their own IR radiation and measure its reflection
or absorption by nearby objects. Passive IR sensors, on the other hand, detect the
IR radiation naturally emitted by objects due to their temperature, without
emitting any IR radiation themselves.
Fig3.4 IR Sensor
3.4 LCD
The term LCD stands for liquid crystal display. It is one kind of electronic display
module used in an extensive range of applications like various circuits & devices like
mobile phones, calculators, computers, TV sets, etc. These displays are mainly preferred
for multi-segment light-emitting diodes and seven segments. The main benefits of using
this module are inexpensive; simply programmable, animations, and there are no
limitations for displaying custom characters, special and even animations, etc.
Working principle
When voltage is applied to the liquid crystal layer, its molecular alignment changes,
affecting light transmission.The polarizers control the passage of light, allowing specific
pixels to appear dark or bright.By manipulating the liquid crystal alignment, LCDs create
images.
Fig3.5 LCD
Types of LCDs:
Advantages:
Energy Efficiency: LCDs consume less power compared to older technologies like
CRTs.
Slim Profiles: Thin and lightweight, making them ideal for portable devices.
Wide Applications: Used in TVs, computer monitors, instrument panels, and signage.
No Image Burn-In: Unlike CRTs, LCDs don’t suffer from image persistence.
Challenges:
Features of LCD16x2
Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND
terminal of the microcontroller unit or power source.
Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect
the supply pin of the power source.
Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
Pin4 (Register Select/Control Pin): This pin toggles among command or data register,
used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data mode,
and 1 = command mode).
Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes
operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0 =
Write Operation, and 1 = Read Operation).
Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write
process, and it is connected to the microcontroller unit & constantly held high.
Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode,
only four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire
mode, 8-pins are connected to microcontroller unit like 0 to 7.
Pin15 (+ve pin of the LED): This pin is connected to +5V
Pin 16 (-ve pin of the LED): This pin is connected to GND.
3.5 I2c
Using the I2C protocol for interfacing with a 16x2 LCD (Liquid Crystal Display) offers a
streamlined and efficient solution, particularly in scenarios where pin count or available
GPIO (General Purpose Input/Output) pins on the microcontroller are limited.
To interface a 16x2 LCD with I2C, a small additional circuitry is typically used. This
includes an I2C backpack or module that acts as an intermediary between the
microcontroller and the LCD. This module typically consists of an I2C expander, such as
the PCF8574, which converts the I2C signals into the parallel interface required by the
LCD.
In this setup, the microcontroller acts as the I2C master, while the LCD module serves as
the slave device. Communication between the microcontroller and the LCD occurs over
the I2C bus, which consists of two wires: SDA (Serial Data Line) and SCL (Serial Clock
Line).
The microcontroller sends commands and data to the LCD module using I2C
write operations. These commands include instructions such as setting the
cursor position, clearing the display, and writing characters to the display.
The LCD module receives these commands, processes them, and then
controls the LCD accordingly. The actual display output is managed by the
LCD controller embedded within the module, which translates the received
commands into signals that control the individual pixels on the LCD screen.
Working principle
Initialization: The microcontroller initializes the I2C communication by sending
a start condition on the bus. This indicates the beginning of a data transfer
sequence.
Addressing: The microcontroller sends the address of the LCD module over the
I2C bus. This address is typically predetermined and unique to the module,
allowing the microcontroller to identify and communicate with it.
LCD Operation: Within the LCD module, an integrated controller interprets the
instructions received from the microcontroller and controls the display
accordingly. This controller manages tasks such as refreshing the display,
controlling the cursor, and managing backlighting (if applicable).
Fig3.7 I2c
3.6 Motor 2V
A 2V motor is a type of electric motor designed to operate efficiently and effectively
with a nominal voltage of 2 volts. These motors are engineered to function optimally
within a low-voltage range, making them suitable for applications requiring precise
control, low power consumption, and compact size. Typically used in small-scale
projects and electronics applications, 2V motors come in various types such as DC
motors, stepper motors, and brushed or brushless motors. They find use in miniature
robotics, hobbyist projects, low-power automation systems, and other applications where
space and energy efficiency are crucial considerations. To ensure proper operation, it's
essential to pair a 2V motor with an appropriate power supply capable of delivering
sufficient current at the specified voltage. Additionally, control circuitry may be required
to regulate speed, direction, and torque as per the application requirements. Despite their
lower voltage rating, 2V motors offer reliable performance and versatility in a wide
range of small-scale applications.
Working principle
Lorentz Force: When the magnetic field interacts with the current-carrying
windings, it creates a force known as the Lorentz force. This force acts
perpendicular to both the direction of the current and the magnetic field, causing
the windings to experience a mechanical force.
Rotor and Stator: In a typical motor configuration, there are two main
components: the rotor and the stator. The rotor is the moving part of the motor,
while the stator remains stationary. The windings are usually located on the
stator, while the rotor may contain permanent magnets or additional windings.
Rotational Motion: As the Lorentz force acts on the windings, it causes the rotor
to rotate within the magnetic field. The direction and speed of rotation depend on
factors such as the direction of the current flow, the polarity of the magnetic
field, and the design of the motor.
Control and Regulation: The speed and direction of rotation of the motor can be
controlled and regulated by varying factors such as the voltage applied to the
windings, the timing of commutation, and the use of additional control circuitry
such as motor drivers or controllers.
Application
The NEC (National Electrical Code)—an official document used in the electrical
industry and revised every three years—provides the technical definitions of various terms
commonly used in electrical work. The NEC includes many references to "switching
devices," which can be defined as any devices that open and close electrical circuits.
Electrical circuits must form a continuous loop, and a switching device functions like a gate
in that loop. A circuit is ON when the switching device is closed and the circuit is OFF when
the switching device is open.
3.7.1 Relay
When switching off the current to the coil, the armature is returned, by force, to its
relaxed position. This force is usually provided by a spring, but gravity can also be used in
certain applications. Most power relays are manufactured to operate in a quick manner.
Normally Open (NO): This pin is normally open unless a signal is provided to the relay
modules signal pin. So, the common contact pin smashes its link through the NC pin to
make a connection through the NO pin.
Common Contact: This pin is used to connect through the load that it is desired to switch
by using the module.
Normally Closed (NC): This NC pin is connected through the COM pin to form a closed
circuit. However, this NC connection will break once the relay is switched through
providing an active high/low signal toward the signal pin from a microcontroller.
Signal Pin: The signal pin is mainly used for controlling the relay. This pin works in two
cases like active low otherwise active high. So, in active low case, the relay activates once
when an active low signal is provided toward the signal pin, whereas, in an active high
case, the relay will trigger once a high signal is provided toward the signal pin.
However, these modules generally work on an active high signal which will strengthen the
relay coil to make contact with the common terminal with the normally open terminal.
5V VCC: This pin needs 5V DC to work. So 5V DC power supply is provided to this pin.
Ground: This pin connects the GND terminal of the power supply.
The components in a 5v relay module with a single channel include a relay, output
terminal, status LED, power LED, freewheeling diode, input connector & switching
transistor.
A 5V relay is coated with blue colour plastic material. For both AC & DC loads, the
utmost operating voltage & current are also displayed on the relay. This relay operates with
5V, so it is called a 5V relay.
Output Terminal
The output terminal of the relay module is located at the left-hand side, used to fix an
AC/DC load & AC/DC i/p power source. Every o/p connector’s terminal is connected
through NC, COM pins & NO of the relay.
The relay module consists of screws that are used to connect wires & cables. The max
current supported by this module is 10A & the max contact voltage is 250V AC & 30V DC.
Thick main cables are mainly used whenever high voltage & current load is used.
Status LED
Status LED is connected by using a current limiting resistor that is located on the top
right side of the relay module. So, this LED illustrates the relay status by activating the
relay & coil through a signal pin. The DC supplies throughout a relay coil.
Power LED
Power LED shows the condition of the power source that is connected through the
single channel module. If above 5V source is provided toward both the pins of the module
like Vcc & GND, the LED will be damaged due to high voltage.
Freewheeling Diode
The connection of this diode can be done across the coil to keep away from the back
EMF effect, so-called a flyback diode. The type of coil used in the relay is the inductive
type. Once the current supplies throughout an inductive load, then it generates a back EMF
voltage, which may harm the circuit. So, this diode is mainly used to keep away from this
effect.
Input Connector
The input connector is located on the right side of the module. This connector is
mainly used to supply a 5V power supply & input signal. In addition, it also supplies power
supply toward the power LED, relay coil & status LED.
Switching Transistor
Generally, the input signal which is given to a relay is from the I/O pins of
microcontrollers like ESP32, TM4C123, Arduino, etc. However, the highest current
sourcing capacity of GPIO pins is usually below 20mA.Therefore, a switching transistor is
used in this module is to strengthen the current to the requirement of the minimum current
level of the relay coil. A switching transistor is used to control the 5V relay from the
microcontroller’s GPIO pin. Some kinds of relay modules are available with an
optoisolator like a switching device to give optical isolation among high & low voltage
circuits. However, if a separate relay exclusive of a module is utilized & wanted to utilize
several relays within the projects, then a relay driver IC can be used to drive several arrays
from the pins of GPIO in a microcontroller.
Advantages:
• It is triggered with less current but it can also trigger high power machines.
• It can switch AC or DC
Disadvantages:
• When contacts of relay modules are used overtime then they may damage
• Noise can be generated through the opening & closing of the contacts.
3.8 Buzzer
industrial machinery. A buzzer operates by converting electrical energy into sound waves,
emitting distinct tones or frequencies that convey important information or alerts to users.
Its simplicity, versatility, and effectiveness have cemented its position as a fundamental
component in the realm of electronic signaling. At its core, a buzzer typically consists of
a coil of wire, a diaphragm, and a housing. When an electrical current is applied to the
coil, it generates a magnetic field that interacts with the diaphragm, causing it to vibrate
rapidly. These vibrations produce sound waves that propagate through the air, creating
audible tones. The frequency and intensity of the sound emitted by the buzzer depend on
various factors, including the design of the coil, the material and thickness of the
diaphragm, and the driving voltage. Buzzer technology has evolved significantly over the
years, leading to the development of various types and configurations tailored to specific
applications. Some common types of buzzers include electromagnetic buzzers,
piezoelectric buzzers, and mechanical buzzers. Each type offers distinct advantages in
terms of efficiency, size, frequency range, and durability, allowing designers to choose
the most suitable option based on the requirements of their application.
Fig3.10 Buzzer
CHAPTER 4
SOFTWARE DESCRIPTION
1. Arduino IDE
Arduino software is used to put the instruction of whole functions of this system to
the microcontroller. Here C programming language is used for coding. The program for
executing this project has been written in C language. In android application when button is
pressed, a corresponding signal is sent through the Arduino which is connected with the
soil moister sensors.
When the collected signal data from the sensors arrives the Arduino which
corresponds to the particular input is set to high. Then the signal from Arduino is send to
the motor, if the moister value is low the motor turns on if it reaches high the motor
automatically turns off. Arduino IDE version 1.8.1 is used for writing program.
The source code for the IDE is released under the GNU General Public License,
version The Arduino IDE supports the languages C and C++ using special rules of code
starting the sketch and the main program loop, that are compiled and linked with a program
stub main () into an executable cyclic executive program with the GNU toolchain, also
included with the IDE distribution.
The Arduino IDE employs the program argued to convert the executable code into a
text file in hexadecimal encoding that is loaded into the Arduino board by a loader program
in the board's firmware.
Upload - Compiling and transferring the program to the configured board. See uploading
below for details.
Note: If an external programmer is used with the board, it can be able to hold down the
"shift" key on the computer when using this icon. The text will change to "Upload using
Programmer"
Open - Presents a menu of all the sketches in the sketchbook. Clicking one will open it
within the current window overwriting its content. Note: Due to a bug in Java, this menu
doesn't scroll; if it is needed to open a sketch late in the list, use the File| Sketchbook menu
instead.
Menu Bar
File
When the File button is clicked on the Menu bar, a drop-down list will appear. It is
shown below:
New
The New button opens the new window. It does not remove the sketch which is
already present.
Open
It allows opening the sketch, which can be browsed from the folders and computer
drivers.
Open Recent
The Open Recent button contains the list of the recent sketches.
Sketchbook
It stores the current sketches created in the Arduino IDE software. It opens the
selected sketch or code in a new editor at an instance.
Examples
It shows the different examples of small projects for a better understanding of the
IDE and the board. The IDE provides examples of self-practice.
Close
The Close button closes the window from which the button is clicked.
Save
The save button is used to save the current sketch. It also saves the changes made to
the current sketch. If the name of the file is not specified, it will open the 'Save As...'
window.
Save As.
The sketch can be saved with a different name using the 'Save As...' button. It can be
able to change the name accordingly.
Preferences
Quit
The Quit button is used to close all the IDE windows. The same closed sketch will
be reopened when the Arduino IDE is opened.
Edit
When the Edit button is on the Menu bar is selected, a drop-down list appears. It is
shown below:
Undo
The Undo button is used to reverse the last modification done to the sketch while
editing.
Redo
The Redo button is used to repeat the last modification done to the sketch while
editing.
Cut
It allows us to remove the selected text from the written code. The text is further
placed to the clipboard. The text can be pasted anywhere in our sketch.
Copy
It creates a duplicate copy of the selected text. The text is further placed on the
clipboard.
The 'Copy for Forum' button is used to copy the selected text to the clipboard, which
is also suitable for posting to the forum.
Copy as HTML
The 'Copy for Forum' button is used to copy the selected text as HTML to the
clipboard. It is desirable for embedding in web pages.
Paste
The Paste button is used to paste the selected text of the clipboard to the specified
position of the cursor.
Select All
Go to line...
Comment/Document
The Comment/ document button is used to put or remove the comment mark (//) at
the beginning of the specified line.
Find Next
It highlights the next word, which has specified in the 'Find...' window. If there is no
such word, it will not show any highlighted text.
Find Previous
It highlights the previous work, which has specified in the 'Find...' window. If there is
no such word, it will not show any highlighted text.
Sketch
When the Sketch button on the Menu bar is selected, a drop-down list appears. It is
shown below:
Verify/Compile
It will check for the errors in the code while compiling. The memory in the console
area is also reported by the IDE.
Upload
The Upload button is used to configure the code to the specified board through the
It is used to override the Bootloader that is present on the board. The full capacity of
the Flash memory can be utilized while using the 'Upload Using Programmer' option. To
implement this, it is needed to restore the Bootloader using the Tools-> Burn Bootloader
option to upload it to the USB serial port.
It allows saving a .hex file and can be kept archived. Using other tools, .hex file can
also be sent to the board.
Include Library
Include Library includes various Arduino libraries. The libraries are inserted into our
code at the beginning of the code starting with the #. The libraries are imported from .zip
file.
Add File...
The Add File... button is used to add the created file in a new tab on the existing file.
For example, let's add 'Blink' file to the 'Javatpoint' file. The tab will now appear as:
It can be able to delete the corresponding file from the tab by clicking on the small
triangle -> Delete option.
Tools
When the Tools button on the Menu bar is selected, a drop-down list appears. It is
shown below:
Auto Format
The Auto Format button is used to format the written code. For example, lining the
open and closed curly brackets in the code.
Archive Sketch
The copy of the current sketch or code is archived in the .zip format. The directory of
the archived is same as the sketch.
This button is used to fix the inconsistency between the operating system char maps
and editor char map encoding.
Manage Libraries...
It shows the updated list of all the installed libraries. This option is also used to
install a new library into the Arduino IDE.
Serial Monitor
It allows the exchange of data with the connected board on the port.
Serial Plotter
The Serial Plotter button is used to display the serial data in a plot. It comes
preinstalled in the Arduino IDE.
It is used to check and update the Wi-Fi Firmware of the connected board.
Board
It is required to select the board from the list of boards. The selected board must be
similar to the board connected to the computer.
Processor
It displays the processor according to the selected board. It refreshes every time
during the selection of the board.
Port
It consists of the virtual and real serial devices present on our machine.
It gives the information about the selected board. It is needed to select the
appropriate port before getting information about the board.
Programmer
Burn Bootloader
The Bootloader is present on the board onto the microcontroller. The option is useful
when the microcontroller is purchased without the bootloader. Before burning the
bootloader, it is needed to make sure about the correct selected board and port.
Help
When the Help button on the Menu bar is selected, a drop-down list will appear. It is
shown below:
The Help section includes several documents that are easy to access, which comes
along with the Arduino IDE. It consists of the number of options such as Getting Started,
Environment, Troubleshooting, Reference, etc. It can also consider the image shown above,
which includes all the options under the Help section.
Some documents like Getting started, Reference, etc., can be accessed without the
internet connection as well. It will directly link us to the official website of Arduino.
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// WiFi credentials
IPAddress slaveIP(192, 168, 1, 2); // Example IP, replace with your slave's IP
// LCD Configuration
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.backlight();
// Connect to WiFi
WiFi.begin(ssid, password);
delay(1000);
Serial.println("Connecting to WiFi...");
Serial.println("WiFi Connected");
void loop() {
WiFiClient client;
if (!client.connect(slaveIP, 80)) {
Serial.println("Connection failed");
return;
client.print("Host: ");
client.print(slaveIP);
client.print("\r\n\r\n");
while (client.connected()) {
if (line == "\r") {
break;
response += line;
client.stop();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Parking: ");
lcd.print(response);
Copy code
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
// WiFi credentials
// Pins Configuration
ESP8266WebServer server(80);
void setup() {
pinMode(irSensorPin, INPUT);
pinMode(flameSensorPin, INPUT);
pinMode(motorPin, OUTPUT);
pinMode(relay1Pin, OUTPUT);
pinMode(relay2Pin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(motorPin, LOW);
digitalWrite(relay1Pin, LOW);
digitalWrite(relay2Pin, LOW);
digitalWrite(buzzerPin, LOW);
digitalWrite(ledPin, LOW);
// Connect to WiFi
WiFi.begin(ssid, password);
delay(1000);
Serial.println("Connecting to WiFi...");
Serial.println("WiFi Connected");
server.begin();
void loop() {
server.handleClient();
void handleDataRequest() {
if (irSensorValue == HIGH) {
data += "Occupied";
} else {
data += "Vacant";
if (flameSensorValue == HIGH) {
// Include the following pin definitions for the fan and light control
pinMode(fanRelayPin, OUTPUT);
pinMode(lightRelayPin, OUTPUT);
void handleDataRequest() {
if (irSensorValue == HIGH) {
data += "Occupied";
} else {
data += "Vacant";
if (flameSensorValue == HIGH) {
// Control the fan and light based on some conditions (e.g., time of day, occupancy, etc.)
// Turn on the fan and light if the parking space is occupied and no fire is detected
digitalWrite(fanRelayPin, HIGH);
digitalWrite(lightRelayPin, HIGH);
} else {
digitalWrite(fanRelayPin, LOW);
digitalWrite(lightRelayPin, LOW);
CHAPTER 5
The slave node incorporates a flame sensor to detect fire incidents within
the vicinity.
Upon detecting a fire, the system activates an alarm (buzzer) and triggers
a water sprinkler system using a 2V motor and 2-channel relay for
immediate fire suppression.
4. Control Automation:
The 2-channel relay enables the control of additional devices such as fans
and lights for power management within the parking area.
Users can interact with the system through the master node's LCD
display, which provides visual feedback on parking availability and fire
detection status.
Audible alerts from the buzzer and visual indicators from the LED
provide immediate feedback in response to detected events, such as
vehicle presence or fire incidents.
5.2 Discussion
The proposed project aims to create an advanced automation system utilizing two ESP8266
nodes—one as a master and the other as a slave—to manage parking spaces and enhance fire
safety measures. This system integrates various sensors and actuators to achieve its
objectives. The master node, equipped with an LCD display, provides real-time updates on
parking space availability, allowing users to quickly identify vacant spots. Meanwhile, the
slave node incorporates sensors such as an IR sensor for parking space occupancy detection
and a flame sensor for fire detection. Upon detecting a fire incident, the system triggers an
alarm, activates a water sprinkler system using a 2V motor and relays, and provides visual
and audible alerts for immediate action. Additionally, the slave node controls the power
supply to a workstation's fan and light using a bulb as an indicator, ensuring energy
efficiency and user comfort. The seamless communication between the master and slave
nodes enables efficient data exchange and coordination, enhancing the overall functionality
and effectiveness of the automation system. By integrating these components, the project
aims to create a comprehensive solution for parking management and fire safety, contributing
to a safer and more efficient environment. Further enhancements and customizations can be
implemented to tailor the system to specific requirements and extend its capabilities.
CHAPTER 6
6.1 CONCLUSION
In conclusion, the proposed automation system utilizing two ESP8266 nodes presents a
comprehensive solution for managing parking spaces and enhancing fire safety measures.
By integrating sensors such as IR and flame sensors, along with actuators like relays and a
water sprinkler system, the system effectively detects parking space occupancy and
responds promptly to fire incidents. The master node's LCD display provides real-time
updates on parking availability, while the slave node controls power to the workstation's fan
and light for energy efficiency. Through seamless communication between the master and
slave nodes, the system facilitates efficient data exchange and coordination, ensuring a safer
and more efficient environment. Moving forward, further refinements and customizations
can be made to tailor the system to specific needs and extend its capabilities, ultimately
contributing to improved parking management and fire safety in various settings.
REFER
ENCES
[1] A simple IoT project with the ESP8266 Wi-Fi module,electronut.in/an-iot-project-with-
esp8266.
[2] Rajeev Piyare and Seong Ro Lee: Smart home control and monitoringsystem using smart
phone
[5] ThingsSPEAKwebsite
[6] A nice introductory video from great scott labs about the ESP8266
[8] S. Hilton. (2012, 14 January). Progression from M2M to the Internet of Things: an
introductory blog.Available:http://blog.boschsi.com/progression fromm2mtointernetofthi
ngsanintroductoryblog Alochana Chakra Journal Volume IX, Issue IV, April/2020 ISSN
NO:2231-3990 Page No:366
REFERENCE WEBSITES
[1]. www.ijert.org
[2]. www.researchgate.net
[3]. www.scribd.com
[4]. www.semanticscholar.org
[5]. www.ieeexplore.com
[6]. www.foxdomotics.com
[7]. www.ioxone.com
[8]. www.hindawi.com
[9]. www.ncbi.nlm.nih.gov
[10]. www.mdpi.com