Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 57

Design And Development Of Embedded System And Iot 2021-22

CHAPTER 1

INTERNSHIP OBJECTIVES
An internship is a period of work experience offered by an organization for a limited period
of time. Once confined to medical graduates, the term is now used for a wide range of
placements in businesses, non-profit organizations and government agencies. They are
typically undertaken by students and graduates looking to gain relevant skills and experience
in a particular field. Employers benefit from these placements because they often recruit
employees from their best interns, who have known capabilities, thus saving time and money
in the long run. Internships are usually arranged by third-party organizations which recruit
interns on behalf of industry groups. Rules vary from country to country about when interns
should be regarded as employees. The system can be open to exploitation by unscrupulous
employers.

Typically, an internship consists of an exchange of services for experience between the intern
and the organization. Internships are used to determine if the intern still has an interest in that
field after the real-life experience. In addition, an internship can be used to create a
professional network that can assist with letters of recommendation or lead to future
employment opportunities. The benefit of bringing an intern into full-time employment is that
they are already familiar with the company, their position, and they typically need little to no
training. Internships provide current college students the ability to participate in a field of
their choice to receive hands on learning about a particular future career, preparing them for
full-time work following graduation.

Internships for professional careers are similar in some ways, but not as rigorous as
apprenticeships for professions, trade, and vocational jobs. The lack of standardization and
oversight leaves the term "internship" open to broad interpretation. Interns may be high
school students, college and university students, or post-graduate adults. These positions may
be paid or unpaid and are temporary

Dept. of ECE, BTI, Bengaluru-35 Page 1


Design And Development Of Embedded System And Iot 2021-22

Chapter 2
COMPANY PROFILE
Airobosoft products and service is an Indian based engineering and Electronics
Company headquartered in Bangalore, Karnataka, India. It is both product and service
oriented software company having its products in wireless communication Technology and
provides quality service to its valuable clients in its domain.

Fig. 2.1 Airobosoft Logo


2.1 Mission

We’re a community of Data Scientist, Robotics & Electronics Engineers, experts in Machine
Learning and more, collaborated together to work on fascinating futuristic technologies

ensuring safety and ethics empowering humans to overcome critical challenges.

2.2 Vision

vision is to develop highly autonomous systems that outperform humans at most


economically valuable work benefits all of humanity. We will attempt to directly build safe
and beneficial AI, but will also consider our mission fulfilled if our work aids others to
achieve this outcome.

Dept. of ECE, BTI, Bengaluru-35 Page 2


Design And Development Of Embedded System And Iot 2021-22

Chapter 3
ABOUT COMPANY
Airobosoft products and service is an Indian based engineering and Electronics Company
headquartered in Bangalore, Karnataka, India. It is both product and service oriented software
company having its products in wireless communication Technology and provides quality
service to its valuable clients in its domain.

3.1 HISTROY

The company was legally registered in the year 2020. In the beginning the team started
designing some protocols for wireless communication with a range up to 4 to 5 km line of
sight. The company handled various projects and successfully completed them satisfying the
client requirement. After the successful completion of the project and achieving customer
satisfaction the number of clients increased who sincerely served with respect and faith.

That is how the company started generating the revenue. Even though the team members
were experts in embedded electronics, Java, Dot net and android, the company
simultaneously established itself to develop websites and few latest apps based on the client
requirement. The company is established with well-equipped office space with good R&D
unit and supporting infrastructure. It started recruiting people with great skills and expertise
for different domains of company and started working with new hopes and enthusiasm.
Presently the company have around 25 employees including all the departments like
Embedded, Java, Dot net, android, Testing, PCB design, IOT and so on. The company is
working with many Industrial projects in different domains and working for its own products.

3.2 company stratergy

Purpose: To be a leader in the software Industry by providing enhanced services,


relationship and profitability.

Core values:

Dept. of ECE, BTI, Bengaluru-35 Page 3


Design And Development Of Embedded System And Iot 2021-22

 To incorporate good business practices in order to achieve customer satisfaction and


treating the customers with respect and faith.
 To grow through creativity, invention and innovation.
 To integrate honesty, integrity and business ethics into all aspects of the business
functioning.

Goals:
 To improve, grow and become more efficient in the field electronics engineering and
software development and develop a strong base of key clients.
 To understand customer requirements and fulfill the
 Increase the assets and investments of the organization to support the development of
services and expansion of the organization.
 To increase the productivity and improve the customer service satisfaction.
 To do Innovations in Embedded Electronics and provide quality services to deliver a
range of products.

3.3 COMPANY SERVICES

Airobosoft products and service have its own services such as,

 Embedded Applications development


 Web design and development
 IT Service
 Server Maintenance
 Project Management
 Company Products

Dept. of ECE, BTI, Bengaluru-35 Page 4


Design And Development Of Embedded System And Iot 2021-22

CHAPTER 4
TECHNOLOGIES IN THE COMPANY

4.1 INTRODUCTION TO EMBEDDED SYSTEM

Embedded system is a combination of hardware & software which is designed to perform one
or more specific set of functions. In an embedded system, there is only one application
software that is typically burned into ROM.

An embedded system is a controller with a dedicated function within a larger mechanical or


electrical system, often with real-time computing constraints. It is embedded as part of a
complete device often including hardware and mechanical parts. Embedded systems control
many devices in common use today. Ninety-eight percent of all microprocessors
manufactured are used in embedded systems.

Modern embedded systems are often based on microcontrollers (i.e. microprocessors with
integrated memory and peripheral interfaces), but ordinary microprocessors (using external
chips for memory and peripheral interface circuits) are also common, especially in more
complex systems. In either case, the processor(s) used may be types ranging from general
purpose to those specialized in certain class of computations, or even custom designed for the
application at hand. A common standard class of dedicated processors is the digital signal
processor (DSP).

Since the embedded system is dedicated to specific tasks, design engineers can optimize it to
reduce the size and cost of the product and increase the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

4.1.1 Features of Embedded System


 Embedded systems are small size, low power consumption, rugged operating ranges &
low per unit cost.

Dept. of ECE, BTI, Bengaluru-35 Page 5


Design And Development Of Embedded System And Iot 2021-22

 Embedded systems are based on microcontroller i.e CPUs with integrated memory or
peripheral interfaces.
 Wide variety of operating systems and processors are used in embedded systems.
 They are small in size.
 They are highly reliable.
 The power consumption is very low.

Fig. 4.1.a: Embedded System

An embedded system is a controller with a dedicated function within a larger mechanical or


electrical system as shown in the Fig.3.1. Embedded system Hardware components are as
follows.

 Power supply
 Processor
 Memory
 Timers/Counters
 Communication ports
 Assembler
 Application specific circuits
 Reset & oscillator circuits
 Input devices interfacing / Driver circuits

Dept. of ECE, BTI, Bengaluru-35 Page 6


Design And Development Of Embedded System And Iot 2021-22

 Output devices interfacing / Driver circuits


 Interrupt controller

An embedded system is a system that has software embedded in computer hardware. It makes
a system dedicated to a specific part of an application or product of a larger system.
Depending on the application, embedded system may be programmable or non-
programmable. Examples of embedded systems include various products such as washing
machine, microwave ovens, cameras, printers and automobiles. They use microprocessors
and microcontrollers as well as specially designed processors such as digital signal processors
(DSP).

Fig. 4.1.b: Components of Embedded System

4.1.2 APPLICATIONS OF EMBEDDED SYSTEM


Embedded systems find wide applications in day to day situations and in real time
applications few of them have been listed below.

4.1.3 EMBEDDED SYSTEM FOR DETECTING RASH DRIVING ON


HIGHWAYS
The main intention of this project is to design a highway speed-checker device that identifies
rash driving on highways and alarms the traffic authorities if the speed checker finds any
vehicle violating the set speed limits on highways.

