Professional Documents
Culture Documents
Indore Institute of Science and Technology A Training Report On "Internet of Things"
Indore Institute of Science and Technology A Training Report On "Internet of Things"
TRAINING REPORT ON
“INTERNET OF THINGS”
“INTERNET OF THINGS”
Session-2018-19
IIST Indore
CERTIFICATE
This is to certify that “Yash Sharma (0818EC151032)” have successfully completed their industrial
training on “Internet of Things” during the year 2018-2019 in the fulfillment of the award of the degree
of Bachelor of Engineering in Electronics and Communication.
CERTIFICATE
This is to certify that the Industrial Training entitled “Internet of Things” submitted to the Rajiv Gandhi
Proudyogiki Vishwavidyalaya, Bhopal, by Yash Sharma (0818EC151032), during the academic year 2018-
2019, is a record of her own work and is accepted as a partial fulfillment of part of VII semester curriculum
in Bachelor of Engineering (Electronics and Communication) Industrial Training.
ACKNOWLEDGEMENT
I gratefully thank M2R Technomations and our trainer Mr. Siddhartha Bhatia for guiding me to
develop my skills in IoT and to use them in real-world situations.
I express my special thanks to our Director General Mr. Arun S Bhatnagar and Mr. Ankit
Jain(HOD, EC Dept) for providing me all necessary guidance and support from the institute.
I want to thank IIST for providing resources and support to undergo the industrial training.
Internet of Things has very vast applications and scope, and this training has surely enhanced
my technical skills and knowledge.
THANK YOU
Yash Sharma
(0818EC151032)
4. PCB Designing
The company also offers PCB layout designing & prototyping as a standalone service to build a
customized product or to convert any existing schematic diagrams that users might have already
designed into fully assembled prototypes.
5. Consultancy
This involves in-house R&D to identify and propose a solution to customer based on customer’s
requirements. M2R develops prototypes which are as reliable as working products. It helps
customers engineering teams to identify and use latest technologies in their products. It
contributes at whole product development as well as sub-system development.
Chapter 2: About Internet of Things
(A) Introduction
The "Internet of things" (IoT) is becoming an increasingly growing trend in technology. It's a
concept that not only has the potential to impact how we live but also how we work. But what
exactly is the "Internet of things" and what impact is it going to have on you, if any? These
questions are answered as follows.
Broadband Internet has become more widely available, the cost of connecting is decreasing,
more devices are being created with Wi-Fi capabilities and sensors built into them, technology
costs are going down, and smartphone penetration is sky-rocketing. All these things are creating
a "perfect storm" for the IoT.
IoT is the concept of connecting any device with an ON and
OFF switch to the Internet and/or to each other. This
includes everything from cellphones, coffee makers,
washing machines, headphones, lamps, wearable devices
and almost anything else we can think of. This also applies
to components of machines. If an appliance or machine has
an on and off switch, then chances are it can be a part of the
IoT.
It is estimated that by 2020 there will be over 26 billion connected devices... That's a lot of
connections. Some even estimate this number to be much higher, over 100 billion. The IoT is a
giant network of connected "things". The relationship will be between people-people, people-
things, and things-things. A “thing” in the internet of things can be a person with a heart monitor
implant, a farm animal with a biochip transponder, an automobile that has built-in sensors to
alert the driver when tire pressure is low or any other natural or man-made object that can be
assigned an IP address and is able to transfer data over a network.
The new rule for the future is going to be, "Anything that can be connected, will be connected."
There are many examples for what this might look like or what the potential value might be. For
example, you are on your way to a meeting; your car could have access to your calendar and
already know the best route to take. If the traffic is heavy your car might send a text to the other
party notifying them that you will be late. What if your alarm clock wakes up you at 6 a.m. and
then notifies your coffee maker to start brewing coffee for you? What if your office equipment
knew when it was running low on supplies and automatically re-ordered more? What if the
wearable device you used in the workplace could tell you when and where you were most active
and productive and shared that information with other devices that you used while working?
(B) Applications and Advantages:
There are numerous real-world applications of the internet of things, ranging from consumer IoT
and enterprise IoT to manufacturing and industrial IoT (IIoT). IoT applications span numerous
verticals, including automotive, telco, energy and more.
In the consumer segment, for example, smart homes that are equipped with smart thermostats,
smart appliances and connected heating, lighting and electronic devices can be controlled
remotely via computers, smartphones or other mobile devices.
Wearable devices with sensors and software can collect and analyze user data, sending messages
to other technologies about the users with the aim of making users' lives easier and more
comfortable. Wearable devices are also used for public safety -- for example, improving first
responders' response times during emergencies by providing optimized routes to a location or
by tracking construction workers' or firefighters' vital signs at life-threatening sites.
In healthcare, IoT offers many benefits, including the ability to monitor patients more closely to
use the data that's generated and analyze it. Hospitals often use IoT systems to complete tasks
such as inventory management, for both pharmaceuticals and medical instruments.
Smart buildings can, for instance, reduce energy costs using sensors that detect how many
occupants are in a room. The temperature can adjust automatically -- for example, turning the
air conditioner on if sensors detect a conference room is full or turning the heat down if everyone
in the office has gone home.
In agriculture, IoT-based smart farming systems can help monitor, for instance, light,
temperature, humidity and soil moisture of crop fields using connected sensors. IoT is also
instrumental in automating irrigation systems.
In a smart city, IoT sensors and deployments, such as smart streetlights and smart meters, can
help alleviate traffic, conserve energy, monitor and address environmental concerns, and
improve sanitation
Chapter 3: IoT Backbone
First let us understand what IP is. IP (short for Internet Protocol) specifies the technical format of
packets and the addressing scheme for computers to communicate over a network. Most
networks combine IP with a higher-level protocol called Transmission Control Protocol (TCP),
which establishes a virtual connection between a destination and a source.
IP by itself can be compared to something like the postal system. It allows you to address a
package and drop it in the system, but there's no direct link between you and the recipient.
TCP/IP, on the other hand, establishes a connection between two hosts so that they can send
messages back and forth for a period.
IPV4: IPv4 stands for Internet Protocol version 4. It is the underlying technology that makes it
possible for us to connect our devices to the web. Whenever a device accesses the Internet
(whether it's a PC, Mac, smartphone or other device), it is assigned a unique, numerical IP address
such as 99.48.227.227. To send data from one computer to another through the web, a data
packet must be transferred across the network containing the IP addresses of both devices.
Without IP addresses, computers would not be able to communicate and send data to each other.
It's essential to the infrastructure of the web.
IPv4 uses 32 bits for its Internet addresses. That means it can support 2^32 IP addresses in total
— around 4.29 billion. That may seem like a lot, but all 4.29 billion IP addresses have now been
assigned to various institutions, leading to the crisis we face today. We haven't run out of
addresses quite yet. Many of them are unused and in the hands of institutions like MIT and
companies like Ford and IBM. More IPv4 addresses are available to be assigned and more will be
traded or sold (since IPv4 addresses are now a scarce resource), but they will become a scarcer
commodity over the next two years until it creates problem for the web.
32-bit numeric address (IPv4) is written in decimal as four numbers separated by periods. Each
number can be zero to 255. For example, 1.160.10.240 could be an IP address.
IPV6: IPv6 is the sixth revision to the Internet Protocol and the successor to IPv4. It functions
similarly to IPv4 in that it provides the unique, numerical IP addresses necessary for Internet-
enabled devices to communicate. However, it does sport one major difference: it utilizes 128-bit
addresses.
IPv6 utilizes 128-bit Internet addresses. Therefore, it can support 2^128 Internet addresses —
340,282,366,920,938,000,000,000,000,000,000,000,000 of them to be exact. That's a lot of
addresses, so many that it requires a hexadecimal system to display the addresses. In other
words, there are more than enough IPv6 addresses to keep the Internet operational for a very,
very long time.
IPv6 addresses are 128-bit IP address written in hexadecimal and separated by colons. An
example IPv6 address could be written like this- 3ffe:1900:4545:3:200:f8ff:fe21:67cf.
A protocol is an agreed-upon set of procedures and rules. When two computers follow the same
protocols—the same set of rules—they can understand each other and exchange data.
TCP/IP and UDP are also protocols. Let us understand about them in more detail:
TCP/IP: Transmission Control Protocol (TCP) and Internet Protocol (IP) are two distinct computer
network protocols. TCP and IP are so commonly used together, however, that TCP/IP has become
standard terminology for referring to this suite of protocols.
Transmission Control Protocol divides a message or file into packets that are transmitted over
the internet and then reassembled when they reach their destination. Internet Protocol is
responsible for the address of each packet, so it is sent to the correct destination.
TCP/IP dictates how information should be packaged (turned into bundles of information called
packets), sent, and received, as well as how to get to its destination.
There are four total layers of TCP/IP protocol, each of which is listed below with a brief
description.
UDP: User Datagram Protocol (UDP) is part of the Internet Protocol suite used by programs
running on different computers on a network. UDP is used to send short messages called
datagrams. User datagram protocol is an open systems interconnection (OSI) transport layer
protocol for client- server network applications. UDP uses a simple transmission model but does
not employ handshaking dialogs for reliability, ordering and data integrity. The protocol assumes
that error-checking and correction is not required, thus avoiding processing at the network
interface level.
UDP is widely used in video conferencing and real-time computer games. The protocol permits
individual packets to be dropped and UDP packets to be received in a different order than that
in which they were sent, allowing for better performance.
UDP network traffic is organized in the form of datagrams, which comprise one message units.
The first eight bytes of a datagram contain header information, while the remaining bytes contain
message data. A UDP datagram header contains four fields of two bytes each:
An MQTT session is divided into four stages: connection, authentication, communication and
termination. A client starts by creating a TCP/IP connection to the broker by using either a
standard port or a custom port defined by the broker's operators. The standard ports are
1883and 8883.
QOS: QOS means Quality of Service. The three different quality of service levels determine how
the content is managed by the MQTT protocol. Although higher levels of QoS are more reliable,
they have more latency and bandwidth requirements, so subscribing clients can specify the
highest QoS level they would like to receive.
The simplest QoS level is unacknowledged service. This QoS level uses a PUBLISH packet
sequence; the publisher sends a message to the broker one time and the broker passes the
message to subscribers one time. There is no mechanism in place to make sure the message has
been received correctly, and the broker does not save the message. This QoS level may also be
referred to as at most once, QoS0, or fire and forget.
The second QoS level is acknowledged service. This QoS level uses a PUBLISH/PUBACK packet
sequence between the publisher and its broker, as well as between the broker and subscribers.
An acknowledgement packet verifies that content has been received and a retry mechanism will
send the original content again if an acknowledgement is not received in a timely manner. This
may result in the subscriber receiving multiple copies of the same message. This QoS level may
also be referred to as at least once or QoS1.
The third QoS level is assured service. This QoS level delivers the message with two pairs of
packets. The first pair is called PUBLISH/PUBREC, and the second pair is called
PUBREL/PUBCOMP. The two pairs ensure that, regardless of the number of retries, the message
will only be delivered once. This QoS level may also be referred to as exactly once or QoS2.
MQTT Operations: During the communication phase, a client can perform publish, subscribe,
unsubscribe and ping operations. The publish operation sends a binary block of data -- the
content -- to a topic that is defined by the publisher.
The fourth operation a client can perform during the communication phase is to ping the broker
server using a PINGREQ/PINGRESP packet sequence, which roughly translates to ARE YOU
ALIVE/YES I AM ALIVE. This operation has no other function than to maintain a live connection
and ensure the TCP connection has not been shut down by a gateway or router.
Chapter 4: NodeMCU Microcontroller
The Node MCU (Node Microcontroller Unit) is an open source software and hardware
development environment that is built around a very inexpensive System-on-a-Chip (SoC) called
the ESP8266. The ESP8266, designed and manufactured by Espressif Systems, contains all crucial
elements of the modern computer: CPU, RAM, networking (Wi-Fi), and even a modern operating
system and SDK.
NodeMCU Development board is featured with Wi-Fi capability, analog pin, digital pins and serial
communication protocols. It has GPIO pins with PWM functionality. There is an analog pin (A0)
which has an ADC connected to it. We can use this analog pin to read analog signals or values
from any sensor. We can develop applications on NodeMCU using Arduino development
environment, although there are other IDEs available.
About ESP8266:
The ESP8266 is a low-cost Wi-Fi microchip with full TCP/IP stack and microcontroller capability
produced by Shanghai-based Chinese manufacturer Espressif Systems.
Specifications:
Features:
Pinout of NodeMCU:
The pins have been described as follows. General-purpose input/output (GPIO) is a pin on an IC
(Integrated Circuit). It can be either input pin or output pin, whose behavior can be controlled at
the run time.
NodeMCU Development kit provides access to these GPIOs of ESP8266. The only thing to take
care is that NodeMCU Dev kit pins are numbered differently than internal GPIO notations of
ESP8266 as shown in below figure and table. For example, the D0 pin on the NodeMCU Dev kit is
mapped to the internal GPIO pin 16 of ESP8266.
Below table gives NodeMCU Dev Kit IO pins and ESP8266 internal GPIO pins mapping
Pin Names on NodeMCU ESP8266 Internal GPIO Pin number
D0 GPIO16
D1 GPIO5
D2 GPIO4
D3 GPIO0
D4 GPIO2
D5 GPIO14
D6 GPIO12
D7 GPIO13
D8 GPIO15
D9/RX GPIO3
D10/TX GPIO1
D11/SD2 GPIO9
D12/SD3 GPIO10
ESP8266 is a system on a chip (SoC) design with components like the processor chip. The
processor has around 16 GPIO lines, some of which are used internally to interface with other
components of the SoC, like flash memory.
Since several lines are used internally within the ESP8266 SoC, we have about 11 GPIO pins
remaining for GPIO purpose. Now again 2 pins out of 11 are generally reserved for RX and TX to
communicate with a host PC from which compiled object code is downloaded. Hence finally, this
leaves just 9 general purpose I/O pins i.e. D0 to D8. As shown in above figure of NodeMCU Dev
Kit. We can see RX, TX, SD2, SD3 pins are not mostly used as GPIOs since they are used for other
internal process.
The pin A0 is an analog pin. To read an analog signal through the NodeMCU, Analog to Digital
conversion is required. A NodeMCU has 10-bit ADC which means it scales an analog signal in a
range of 0-1023. Here, if the available analog pin voltage is 3.3V, i.e. equal to the operating
voltage of the board, the ADC will give maximum output value which is 1023. Similarly, 0V at the
analog pin would result in a zero value from ADC. Apart from these pins, there are power pins
like 3V3, GND and Vin. We also have an RST pin which can be used to reset the controller.
There are several reasons why Node MCU has advantages over other microcontrollers:
1. Node MCU is not very expensive. It is the best choice among other controllers.
2. It has on board Wi-Fi SoC so there is no need for extra Wi-Fi shields.
3. It can be programmed using Arduino IDE which is very popular and responsive.
4. Works on standard 5V as well as 3.3V.
5. Can be powered with micro USB which is very commonly used.
Chapter 5 : Sensors and Actuators
It emits an ultrasound at 40 000 Hz which travels through the air and if there is an object or
obstacle on its path It will bounce back to the module. Considering the travel time and the speed
of the sound you can calculate the distance.
The specifications of HC-SR04 sensor are as follows:
• Power Supply − +5V DC
• Quiescent Current − <2mA
• Working Current − 15mA
• Ranging Distance − 2cm – 400 cm/1″ – 13ft
• Resolution − 0.3 cm
3. IR Obstacle Sensor
Infrared Obstacle Sensor Module has built-in IR transmitter and IR receiver that sends out IR
energy and looks for reflected IR energy to detect presence of any obstacle in front of the sensor
module. The module has on board potentiometer that lets user adjust detection range. The
sensor has very good and stable response even in ambient light or in complete darkness.
An IR sensor consists of an IR LED and an IR Photodiode; together they are called as Photo–
Coupler or Opto–Coupler. The Infrared Obstacle Sensor has built-in IR transmitter and IR receiver.
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations. Even though
an IR LED looks like a normal LED, the radiation emitted by it is invisible to the human eye.
Infrared receivers are also called as infrared sensors as they detect the radiation from an IR
transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared
Photodiodes are different from normal photo diodes as they detect only infrared radiation. When
the IR transmitter emits radiation, it reaches the object and some of the radiation reflects back
to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of the
sensor is defined.
The specifications of IR obstacle sensor are as follows:
• Operating Voltage: 3.0V – 5.0V
• Detection range: 2cm – 30cm (Adjustable using potentiometer)
• Current Consumption: At 3.3V : ~23 mA, at 5.0V: ~43 mA
• Active output level: Outputs Low logic level when obstacle is detected
• On board Obstacle Detection LED indicator
The MQ sensor module has been shown in the picture. Most modules
have digital as well as analog outputs. The features of these sensors
are:
PIRs are made of pyroelectric sensors, a round metal can with a rectangular crystal in the center,
which can detect levels of infrared radiation. Everything emits low-level radiation, and the hotter
something is, the more radiation is emitted. The sensor in a motion detector is split in two halves.
This is to detect motion (change) and not average IR levels. The two halves are connected so that
they cancel out each other. If one-half sees more, or less IR radiation than the other, the output
will swing high or low.
PIRs have adjustable settings and have a header installed in the 3-pin ground/out/power pads.
For many basic projects or products that need to detect when a person has left or entered the
area, PIR sensors are great. Note that PIRs do not tell you the number of people around or their
closeness to the sensor. The lens is often fixed to a certain sweep at a distance and they are
sometimes set off by the pets in the house.
Following are the advantages of PIR Sensors:
• Small in size
• Wide lens range
• Easy to interface
• Inexpensive
• Low-power
• Easy to use
• Do not wear out
6. Fingerprint Sensor Module R307:
R307 Fingerprint Module consists of optical fingerprint sensor, high-speed DSP processor, high-
performance fingerprint alignment algorithm, high-capacity FLASH chips and other hardware and
software composition, stable performance, simple structure, with fingerprint entry, image
processing, fingerprint matching, search and template storage and other functions.
It works on 3.3V but there is also an option for providing 5V. R307 is very suitable for fingerprint-
based security systems.
(C) Actuators:
An actuator is a component of a machine that is responsible for moving and controlling a
mechanism or system, for example by opening a valve. In simple terms, it is a "mover".
An actuator requires a control signal and a source of energy. The control signal is relatively low
energy and may be electric voltage or current, pneumatic or hydraulic pressure, or even human
power. Its main energy source may be an electric current, hydraulic fluid pressure, or pneumatic
pressure. When it receives a control signal, an actuator responds by converting the signal's
energy into mechanical motion.
An actuator is the mechanism by which a control system acts upon an environment. The control
system can be simple (a fixed mechanical or electronic system), software-based (e.g. a printer
driver, robot control system), a human, or any other input.
Actuators can be categorized by the energy source they require to generate motion. For example:
• Coil 1
• Coil 2
• COM (Common)
• NO (Normally Open)
• NC (Normally Closed)
Current flowing through the coil of the relay creates a magnetic field which attracts a lever and
changes the switch contacts. The coil current can be on or off, so relays have two switch positions
and most have double throw (changeover) switch contacts as shown in the diagram.
Relay coils may be rated 5V, 12V etc. Here the relay board has two 5V relays. Hence, we need to
apply a voltage of 5V to the coil of the relay to switch it.
On the module we have COM, NO and NC of both relays on the screw terminals. The power for
the board and the coil need to be supplied on the header pins. Two more header pins – in1 and
in2 are used to control the switching of the relays. If voltage level at in1 is HIGH (5v), the relay 1
will be ON and if the voltage level is LOW (0v), it will be OFF. Same applies for in2 and relay 2.
Here relay ON corresponds to the connection of COM to NO and relay OFF corresponds to
connection of COM and NC where NO is completely disconnected.
Chapter 6: Industrial Training Project
This project is based on the application of Internet of Things (IOT) to our vehicles. IoT involves
extending internet connectivity beyond standard devices, such as desktops, laptops,
smartphones and tablets, to any range of traditionally dumb or non-internet-enabled physical
devices and everyday objects. Embedded with technology, these devices can communicate and
interact over the internet, and they can be remotely monitored and controlled.
The number of IoT devices increased 31% year-over-year to 8.4 billion in 2017 and it is estimated
that there will be 30 billion devices by 2020. The applications of IOT are endless. It can be used
in agriculture, home automation, smart cities, traffic management, medical field, industries,
automobiles and so on.
The project focuses on making an effective system and then extending its capabilities, so that it
can also be operated from any location.
We have made a vehicle ignition system which can be controlled via internet from any remote
location, by using website as well as android application. It also has a fingerprint sensor which
can be used even when there is no internet connection. The owner of the vehicle has options to
add new users (fingerprints) and remove existing users through android application or website.
1. INTRODUCTION
Today’s world is far more dependent on internet than ever. Internet has simplified our lives and
work and has provided the connectivity to share documents, media, and much more. But apart
from these conventional ways of using internet, we can do much more with it. We can connect
the not so commonly connected appliances like fridge, television, fans, etc. and switch them
ON/OFF using internet. This is called IOT (Internet of Things).
In this project we have made a smart vehicle ignition and self-start system. The system uses
fingerprint recognition to identify the users. When the user puts his finger on the sensor window,
his fingerprint gets scanned. If the fingerprints are found to be valid, the ignition is automatically
switched ON followed by a self-start. If the scanned fingerprint is not a valid one, then no action
is taken. The system repeats this procedure if it is not connected to a wireless network with
internet access. But to add or remove users, the system needs to connect to a Wi-Fi network. The
owner of the vehicle can then permit a new registration through a website or through MQTT
client android app. The owner can also delete existing users’ fingerprints so that they can no
longer use the vehicle. From the android app as well as the website, the owner can also control
ignition and self-start.
The system uses NodeMCU as the microcontroller. This is the brain of the system. NodeMCU is
an open source IOT platform which has an on board ESP8266 SoC (System on Chip). This allows
it to connect to Wi-fi networks. Here we have used MQTT protocol to transfer information
between NodeMCU and other clients. Clients may be the people (or owner) using MQTT client
apps with valid credentials, or the owner of the vehicle using the website. We have used Adafruit
IO as the server and the website for accessing the controls is: https://io.adafruit.com. The owner
needs to log in to the website using his login id and password.
Even in the MQTT client android apps (there are many such apps available), proper credentials
are required during setup. Hence it is secure and nobody without username and AIO key can
access it.
The terms and components mentioned above are further explained in detail later in the report.
2. HARDWARE USED
Following are the electronic components used in the project:
2.1 NodeMCU:
The NodeMCU (Node MicroController Unit) is an open source software and hardware development
environment that is built around a very inexpensive System-on-a-Chip (SoC) called the ESP8266. The
ESP8266, designed and manufactured by Espressif Systems, contains all crucial elements of the modern
computer: CPU, RAM, networking (Wi-Fi), and even a modern operating system and SDK.
NodeMCU Development board is featured with Wi-Fi capability, analog pin, digital pins and serial
communication protocols. It has GPIO pins with PWM functionality. There is an analog pin (A0)
which has an ADC connected to it. We can use this analog pin to read analog signals or values
from any sensor. We can develop applications on NodeMCU using Arduino development
environment, although there are other IDEs available.
1 5V Regulated 5V DC
• Coil 1
• Coil 2
• COM (Common)
• NO (Normally Open)
• NC (Normally Closed)
COIL
Current flowing through the coil of the relay creates a magnetic field which attracts a lever and
changes the switch contacts. The coil current can be on or off,
so relays have two switch positions and most have double
throw (changeover) switch contacts as shown in the diagram.
Relay coils may be rated 5V, 12V etc. Here the relay board has
two 5V relays. Hence, we need to apply a voltage of 5V to the
coil of the relay to switch it.
On the module we have COM, NO and NC of both relays on the
screw terminals. The power for the board and the coil need to
be supplied on the header pins. Two more header pins – in1 and
in2 are used to control the switching of the relays. If voltage level at in1 is HIGH (5v), the relay 1
will be ON and if the voltage level is LOW (0v), it will be OFF. Same applies for in2 and relay 2.
Here relay ON corresponds to the connection of COM to NO and relay OFF corresponds to
connection of COM and NC where NO is completely disconnected.
Pin
Function Name
No
2.5 Miscellaneous:
For the power we have used the battery of the vehicle itself, which is 12V lead acid battery. We
have regulated it to 5V using the voltage regulators. For making connections, jumper wires have
been used, along with soldering at required points. An aluminum heat sink has been fitted to the
voltage regulators to dissipate the heat produced by the linear regulators.
MQTT: MQTT (Message Queuing Telemetry Transport) is an ISO standard publish-subscribe-
based messaging protocol. It works on top of the TCP/IP protocol. It is designed for connections
with remote locations where a "small code footprint" is required or the network bandwidth is
limited. The publish-subscribe messaging pattern requires a message broker. Now a days MQTT
is being used in most of the real-world applications like Facebook messenger, amazon web server,
IOT services, adafruit io etc.
Adafruit IO: Adafruit IO is a system that makes data useful. It is easy to use and allowing simple
data connections with little programming required. IO includes client libraries that have MQTT
APIs.
3. BLOCK DIAGRAM
MQTT MQTT
Client App Adafruit IO
Client App
Wi-Fi
Connection
Fingerprint
NodeMCU
Sensor
Relay
Module
These libraries are very useful as they reduce the code length and contain some very important
functions that can be directly called. Mostly we need to use a dedicated library for each
sensor/actuator we use. However, there is no such compulsion and simpler components can also
be controlled with coding without using libraries. Libraries are generally provided by the
hardware manufacturer to facilitate the costumers.
6. SETTING UP SERVER AND CLIENT APP
Here are the steps that can be used to set up the server and android app:
ADAFRUIT SETUP:
We can set up our Adafruit MQTT server and set up feeds using following steps:
1. Visit io.adafruit.com and sign up for a free Adafruit io account.
2. Click on Dashboards, then click on Actions drop down and create a dashboard with any
suitable name i.e. IOT Bike.
3. Click on Feeds, then click on Actions drop down to make feeds. One feed is used to control
(pub/sub) on one topic. Some examples are ‘bike ignition’ feed for controlling bike
ignition, ‘remove’ feed to delete users, etc.
4. Now we can add blocks, such as buttons, text fields, gauges, graphs etc. Each block
connects to a feed. These blocks can publish/subscribe to the feed depending on the
conditions.
5. Go to your dashboard and click on the ‘+’ icon to add a new block. Select any appropriate
block as per requirements. You will have to select the feed that you want to associate
with the block.
6. Configure the block by providing block name, values to publish, etc.
7. Take a note of your username and AIO key because you need it in the Arduino code.
8. Use the feeds in your code as per the correct syntax.
D. Delete Existing Users: The owner can remove any user from the record by publishing user number and
user name followed by clicking remove button. That user will no longer be able to start the vehicle by his
fingerprint. The list of user names with their number can be seen in the adafruit io website under feed
history. Along this process, the system also regularly checks if any valid finger is available on the sensor
window.
2. OFFLINE MODE:
In the initialization (setup) if the system fails to connect to Wi-Fi, it enters the offline mode. This
may happen due to the unavailability of a network with required credentials. However, a
connection is mandatory only for registration and deletion. In the offline mode, the system simply
checks fingerprint sensor availability and enters the loop. Now it regularly checks for valid
fingerprints which have already been registered. As soon as it finds one, it switches the ignition
ON and initiates self-start. The duration of the self-start is kept enough to start the bike, but not
too long as it may affect the battery.
The functional flow chart for system is shown below:
8. CHALLENGES FACED
There were some difficulties while making the project, which were eventually solved:
1. The code is very long and complicated to make and manage. Even a small mistake in the code
may lead to a lot of errors and takes a good amount of time to resolve. This was overcome by
using comments more often and by indentation.
2. All the components work at 5V, so we need to use voltage regulators. However, using a single
7805 to power everything leads to voltage drop and the relays do not function properly. Thus,
we used separate 7805 ICs. One for NodeMCU and fingerprint module, and the other one for the
relay module. A heat sink was also needed for the regulators.
9. CONCLUSION
The world is shifting towards IoT applications, there is wide range of applications which can be
controlled, analyzed and serviced over the internet. Data can be tracked to maintain things
before any wear and tear. Similarly, this project is focused on providing safety features in
vehicles as the thefts are increasing and it is easy to have clone keys. There may be situations
when we forget keys here and there, then it will be much easier to control vehicle with an app
or just by fingerprint. We have also provided controls by giving voice commands to google
assistant.
We are adding some more features like notification with location of vehicle when invalid
fingerprint is detected for several times.
IOT is surely going to change our lives with more safety and comfort.