Dept. of ECE, BTI, Bengaluru-35 Page 7


Design And Development Of Embedded System And Iot 2021-22

4.1.4 APPLICATION OF EMBEDDED SYSTEM FOR STREET LIGHT


CONTROL
The main intention of this project is to detect the movement of vehicles on highways and to
switch on street lights ahead of it, and then to switch off the street lights as the vehicle go past
the street lights to conserve energy. In this project, a PIC microcontroller is programmed by
using embedded C or assembly language.

4.1.5 EMBEDDED SYSTEM FOR TRAFFIC SIGNAL CONTROL


SYSTEM
The main goal of this project is to design a density based traffic signal system. At every
junction, the signal timing changes automatically according to the traffic density at every
junction. Traffic jam is a major problem in many cities across the world and gives regular
nightmares to the commuters and travelers.

4.1.6 APPLICATION OF EMBEDDED SYSTEM FOR VEHICLE


TRACKING
The main purpose of this project is to find the exact location of a vehicle by using a GPS
modem and in order to reduce vehicle thefts. The GSM modem sends an SMS to a predefined
mobile which stores the data in it. An LCD display is used to display the location information
in terms of latitude and longitude values. The microcontroller (AT89C52) is preprogrammed
with the Kiel software and therefore, continuously checks the GPS modem.

4.1.7 APPLICATION OF EMBEDDED SYSTEM FOR HOME


AUTOMATION SYSTEM
The main purpose of this project is to design a home automation system with the Android
application based remote control. Remote operation is performed by Android OS based
smart-phone or Tablet etc., upon a Graphical User Interface based touch screen operation. In
order to achieve this, Android application act as a transmitter that sends on/off commands to
the receiver wherein loads are connected.

4.1.8 EMBEDDED SYSTEM FOR AUTO INTENSITY CONTROL


This project is designed to auto intensity control of LED based street lights by using solar
power from the photovoltaic panels. The awareness for solar energy is increasing, and many
institutions and peoples are opting solar energy. In this project, Photovoltaic panels are used
for charging batteries by converting the sun energy into electrical energy. A solar charge
controller circuit is used to control the charging.

Dept. of ECE, BTI, Bengaluru-35 Page 8


Design And Development Of Embedded System And Iot 2021-22

4.2 INTRODUCTION TO IOT (Internet of Things)


The internet of Things (IOT) is the network of physical objects or “things” embedded with
electronics, software, sensors, and network connectivity, which enables these object to collect
and exchange data. IOT has many applications in agriculture, smart cities, smart home,
healthcare, business sectors, Traffic monitoring, transport and logistics etc. This is growing
mega trend that will influence everything from businesses to our daily personal lives.

This project is designed to auto intensity control of LED based street lights by using solar
power from the photovoltaic panels. The awareness for solar energy is increasing, and many
institutions and peoples are opting solar energy. In this project, Photovoltaic panels are used
for charging batteries by converting the sun energy into electrical energy. A solar charge
controller circuit is used to control the charging.

fi g.4.2: Internet of Things

The internet of things, or IOT, is a system of interrelated computing devices, mechanical and
digital machines, objects, animals or people that are provided with unique identifiers (UIDs)
and the ability to transfer data over a network without requiring human-to-human or human-
to-computer interaction as shown in the above Fig4.1.

The definition of the Internet of things has evolved due to the convergence of multiple

Dept. of ECE, BTI, Bengaluru-35 Page 9


Design And Development Of Embedded System And Iot 2021-22

technologies, real-time analytics, machine learning, commodity sensors, and embedded


systems. Traditional fields of embedded systems, wireless sensor networks, control systems,
automation (including home and building automation), and others all contribute to enabling
the Internet of things. In the consumer market, IoT technology is most synonymous with
products pertaining to the concept of the "smart home", covering devices and appliances
(such as lighting fixtures, thermostats, home security systems and cameras, and other home
appliances) that support one or more common ecosystems, and can be controlled via devices
associated with that ecosystem, such as smart phones and smart speakers.

4.2.1 APPLICATIONS OF IOT


Internet of Things (IOT) has introduced wide spectrum of applications. Few of the applications have
been discussed in following sections.

4.2.1.a CONSUMER APPLICATIONS

A growing portion of IOT devices are created for consumer use, including connected vehicles, home
automation, wearable technology (as part of Internet of Wearable Things (IOWT), connected health,
and appliances with remote monitoring capabilities. a. Smart home IOT devices are a part of the
larger concept of home automation, which can include lighting, heating and air conditioning, media
and security systems. Long-term benefits could include energy savings by automatically ensuring
lights and electronics are turned off. A smart home or automated home could be based on a platform
or hubs that control smart devices and appliances. For instance, using Apple's Home Kit,
manufacturers can have their home products and accessories controlled by an application in IOS
devices such as the iphone and the Apple Watch. This could be a dedicated app or IOS native
applications such as Siri. This can be demonstrated in the case of Lenovo's Smart Home Essentials,
which is a line of smart home devices that are controlled through Apple's Home app or Siri without
the need for a Wi-Fi bridge. There are also dedicated smart home hubs that are offered as standalone
platforms to connect different smart home products and these include the Amazon Echo, Google
Home, Apple's Home Pod, and Samsung's Smart Things Hub. In addition to the commercial systems,
there are many non-proprietary, open source ecosystems; including Home Assistant, OpenHAB and
Domoticz. b. Elder care One key application of a smart home is to provide assistance for those with
disabilities and elderly individuals. These home systems use assistive technology to accommodate an
owner's specific disabilities. Voice control can assist users with sight and mobility limitations while
alert systems can be connected directly to cochlear .

Dept. of ECE, BTI, Bengaluru-35 Page 10


Design And Development Of Embedded System And Iot 2021-22

4.3 HTML - HYPER TEXT MARKUP LANGUAGE


Hypertext Markup Language (HTML) is the standard markup language for documents
designed to be displayed in a web browser. It can be assisted by technologies such as
Cascading Style Sheets (CSS) and scripting languages such as JavaScript

Web browsers receive HTML documents from a web server or from local storage and
render the documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.

HTML elements are the building blocks of HTML pages. With HTML constructs, images
and other objects such as interactive forms may be embedded into the rendered page. HTML
provides a means to create structured documents by denoting structural semantics for text
such as headings, paragraphs, lists, links, quotes and other items. HTML elements are
delineated by tags, written using angle brackets.

HTML TAGS, STYLES, ATTRIBUTES:


In this section we will discuss on components of HTML language such as,
I. HTML Tags
II. HTML Styles
III. HTML attributes

HTML TAGS:
HTML tags are element names surrounded by angle brackets:
<tag name>content goes here...</tag name>
HTML tags normally come in pairs like <p> and </p>
 The first tag in a pair is the start tag, the second tag is the end tag
 The end tag is written like the start tag, but with a forward slash inserted before the
tag name.
 Basic structure of HTML program is explained by following example,
 The <!DOCTYPE html> declaration defines this document to be HTML5
 The <html> element is the root element of an HTML page
 The <head> element contains meta information about the document

Dept. of ECE, BTI, Bengaluru-35 Page 11


Design And Development Of Embedded System And Iot 2021-22

 The <title> element specifies a title for the document


 The <body> element contains the visible page content
 The <h1> element defines a large heading
 The <p> element defines a paragraph
 The start tag is also called the opening tag, and the end tag the closing tag.
 The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read
HTML documents and display them. The browser does not display the HTML
tags, but uses them to determine how to display the document.

Step1: write the code in notepad and save it in .html

Fig. 4.3.1: Screenshot for a sample HTML program

Step 2: Run the code in any browser like chrome, safari, fire fox exc.

Dept. of ECE, BTI, Bengaluru-35 Page 12


Design And Development Of Embedded System And Iot 2021-22

Fig.4.3.2: Screenshot of sample HTML program output on browser

HTML ATTRIBUTES:

 All HTML elements can have attributes

 Attributes provide additional information about an element

 Attributes are always specified in the start tag

 Attributes usually come in name/value pairs like: name="value"

Following sections we shall consider execution of simple HTML code


and its output to illustrate attribute concepts.

Dept. of ECE, BTI, Bengaluru-35 Page 13


Design And Development Of Embedded System And Iot 2021-22

a. PROGRAM TO ALLIGN A DATA

b. PROGRAM TO CREATE A FORM

Fig. 4.3.3:Screenshot for a sample HTML program to create a


form

Dept. of ECE, BTI, Bengaluru-35 Page 14


Design And Development Of Embedded System And Iot 2021-22

c.PROGRAM TO SELECT OPTIONS USING RADIO AND CHECK BUTTONS

Fig. 4.3.4: Screenshot for a sample HTML program to check buttons

4.4 CSS TUTORIAL:


CSS is a language that describes the style of an HTML document. CSS describes
how HTML element should be displayed.

4.4.1 HTML BACKGROUND COLOR


The background-color property defines the background color for an HTML
element. This example sets the background color for a page to powder blue:
Example:

<body style="background-color:powderblue;">

<h1 style="color:white;">This is a heading</h1>

Dept. of ECE, BTI, Bengaluru-35 Page 15


Design And Development Of Embedded System And Iot 2021-22

<p style="color:white;">This is a paragraph.</p> </body>

Step 1: write a simple code using HTML style attributes

Fig. 4.4.1:Screenshot for a sample HTML program for style attributes

Step 2: output for this code using HTML style attributes we get as follow.

Fig. 4.4.2: Screenshot for a sample HTML program for style attributes

Dept. of ECE, BTI, Bengaluru-35 Page 16


Design And Development Of Embedded System And Iot 2021-22

TYPES IN CSS

INLINE CSS

 It contains the CSS property in the body section attached with element is
known as inline CSS.
 This kind of style is specified within a HTML tag using style attribute.

 This can be used when a single HTML document must be styled uniquely.

Fig. . 4.4.3: Screenshot for an sample HTML program for inline CSS

INTERNAL CSS
 Internal style sheet is used to unique style for a single document.
 It is defined in <head> section of the HTML page inside the <style> tag.

Dept. of ECE, BTI, Bengaluru-35 Page 17


Design And Development Of Embedded System And Iot 2021-22

Fig. 5.9: Screenshot for sample HTML program for internal CSS

EXTERNAL CSS

External CSS is a file that contains only CSS code and is saved with a “.CSS” file
extension. This CSS file is then referenced in our HTML using the <link>
instead of
<style>. In External CSS we create a .css file and use it in our HTML page as per
our requirements. Generally external Cascading Style Sheets are used whenever
we have many HTML attributes and we can use them as required; there is no
need to rewrite the

CSS style again and again in a complete body of HTML that inherits the property
of the CSS file. There are two ways to create a CSS file. The first is to write the
CSS code in Notepad and save it as a .css file, the second one is to directly add the
style sheet in our Solution Explorer and direct Visual Studio to use it on our
HTML page.

Dept. of ECE, BTI, Bengaluru-35 Page 18


Design And Development Of Embedded System And Iot 2021-22

Fig. 5.10: Screenshot for an sample HTML program for external CSS

Dept. of ECE, BTI, Bengaluru-35 Page 19


Design And Development Of Embedded System And Iot 2021-22

Chapter 5

TASK PERFORMED IN the COMPANY

5.1 HOME AUTOMATION USING RASPBERRY PI

Block Diagram:

Fig. HOME AUTOMATION USING RASPBERRY PI

Functional description:

Fig. Raspberry Pi

Dept. of ECE, BTI, Bengaluru-35 Page 20


Design And Development Of Embedded System And Iot 2021-22

Raspberry Pi is a series of small single-board computers (SBCs) developed in the United


Kingdom by the Raspberry Pi Foundation in association with Broadcom. The Raspberry Pi
project originally leaned towards the promotion of teaching basic computer science in schools
and in developing countries. The original model became more popular than anticipated,
selling outside its target market for uses such as robotics. It is widely used in many areas,
such as for weather monitoring, because of its low cost, modularity, and open design. It is
typically used by computer and electronic hobbyists, due to its adoption of HDMI and USB
devices.

After the release of the second board type, the Raspberry Pi Foundation set up a new entity,
named Raspberry Pi Trading, and installed Eben Upton as CEO, with the responsibility of
developing technology. The Foundation was rededicated as an educational charity for
promoting the teaching of basic computer science in schools and developing countries.

The Raspberry Pi is one of the best-selling British computers. As of May 2021, more than
forty million boards have been sold. Most Pis are made in a Sony factory in Pencoed, Wales,
while others are made in China and Japan.

Fig. L293D Motor Driver

SunFounder L293D is a monolithic integrated, high voltage, high current, 4-channel driver.
Basically, this means using this chip you can use DC motors and power supplies of up to 16
Volts, that's some pretty big motors and the chip can supply a maximum current of 600mA

Dept. of ECE, BTI, Bengaluru-35 Page 21


Design And Development Of Embedded System And Iot 2021-22

per channel, the L293D chip is also what's known as a type of H-Bridge. The H-Bridge is
typically an electrical circuit that enables a voltage to be applied across a load in either
direction to an output, e.g., motor

The L293D is quadruple high-current half-H drivers. It is designed to provide bidirectional


drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to
drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as
other high-current/high-voltage loads in positive-supply applications. All inputs are TTL
compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistor
sink and a pseudo- Darlington source.

Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4
enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their
outputs are active and in phase with their inputs. When the enable input is low, those drivers
are disabled, and their outputs are off and in the high-impedance state. With the proper data
inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or
motor applications.

Fig. IR sensor

An infrared (IR) sensor is an electronic device that measures and detects infrared radiation
in its surrounding environment. Infrared radiation was accidentally discovered by an
astronomer named William Herchel in 1800. While measuring the temperature of each color
of light (separated by a prism), he noticed that the temperature just beyond the red light was
highest. IR is invisible to the human eye, as its wavelength is longer than that of visible light

Dept. of ECE, BTI, Bengaluru-35 Page 22


Design And Development Of Embedded System And Iot 2021-22

(though it is still on the same electromagnetic spectrum). Anything that emits heat
(everything that has a temperature above around five degrees Kelvin) gives off infrared
radiation.

There are two types of infrared sensors: active and passive. Active infrared sensors both emit
and detect infrared radiation. Active IR sensors have two parts: a light emitting diode (LED)
and a receiver. When an object comes close to the sensor, the infrared light from the LED
reflects off of the object and is detected by the receiver. Active IR sensors act as proximity
sensors, and they are commonly used in obstacle detection systems (such as in robots.

Fig.LDR

A photoresistor (also known as a light-dependent resistor, LDR, or photo-conductive


cell) is a passive component that decreases resistance with respect to receiving luminosity
(light) on the component's sensitive surface. The resistance of a photoresistor decreases with
increase in incident l intensity; in other words, it exhibits photoconductivity. A photoresistor
can be applied in light-sensitive detector circuits and light-activated and dark-activated
switching circuits acting as a resistance semiconductor.
In the dark, a photoresistor can have a resistance as high as several megaohms (MΩ), while in
the light, a photoresistor can have a resistance as low as a few hundred ohms. If incident light
on a photoresistor exceeds a certain frequency, photons absorbed by the semiconductor give
bound electrons enough energy to jump into the conduction band. The resulting free electrons
(and their hole partners) conduct electricity, thereby lowering resistance. The resistance range

Dept. of ECE, BTI, Bengaluru-35 Page 23


Design And Development Of Embedded System And Iot 2021-22

and sensitivity of a photoresistor can substantially differ among dissimilar devices. Moreover,
unique photoresistors may react substantially differently to photons within certain wavelength
bands.
A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor
has its own charge carriers and is not an efficient semiconductor, for example, silicon. In
intrinsic devices, the only available electrons are in the valence band, and hence the photon
must have enough energy to excite the electron across the entire bandgap. Extrinsic devices
have impurities, also called dopants, added whose ground state energy is closer to the
conduction band; since the electrons do not have as far to jump, lower energy photons (that
is, longer wavelengths and lower frequencies) are sufficient to trigger the device. If a sample
of silicon has some of its atoms replaced by phosphorus atoms (impurities), there will be
extra electrons available for conduction.

Fig. LCD
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated
optical device that uses the light-modulating properties of liquid crystals combined with
polarizers. Liquid crystals do not emit light directly, instead using a backlight or reflector to
produce images in color or monochrome. LCDs are available to display arbitrary images (as
in a general-purpose computer display) or fixed images with low information content, which
can be displayed or hidden. For instance: preset words, digits, and seven-segment displays, as
in a digital clock, are all good examples of devices with these displays. They use the same
basic technology, except that arbitrary image are made from a matrix of small pixels, while
other displays have larger elements.
LCDs can either be normally on (positive) or off (negative), depending on the polarizer
arrangement. For example, a character positive LCD with a backlight will have black
lettering on a background that is the color of the backlight, and a character negative LCD will
have a black background with the letters being of the same color as the backlight. Optical
filters are added to white on blue LCDs to give them their characteristic appearance.

Dept. of ECE, BTI, Bengaluru-35 Page 24


Design And Development Of Embedded System And Iot 2021-22

PROJECT IMPLEMENTATION:

Two bulbs and 3 motors are used in this system instead of connecting home appliances.
Light1,light2, Fan1&Fan2(motor)and Door lock(motor) are among the appliances that can be
used in this system. Home automation system is used for controlling and monitoring the
home appliances. It can be performed several ways. In this system,concept of IoT is used in
order to control the devices remotely from anywhere. Raspberry Pi is used as the board
controller to connect the appliances via input and output port. Web interface (on Mobile
phones, laptop,etc.) and Raspberry Pi are connected through internet. All the devices are
connected with Raspberry Pi. The voltage of home appliances is230V but the Raspberry Pi
voltage is 5V. So in this system,relay circuit is used to cover the high voltage to low voltage,
low voltage to high voltage which is also act as a switch. In this system, we are using two
bulbs, few dc motors as home appliances. Here two way relay are used in order to connect
bulbs.
For the program to execute and work automatically according to the embedded program we
should keep the Rpi online i.e it should be connected to the wifi. In order to access the web
interface from any where we need to provide IP address in the URL to open the webpage. It
will establish the connection between the smart phone and the Raspberry Pi board thus to the

Dept. of ECE, BTI, Bengaluru-35 Page 25


Design And Development Of Embedded System And Iot 2021-22

devices connected to the RPi. On the webpage, we are having ON, OFF and regulation
buttons for the connected devices. By using these buttons we can able to control the home
appliances which we connected with RaspberryPi.
Apart from manual regulation of the connected device, they have embedded code in the pi for
automatic regulation depending upon the weather condition(Temperature and humidity)
which is provided by the DHT11 sensor.
The door locking mechanism works on manual authentication of the entity entering the
house,i.e If any object or person comes near the IR sensor(placed on door) it will
automatically click picture of the entity which will then be displayed on the webpage. After
authentication the door lock will be unlocked using the “open” button provided for the door.
If required, the door can be once again locked remotely via the interface.

Dept. of ECE, BTI, Bengaluru-35 Page 26


Design And Development Of Embedded System And Iot 2021-22

5.2 DROWZINESS DETECTION SYSTEM(D-EYE)

BLOCK DIAGRAM:

Dept. of ECE, BTI, Bengaluru-35 Page 27


Design And Development Of Embedded System And Iot 2021-22

FUNCTIONAL DESCRIPTION:

WEBCAM:

A webcam is a video camera that feeds or streams an image or video in real time to or
through a computer network, such as the Internet. Webcams are typically small cameras that
sit on a desk, attach to a user's monitor, or are built into the hardware. Webcams can be used
during a video chat session involving two or more people, with conversations that include
live audio and video.

Webcam software enables users to record a video or stream the video on the Internet. As
video streaming over the Internet requires much bandwidth, such streams usually use
compressed formats. The maximum resolution of a webcam is also lower than most handheld
video cameras, as higher resolutions would be reduced during transmission. The lower
resolution enables webcams to be relatively inexpensive compared to most video cameras,
but the effect is adequate for video chat sessions.

Dept. of ECE, BTI, Bengaluru-35 Page 28


Design And Development Of Embedded System And Iot 2021-22

ULTRASONIC SENSOR:

An transmitter (which emits the sound using piezoelectric crystals) and the receiver (which
encounters the sound after it has travelled to and from the target).ultrasonic sensor is an
electronic device that measures the distance of a target object by emitting ultrasonic sound
waves, and converts the reflected sound into an electrical signal. Ultrasonic waves travel
faster than the speed of audible sound (i.e. the sound that humans can hear). Ultrasonic
sensors have two main components: the

In order to calculate the distance between the sensor and the object, the sensor measures the
time it takes between the emission of the sound by the transmitter to its contact with the
receiver. The formula for this calculation is D = ½ T x C (where D is the distance, T is the

Dept. of ECE, BTI, Bengaluru-35 Page 29


Design And Development Of Embedded System And Iot 2021-22

time, and C is the speed of sound ~ 343 meters/second). For example, if a scientist set up an
ultrasonic sensor aimed at a box and it took 0.025 seconds for the sound to bounce back, the
distance between the ultrasonic sensor and the box would be:
D = 0.5 x 0.025 x 343
or about 4.2875 meters

GAS SENSOR:

Gas sensors based on ceramic materials include a large variety of different sensor principles.
Ceramic gas sensors cover a large range of applications, but for certain environments, some
materials or sensor principles are favorable or some even not suitable. Thus, all the presented
types of gas sensors are currently found in applications, e.g., the detection of flammable gases
by pellistors or chemoresistive sensors (surface active-SMOX) or controlling the exhaust
catalysts in internal combustion engine cars using potentiometric or amperometric sensors
based on solid-state ion conductors. With the increasing importance of smart and connected
systems, gas sensors will gain importance as they can provide chemical information from the
surrounding environment, i.e., directly from or via the gas phase. The emerging of Industry
4.0 and the Internet of Things pose new requirements on the sensors’ sensitivity, selectivity
and stability as well as their suitability for certain applications, e.g. miniaturized systems for
small sizes and low power consumption, or highly robust sensor which operate in harsh
environments. All these requirements are demanding tasks for the development of sensor
technology on various levels, including new materials, new approaches to design and
manufacture sensor devices, develop sensor systems and analyze the data obtained by
sensors. Comping with these tasks requires a profound understanding of the fundamental
processes of ceramic gas sensors to find knowledge-based and target-oriented solutions.
Thus, the development of ceramic gas sensors should always comprise the development of
new materials, devices or systems, as well as investigating and understanding their
fundamental principles.

Dept. of ECE, BTI, Bengaluru-35 Page 30


Design And Development Of Embedded System And Iot 2021-22

VIBRATION SENSOR:

The vibration sensor is also called a piezoelectric sensor. These sensors are flexible devices
which are used for measuring various processes. This sensor uses the piezoelectric effects
while measuring the changes within acceleration, pressure, temperature, force otherwise
strain by changing to an electrical charge. This sensor is also used for deciding fragrances
within the air by immediately measuring capacitance as well as quality.
The working principle of vibration sensor is a sensor which operates based on different
optical otherwise mechanical principles for detecting observed system vibrations. The
sensitivity of these sensors normally ranges from 10 mV/g to 100 mV/g, and there are lower
and higher sensitivities are also accessible. The sensitivity of the sensor can be selected based
on the application. So it is essential to know the levels of vibration amplitude range to which
the sensor will be exposed throughout measurements.

DC MOTOR:

A DC motor is any of a class of rotary electrical motors that converts direct current electrical
energy into mechanical energy. The most common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors have some internal mechanism, either
electromechanical or electronic, to periodically change the direction of current in part of the
motor.
DC motors were the first form of motor widely used, as they could be powered from existing

Dept. of ECE, BTI, Bengaluru-35 Page 31


Design And Development Of Embedded System And Iot 2021-22

direct-current lighting power distribution systems. A DC motor's speed can be controlled over
a wide range, using either a variable supply voltage or by changing the strength of current in
its field windings. Small DC motors are used in tools, toys, and appliances. The universal
motor can operate on direct current but is a lightweight brushed motor used for portable
power tools and appliances. Larger DC motors are currently used in propulsion of electric
vehicles, elevator and hoists, and in drives for steel rolling mills. The advent of power
electronics has made replacement of DC motors with AC motors possible in many
applications.

Raspberry pi:

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor
or TV, and uses a standard keyboard and mouse. It is a capable little device that enables
people of all ages to explore computing, and to learn how to program in languages like
Scratch and Python. It’s capable of doing everything you’d expect a desktop computer to do,
from browsing the internet and playing high-definition video, to making spreadsheets, word-
processing, and playing games.

What’s more, the Raspberry Pi has the ability to interact with the outside world, and has
been used in a wide array of digital maker projects, from music machines and parent
detectors to weather stations and tweeting birdhouses with infra-red cameras. We want to see
the Raspberry Pi being used by kids all over the world to learn to program and understand
how computers work.

PROJECT IMPLEMENTATION

Dept. of ECE, BTI, Bengaluru-35 Page 32


Design And Development Of Embedded System And Iot 2021-22

Code for this project is:


# USAGE
# python pi_detect_drowsiness.py --cascade haarcascade_frontalface_default.xml --shape-
predictor shape_predictor_68_face_landmarks.dat
# python pi_detect_drowsiness.py --cascade haarcascade_frontalface_default.xml --shape-
predictor shape_predictor_68_face_landmarks.dat --alarm 1
# import the necessary packages
from imutils.video import VideoStream
from imutils import face_utils
import numpy as np
import argparse
import imutils
import time
import dlib
import cv2
import RPi.GPIO as GPIO
import time
motor = 3
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(motor,GPIO.OUT)
def euclidean_dist(ptA, ptB):
# compute and return the euclidean distance between the two
# points
return np.linalg.norm(ptA - ptB)
def eye_aspect_ratio(eye):
# compute the euclidean distances between the two sets of
# vertical eye landmarks (x, y)-coordinates
A = euclidean_dist(eye[1], eye[5])
B = euclidean_dist(eye[2], eye[4])

# compute the euclidean distance between the horizontal


# eye landmark (x, y)-coordinates

Dept. of ECE, BTI, Bengaluru-35 Page 33


Design And Development Of Embedded System And Iot 2021-22

C = euclidean_dist(eye[0], eye[3])
# compute the eye aspect ratio
ear = (A + B) / (2.0 * C)
# return the eye aspect ratio
return ear
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-c", "--cascade", required=True,
help = "path to where the face cascade resides")
ap.add_argument("-p", "--shape-predictor", required=True,
help="path to facial landmark predictor")
ap.add_argument("-a", "--alarm", type=int, default=0,
help="boolean used to indicate if TraffHat should be used")
args = vars(ap.parse_args())

# check to see if we are using GPIO/TrafficHat as an alarm


if args["alarm"] > 0:
from gpiozero import TrafficHat
th = TrafficHat()
print("[INFO] using TrafficHat alarm...")

# define two constants, one for the eye aspect ratio to indicate
# blink and then a second constant for the number of consecutive
# frames the eye must be below the threshold for to set off the
# alarm
EYE_AR_THRESH = 0.3
EYE_AR_CONSEC_FRAMES = 10
# initialize the frame counter as well as a boolean used to
# indicate if the alarm is going off
COUNTER = 0
ALARM_ON = False

# load OpenCV's Haar cascade for face detection (which is faster than
# dlib's built-in HOG detector, but less accurate), then create the
# facial landmark predictor
print("[INFO] loading facial landmark predictor...")
detector = cv2.CascadeClassifier(args["cascade"])
predictor = dlib.shape_predictor(args["shape_predictor"])

# grab the indexes of the facial landmarks for the left and
# right eye, respectively
(lStart, lEnd) = face_utils.FACIAL_LANDMARKS_IDXS["left_eye"]
(rStart, rEnd) = face_utils.FACIAL_LANDMARKS_IDXS["right_eye"]

# start the video stream thread


print("[INFO] starting video stream thread...")
vs = VideoStream(src=0).start()
# vs = VideoStream(usePiCamera=True).start()
time.sleep(1.0)

Dept. of ECE, BTI, Bengaluru-35 Page 34


Design And Development Of Embedded System And Iot 2021-22

# loop over frames from the video stream


while True:
# grab the frame from the threaded video file stream, resize
# it, and convert it to grayscale
# channels)
frame = vs.read()
frame = imutils.resize(frame, width=450)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

# detect faces in the grayscale frame


rects = detector.detectMultiScale(gray, scaleFactor=1.1,
minNeighbors=5, minSize=(30, 30),
flags=cv2.CASCADE_SCALE_IMAGE)

# loop over the face detections


for (x, y, w, h) in rects:
# construct a dlib rectangle object from the Haar cascade
# bounding box
rect = dlib.rectangle(int(x), int(y), int(x + w),
int(y + h))

# determine the facial landmarks for the face region, then


# convert the facial landmark (x, y)-coordinates to a NumPy
# array
shape = predictor(gray, rect)
shape = face_utils.shape_to_np(shape)

# extract the left and right eye coordinates, then use the
# coordinates to compute the eye aspect ratio for both eyes
leftEye = shape[lStart:lEnd]
rightEye = shape[rStart:rEnd]
leftEAR = eye_aspect_ratio(leftEye)
rightEAR = eye_aspect_ratio(rightEye)

# average the eye aspect ratio together for both eyes


ear = (leftEAR + rightEAR) / 2.0

# compute the convex hull for the left and right eye, then
# visualize each of the eyes
leftEyeHull = cv2.convexHull(leftEye)
rightEyeHull = cv2.convexHull(rightEye)
cv2.drawContours(frame, [leftEyeHull], -1, (0, 255, 0), 1)
cv2.drawContours(frame, [rightEyeHull], -1, (0, 255, 0), 1)

# check to see if the eye aspect ratio is below the blink


# threshold, and if so, increment the blink frame counter
if ear < EYE_AR_THRESH:
COUNTER += 1

Dept. of ECE, BTI, Bengaluru-35 Page 35


Design And Development Of Embedded System And Iot 2021-22

# if the eyes were closed for a sufficient number of


# frames, then sound the alarm
if COUNTER >= EYE_AR_CONSEC_FRAMES:
# draw an alarm on the frame
cv2.putText(frame, "DROWZINESS DETECTED", (10, 30),
cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2)
GPIO.output(motor,False)
time.sleep(5)
hb=1
f=open('wf1','w')
f.write(str(hb))
f.close()
else:
GPIO.output(motor,True)
hb=0
f=open('wf1','w')
f.write(str(hb))
f.close()

# otherwise, the eye aspect ratio is not below the blink


# threshold, so reset the counter and alarm
else:
COUNTER = 0

# draw the computed eye aspect ratio on the frame to help


# with debugging and setting the correct eye aspect ratio
# thresholds and frame counters
cv2.putText(frame, "EAR: {:.3f}".format(ear), (300, 30),
cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2)

# show the frame


cv2.imshow("Frame", frame)
key = cv2.waitKey(1) & 0xFF

# if the `q` key was pressed, break from the loop


if key == ord("q"):
break

# do a bit of cleanup
cv2.destroyAllWindows()
vs.stop()

2) hello
print "hello"
a=10
print a

3) Update
import RPi.GPIO as GPI
#Import GPIO library

Dept. of ECE, BTI, Bengaluru-35 Page 36


Design And Development Of Embedded System And Iot 2021-22

import requests
import time
#Import time library
def update():
payload = {"status":1}
r = requests.get("http://www.inventeron-iot.com/drowziness/api/update_data.php",
params=payload)
print(r.url)
while True:
f=open('wf1','r')
wf1 = f.read()
print wf1
if wf1 == '1':
print wf1
update()

4) Led:
import RPi.GPIO as GPIO
# calling header file for GPIO's of PI
import time
# calling for time to provide delays in program
led = 7
#giving userdefined name for GPIO pin
GPIO.setwarnings(False)
#This tells Python not to print GPIO warning messages to the screen
GPIO.setmode(GPIO.BOARD)
#Using GPIO numbering
GPIO.setup(led,GPIO.OUT)
# initialize digital pin21 as an output.

while(True): #infinate loop


GPIO.output(led,1)
#setting the pin21 high(led on)
time.sleep(0.50)
#sleep for .05 seconds
GPIO.output(led,0)
#setting the pin21 low(led off)++
time.sleep(0.50)

Eyes Location:
In order to make the image smoothing, doing some treatments before eyes location, including

Dept. of ECE, BTI, Bengaluru-35 Page 37


Design And Development Of Embedded System And Iot 2021-22

image denoising and enhancement, which is a prerequisite to ensure precise eyes location
achieve the better result [5].
The first step: Locating the eye region roughly
The edge feature analysis method means, making use of the vertical gray-scale projection
curve of the image determined the left and right borders of the face according to the convex
peak width, then making use of the horizontal gray-scale projection curve of the gotten region
determined roughly the up and down border of the eyes location region. The region that
corresponds to a face is a convex peak with a certain width by observing the vertical gray-
scale projection curve of a number of different single-face images.
The left and right borders of the convex peak generally represented the left and right borders
of the face [7]. When the left and right borders of the face are established, take the region of
the face. between the left and right borders as the study object, and then make the horizontal
gray-scale projection curve of the image, something will be found by observing. The first
minimum point of the horizontal gray-scale projection curve corresponds to the crown of the
head, the maximum point corresponds to one of the forehead, the secondary maximum point
corresponds to the central of the nose, and take the region between the central of the nose and
the crown of the head as the rough located region.

Dept. of ECE, BTI, Bengaluru-35 Page 38


Design And Development Of Embedded System And Iot 2021-22

The second step: sifting the similar eye points collection


The primary problem is selecting the appropriate template prior to the template matching [8].
In the follow-up algorithm, it is necessary to use the relative position between two eyes to
locate the two eyes from a number of similar points, so long as to ensure that there are two
real eye-points among a number of similar eye-points. 9

In order to reduce the two eyes’ sensitivity to the eye template and improve the robustness,
the system adopts the synthetic eye template of the two eyes (See Figure 2.3).

In order to select the similar eye-points, it is desirable first to establish the similarity metric.
The general way is doing the relevant operation to the local image and the image template,
the cross-correlation coefficient obtained in this way is regarded as the similarity metric (See
Formula 1).

Dept. of ECE, BTI, Bengaluru-35 Page 39


Design And Development Of Embedded System And Iot 2021-22

Two parameters are used to describe the synthetic template: template height M , width

template N .
Therein, N is the synthetic eye template, the size is M × N ;T is the average of the eye
template image; r S T is the average of the local image that matches with the template in the
expected face recognition image; (x, y) is the coordinates of search points in the face image.
According to the above formula, operating Pxy, always have Pxy , and the greater the
Pxy , the higher the matching. However, due to the synthetic eye template exists a certain
error and image acquisition will be affected by external conditions, when the interference,
these may lead to the greatest similarity is not the real eye point, so locating the eye point can
not only be determined by the size of the similarity
In order not to miss the real eye point, the way is selecting roughly a similar eye point
collection including the two real eye points (See Figure 2.4) Xi , Yi) i= 1,2,…n} , and
then obtains the two real eye points through prior knowledge calibration. n is a optional
coefficient.

3.2.2 Eye Tracking


This system adopts the improved target tracking algorithm when it traces the eyes. The
essence of target tracking is that it carries on the pinpoint while recognizing target in the
image sequence.
The target tracking algorithm realized in this system divides into two parts: the primary
algorithm and the modified algorithm. The primary algorithm is based on the template
matching technology, namely, after pinpointing the eye point to the first frame image, it
selects this eye point in the image as the tracking object and extracts appearance information
of this eye point as the new eye template, in the following sequence image, it will match the

Dept. of ECE, BTI, Bengaluru-35 Page 40


Design And Development Of Embedded System And Iot 2021-22

candidate image region and this new eye template, then take the most similar image region as
the position that this eye point in the current image

The modified algorithm adopts the method of selecting candidate image region. It reduces the
match times greatly, and then reduces the computation complexity of the system. The system
uses the image gathering card for gathering image, and the rate is 25 frame per second, while
the pilot driving, the head’s amount of exercise is very small, therefore the position difference
between the two neighboring frame images is very small, namely, it can obtain the roughly
position of the eye point in the next image after pinpointing real eye point.
After adopts the target tracking algorithm, the system does not need to carry on an eye
pinpointing for every frame image in the image sequence, but only repositions the eye point
to the image which loses the tracking object, thus it improves operating efficiency of the
system greatly and satisfies real-time request of the system too.

SRS(Software Requirement Specification):


A software requirements specification (SRS) is a document that captures complete
description about how the system is expected to perform. It is usually signed off at the end
of requirements engineering phase.

Qualities of SRS:
 Correct
 Unambiguous
 Complete
 Consistent
 Ranked for importance and/or stability
 Verifiable
 Modifiable
 Traceable

Reduce the development effort:

The preparation of the SRS forces the various concerned groups in the customer's
organization to consider rigorously all of the requirements before design begins and reduces

Dept. of ECE, BTI, Bengaluru-35 Page 41


Design And Development Of Embedded System And Iot 2021-22

later redesign, recoding, and retesting. Careful review of the requirements in the SRS can
reveal omissions, misunderstandings, and inconsistencies early in the development cycle
when these problems are easier to correct.

Provide a basis for estimating costs and schedules:

The description of the product to be developed as given in the SRS is a realistic basis for
estimating project costs and can be used to obtain approval for bids or price estimates.
[NOTE: Again, we use the SRS as the basis for our fixed price estimates]

Provide a baseline for validation and verification:

Organizations can develop their validation and Verification plans much more productively
from a good SRS. As a part of the development contract, the SRS provides a baseline against
which compliance can be measured. [NOTE: We use the SRS to create the Test Plan].

Facilitate transfer:

The SRS makes it easier to transfer the software product to new users or new machines.
Customers thus find it easier to transfer the software to other parts of their organization, and
suppliers find it easier to transfer it to new customers.

Serve as a basis for enhancement:

Because the SRS discusses the product but not the project that developed it, the SRS serves
as a basis for later enhancement of the finished product. The SRS may need to be altered, but
it does provide a foundation for continued production evaluation

In order to enhance the accuracy rate of detection to the fatigue state of the pilot, this system
extracts four state variables from the eye condition: It contains the frequency of blink, the
average degree of opening eyes, the eye stagnation time and the longest time of closing eyes
[2]. According to the parameter value of the pilot’s sober condition by statistics, it can make
the corresponding judgment by the fatigue state of the pilot.

Considered the changing driving environment, the detection system must work normally in
the night or the situation of inadequate lighting, therefore, this system adopts the camera with

Dept. of ECE, BTI, Bengaluru-35 Page 42


Design And Development Of Embedded System And Iot 2021-22

light source(automatic opening when the light is inadequate) to gather sequence image, in
order to reduce the disturbance from the external environment. When the system reads in the
frame image, it carries on the denoising and the image intensification process to the image
first, and then obtains two real eye points. Afterward, it adopts the target tracking method to
track the already targeted eye point [1]. At last, it can calculate the area of the eyes and make
the judgment and the early warning to the fatigue state of the pilot. The functional block
diagram of the system is shown in the following Figure 3.1.

4.2 Interface Requirements:

User Interface:

Every user may not be skilled at handling the interfaces. Hence the product that we developed
used a simple and easy to use GUI Input from user is via keyboard.

Hardware Interface:

The minimum requirements that are required to interact with a simple GUI are well enough to
support this product.

Software Interface:

This product is developed in Windows XP environment using MATLAB. The toolboxes used
to develop this product are Image Processing Toolbox and Computer Vision System Toolbox.

Dept. of ECE, BTI, Bengaluru-35 Page 43


Design And Development Of Embedded System And Iot 2021-22

This project is completely implemented using these two tool boxes.

4.3 Hardware and Software Requirements

Hardware Requirements:

Processor : Intel® Core™ i3 2.53 GHz / Above

RAM : RAM 2 GB / Above

HDD : 120 GB / Above

Software Requirements:

Operating System : Windows XP and above

Developing Environment : MATLAB R2011a

RESULT:
Normal condition

Alert condition

Dept. of ECE, BTI, Bengaluru-35 Page 44


Design And Development Of Embedded System And Iot 2021-22

4.3 HOME AUTOMATION WITH ALEXA USING INTERNET OF

Dept. of ECE, BTI, Bengaluru-35 Page 45


Design And Development Of Embedded System And Iot 2021-22

THINGS

BLOCK DIAGRAM

Fig. FUNCTIONAL DESCRIPTION OF COMPONENTS

ESP 32-WROOVER

ESP32-WROVER-E and ESP32-WROVER-IE are two powerful, generic WiFi-BT-BLE


MCU modules that target awide variety of applications, ranging from low-power sensor
networks to the most demanding tasks, such asvoice encoding, music streaming and MP3
decoding.
ESP32-WROVER-E comes with a PCB antenna, and ESP32-WROVER-IE with an IPEX
antenna. They both feature a 4 MB external SPI flash and an additional 8 MB SPI Pseudo
static RAM (PSRAM)

Dept. of ECE, BTI, Bengaluru-35 Page 46


Design And Development Of Embedded System And Iot 2021-22

Categories Items Specifications


Certification RF certification FCC/CE-RED/SRRC
Test Reliablity HTOL/HTSL/uHAST/TCT/ESD
Wi-Fi Protocols 802.11 b/g/n (802.11n up to 150
Mbps)
A-MPDU and A-MSDU
aggregation and 0.4 µs guard
interval support
Frequency range 2412 ~ 2484 MHz
Bluetooth Protocols Bluetooth v4.2 BR/EDR and
BLE specification
Radio NZIF receiver with –97 dBm
sensitivity
Class-1, class-2 and class-3
transmitter
AFH
Audio CVSD and SBC
Module interfaces SD card, UART, SPI, SDIO,
I2C, LED PWM, Motor PWM, I
2S, IR, pulse counter, GPIO,
capacitive touch sensor, ADC,
DAC, Two-Wire Automotive
Interface (TWAI®, compatible
with ISO11898-1)
On-chip sensor Hall sensor
Integrated crystal 40 MHz crystal
Hardware Integrated SPI flash 4 MB
Integrated PSRAM 8 MB
Operating voltage/Power 3.0 V ~ 3.6 V
supply
Minimum current delivered by 500 mA
power supply
Recommended operating –40 °C ~ 85 °C
temperature range
Package size (18.00±0.15) mm × (31.40±0.15)
mm × (3.30±0.15) mm
Moisture sensitivity level Level 3
(MSL)

Relay :

Dept. of ECE, BTI, Bengaluru-35 Page 47


Design And Development Of Embedded System And Iot 2021-22

 Relays are switches that open and close circuits electromechanically or electronically.
Relays control one electrical circuit by opening and closing contacts in another circuit.
As relay diagrams show, when a relay contact is normally open (NO), there is an open
contact when the relay is not energized. When a relay contact is Normally Closed (NC),
there is a closed contact when the relay is not energized. In either case, applying
electrical current to the contacts will change their state.
 Relays are generally used to switch smaller currents in a control circuit and do not
usually control power consuming devices except for small motors and Solenoids that
draw low amps. Nonetheless, relays can "control" larger voltages and amperes by having
an amplifying effect because a small voltage applied to a relays coil can result in a large
voltage being switched by the contacts.
 Protective relays can prevent equipment damage by detecting electrical abnormalities,
including overcurrent, undercurrent, overloads and reverse currents. In addition, relays
are also widely used to switch starting coils, heating elements, pilot lights and audible
alarms.

AC LIGHT DIMMER

The AC Dimmer is designed to control the alternating current voltage, which can transfer

Dept. of ECE, BTI, Bengaluru-35 Page 48


Design And Development Of Embedded System And Iot 2021-22

current up to 600V/5А. In most cases, Dimmer is used to turning the power ON/OFF for
lamps or heating elements, it can also be used in fans, pumps, air cleaners, e.t.c.

Lately, Dimmer has become an often-used decision for smart home systems. For example,
when you need to smoothly change the light brightness. The lamp is slowly turning ON or
OFF, creating a comfortable atmosphere. Dimmer works most effectively with filament
lamps. It’s less stable with low brightness dimmable LED lamps, but with moderate and high
brightness it will perform a solid job. Note that luminescent lamps (gas discharge lamps) do
not support dimming.

The power part of the dimmer is isolated from the control part, to exclude the possibility of
high current disruption to a microcontroller. The logical level is tolerant to 5V and 3.3V,
therefore it can be connected to the microcontroller with 5V and 3.3V level logic.

In Arduino, the dimmer is controlled with RBDdimmer.h library, which uses external
interrupts and process time interrupts. It simplifies the code writing and gives more
processing time for the main code. This is why you can control multiple Dimmers from one
microcontroller

ALEXA:

Alexa is a voice-controlled virtual assistant. She can play audio, control your smart home,
answer questions and engage your favorite services to keep you organized, informed, safe,
connected and entertained.

Digital assistants are poised to follow the smartphone as the next great technological

Dept. of ECE, BTI, Bengaluru-35 Page 49


Design And Development Of Embedded System And Iot 2021-22

phenomenon. Alexa was the first significant entrant into the market, and her head start
remains advantageous as the likes of Google (Google Assistant), Apple (Siri), Microsoft
(Cortona) and Samsung (Bixby) play catch-up.

SPST SWITCHES:

A Single Pole Single Throw (SPST) switch is a switch that only has a single input and can
connect only to one output. This means it only has one input terminal and only one output
terminal.

A Single Pole Single Throw switch serves in circuits as on-off switches. When the switch is
closed, the circuit is on. When the switch is open, the circuit is off.
SPST switches are, thus, very simple in nature

16*2 LCD:

An LCD (Liquid Crystal Display) screen is an electronic display module and has a wide
range of applications. A 16x2 LCD display is very basic module and is very commonly used
in various devices and circuits. A 16x2 LCD means it can display 16 characters per line and
there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. The 16 x 2
intelligent alphanumeric dot matrix display is capable of displaying 224 different characters
and symbols. This LCD has two registers, namely, Command and Data.
Command register stores various commands given to the display. Data register stores data to

Dept. of ECE, BTI, Bengaluru-35 Page 50


Design And Development Of Embedded System And Iot 2021-22

be displayed. The process of controlling the display involves putting the data that form the
image of what you want to display into the data registers, then putting instructions in the
instruction register. In your arduino project Liquid Crystal Library simplifies this for you so
you don't need to know the low-level instructions. Contrast of the display can be adjusted by
adjusting the potentiometer to be connected across VEE pin.

BULB:

Fig. bulbs
LEDs use heat sinks to absorb the heat produced by the LED and dissipate it into the
surrounding environment. This keeps LEDs from overheating and burning out. Thermal
management is generally the single most important factor in the successful performance of an
LED over its lifetime. The higher the temperature at which the LEDs are operated, the more
quickly the light will degrade, and the shorter the useful life will be.

LED products use a variety of unique heat sink designs and configurations to manage heat.
Today, advancements in materials have allowed manufacturers to design LED bulbs that
match the shapes and sizes of traditional incandescent bulbs. Regardless of the heat sink
design, all LED products that have earned the ENERGY STAR have been tested to ensure
that they properly manage the heat so that the light output is properly maintained through the
end of its rated life.

PROJECT IMPEMETATAION
For this Alexa home automation project, I have used the Arduino IDE to program, First

Dept. of ECE, BTI, Bengaluru-35 Page 51


Design And Development Of Embedded System And Iot 2021-22

update the preferences -> additional boards manager


URLs: https://dl.espressif.com/dl/package_esp32_index.json, After that install
the ESPAlexa library. 
After uploading the code to esp32, the blue LED connected with pin D0 should turn on which
indicate that board has an active internet connection. If the internet is not available, the blue
LED will turn off. Then you can control the relay module with push buttons.And when the
internet comes back the NodeMCU will automatically connect with the WiFi and the blue
LED will turn on.Then you can control the home appliances with Alexa and the pushbuttons.
Configure Amazon Alexa App

 While configuring the Amazon Alexa App, the NodeMCU or ESP32, Amazon Echo dot,
and the Mobile should be connected with same the wifi.
 Once the Alexa App found all the devices, you can control those devices with voice
commands using the Alexa echo dot.
 You may face No new devices found error while adding the devices with Alexa.
 Then restart the echo dot, after restart once the echo dot connect with the same WiFi, tap
on “Try discovery again”.
 Now, the IoT project on Alexa home automation is ready, so you can control the home
appliances with voice commands.
 “Alexa, turn on light”, “Alexa, turn off light”, “Alexa, turn on studio light”, etc.

Dept. of ECE, BTI, Bengaluru-35 Page 52


Design And Development Of Embedded System And Iot 2021-22

5.4 Smart Wheel chair

Dept. of ECE, BTI, Bengaluru-35 Page 53


Design And Development Of Embedded System And Iot 2021-22

Introduction:

Smart Wheel Chair is mechanically controlled devices designed to have self-


mobility with the help of the user command. This reduces the user’s human
effort and force to drive the wheels for wheelchair .Furthermore it also provides
an opportunity for visually or physically impaired persons to move from one
place to another. The wheelchair is also provided with obstacle detection system
which reduces the chance of collision while on the journey.
Smart wheelchair has gained a lot of interests in the recent times. These devices
are useful especially in transportation from one place to another. The machines
can also be used in old age homes where the old age persons have difficulty in
their movements. The devices serve as a boon for those who have lost their
mobility. Different types of smart wheelchair have been developed in the past
but the new generations of wheelchairs are being developed and used which
features the use of artificial intelligence and hence leaves a little to tinker about
to the user who uses the wheel chair. The project also aims to build a similar
wheel chair which would have a sort of intelligence and hence helps the user on
his/her movement.

Functional Description: -

Raspberry Pi

Raspberry Pi is a series of small single-board computers (SBCs) developed in the United

Dept. of ECE, BTI, Bengaluru-35 Page 54


Design And Development Of Embedded System And Iot 2021-22

Kingdom by the Raspberry Pi Foundation in association with Broadcom. The Raspberry Pi


project originally leaned towards the promotion of teaching basic computer science in schools
and in developing countries. The original model became more popular than anticipated,
selling outside its target market for uses such as robotics. It is widely used in many areas,
such as for weather monitoring, because of its low cost, modularity, and open design. It is
typically used by computer and electronic hobbyists, due to its adoption of HDMI and USB
devices.

After the release of the second board type, the Raspberry Pi Foundation set up a new entity,
named Raspberry Pi Trading, and installed Eben Upton as CEO, with the responsibility of
developing technology. The Foundation was rededicated as an educational charity for
promoting the teaching of basic computer science in schools and developing countries.

The Raspberry Pi is one of the best-selling British computers. As of May 2021, more than
forty million boards have been sold. Most Pis are made in a Sony factory in Pencoed, Wales,
while others are made in China and Japan.

L293D Motor Driver:

SunFounder L293D is a monolithic integrated, high voltage, high current, 4-channel driver.
Basically, this means using this chip you can use DC motors and power supplies of up to 16
Volts, that's some pretty big motors and the chip can supply a maximum current of 600mA
per channel, the L293D chip is also what's known as a type of H-Bridge. The H-Bridge is
typically an electrical circuit that enables a voltage to be applied across a load in either
direction to an output, e.g., motor

The L293D is quadruple high-current half-H drivers. It is designed to provide bidirectional


drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to
drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as

Dept. of ECE, BTI, Bengaluru-35 Page 55


Design And Development Of Embedded System And Iot 2021-22

other high-current/high-voltage loads in positive-supply applications. All inputs are TTL


compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistor
sink and a pseudo- Darlington source.
Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4
enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their
outputs are active and in phase with their inputs. When the enable input is low, those drivers
are disabled, and their outputs are off and in the high-impedance state. With the proper data
inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or
motor applications.

WORKING:
Operating current for one DC motor is 1A, the L293D motor driver helps to control two DC
motors along with the controller inputs. The dc motor has two connections, the rotation of the
motor is dependent on the direction of the current flowing. To switch between the drivers
L293D driver is used.
If the IR sensor input is high, the motor rotation will stop. Depending on the switch inputs,
the rotation of the motors will change. If the chair has to move forward or backward, one
motor should be rotating clockwise and the other should be rotating anticlockwise, therefore
different commands are set to move the chair forward backward right or left, sliding switches
are used here for this purpose.
The power supply circuit provides power for all the hardware components as shown. An
ultrasonic sensor can be used to determine the obstacle distance, we can also apply PWM so
depending on the obstacle distance the motor rotation speed can be controlled, if the obstacle
is very near the motor should be stopped immediately, if the obstacle distance is far the motor
can stop in a slow pace.
.

Project Implementation:

Dept. of ECE, BTI, Bengaluru-35 Page 56


Design And Development Of Embedded System And Iot 2021-22

Dept. of ECE, BTI, Bengaluru-35 Page 57

You might also like