Académique Documents
Professionnel Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Air is one of the essential elements of man’s surroundings. The earth atmosphere is
full of air which contains gases such as Nitrogen, Oxygen, Carbon Monoxide and traces of
some rare elements. Humans need an atmosphere of air that is free from contaminants. This is
very crucial for human life and health. Any change in the natural composition of air may
cause grave harm to life forms on earth. Air pollution is the presence of one or more
contaminants in the atmosphere such as gases in a quantity that can harm humans, animals
and plant.
Air pollutants are measured in Parts per Million (ppm) or ug/m3. Primary pollutants
are released directly into the atmosphere. Secondary pollutants are produced when the
primary pollutant reacts with other atmospheric chemicals. Air quality affects public health.
The effect of air pollution ranges from difficulty in breathing, coughing, aggravation of
asthma and emphysema. Polluted air can also impair visibility. Air pollution is accountable
for the death of 7 million persons worldwide each year or one in eight premature deaths
yearly. Almost 570,000 children under the age of five die every year from respiratory
infection linked to indoor/outdoor pollution and second-hand smoke. Children exposed to air
pollution have an elevated risk of developing chronic respiratory problems such as asthma. In
the monitoring of air pollution, several researchers worldwide have developed models to
monitor many of the pollution gases such as Sulphur Dioxide (SO2), Carbon Monoxide (CO),
Carbon Dioxide (CO2), Nitrogen Oxides (NO) etc. This paper focuses on the design and
implementation of a smart air pollutant monitoring system. It discusses how the level of
pollutants in the air can be monitored using a gas sensor, smoke sensor and Raspberry pi. .
The main aim of this project is the utilization of Raspberry Pi 3 connected with s
smoke sensor (MQ135) and gas sensor (MQ5) to depict a pollution tracking framework
utilizing low power chips with Internet of things. The level of pollutants are sent
straightforwardly stored into a cloud server and also locally on the Raspberry Pi and sent
when the association resumes. When an increase in pollution level is identified the equipment
KIET Page 1
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
sends notifications to the officials concerned and the owner of the vehicle with the help of a
cloud server. Moreover, with the presence of GPS module, the Internet of things (IoT) based
application can be utilized remotely to see the movement and get warnings when movement
is identified. Therefore, advantages like these make this application perfect for smart tracking
and monitoring wherever the manual checking is a big concern and required alert system
with instant notifications for personal vehicles and to the officials this system can be best
utilized.
KIET Page 2
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
1.4 CONCLUSION:
Hence by this project we can control the amount of pollution emitting from a vehicle and
make changes to the vehicle or impose fines if the rules are violated
KIET Page 3
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER-2
EMBEDDED SYSTEMS AND INTERNET OF
THINGS
The whole report is centered on the field of embedded systems and Internet of Things.
Hence an introduction to Embedded Systems and Internet of Things (IoT) provided
.
2.1 INTRODUCTION TO EMBEDDED SYSTEMS
Each day, our lives become more dependent on 'embedded systems', digital
information technology that is embedded in our environment. More than 98% of processors
applied today are in embedded systems, and are no longer visible to the customer as
'computers' in the ordinary sense. An Embedded System is a special-purpose system in which
the computer is completely encapsulated by or dedicated to the device or system it controls.
Unlike a general-purpose computer, such as a personal computer, an embedded system
performs one or a few pre-defined tasks, usually with very specific requirements. Since the
system is dedicated to specific tasks, design engineers can optimize it, reducing the size and
cost of the product.
.
Typically, an embedded system is housed on a single microprocessor board with the
programs stored in ROM. Virtually all appliances that have a digital interface watches,
microwaves, VCRs, cars utilize embedded systems. Some embedded systems include an
operating system, but many are so specialized that the entire logic can be implemented as a
single program. Physically, Embedded Systems range from portable devices such as digital
watches and MP3 players, to large stationary installations like traffic lights, factory
controllers, or the systems controlling nuclear power plants. In terms of complexity
embedded systems can range from very simple with a single microcontroller chip, to very
complex with multiple units, peripherals and networks mounted inside a large chassis or
enclosure.
2.1.1 DEFINITION OF AN EMBEDDED SYSTEM
Embedded system is defined as specific application implementing the software code
to interact directly with that particular hardware what we built. Software is used for providing
features and flexibility, Hardware which includes Processors, ASICs, Memory used for
Performance and sometimes Security.
KIET Page 4
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
There are many definitions of embedded system but all of these can be combined into
a single concept. An embedded system is a special purpose computer system that is used for
particular task.
KIET Page 5
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
The operating system runs above the hardware and the application software runs above the
operating system. It is not compulsory to have an operating system in every embedded
system. For small applications such as remote control units, air conditioners, toys etc.
2.1.5 TYPES OF EMBEDDED SYSTEMS
Based on functionality and performance embedded systems categorized as 4
types
1. Stand alone embedded systems
KIET Page 6
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
4. Mobile devices
Actually it is a combination of both VLSI and Embedded System. Mobile devices
such as Mobile phone, Personal digital assistants, smart phones etc are special category of
embedded systems
KIET Page 7
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
different technologies, about its architecture, characteristics & applications, IOT functional
view & what are the future challenges for IOT.
2.2.1 INTRODUCTION:
The IOT concept was coined by a member of the Radio Frequency Identification
(RFID) development community in 1999, and it has recently become more relevant to the
practical world largely because of the growth of mobile devices, embedded and ubiquitous
communication, cloud computing and data analytics.
Imagine a world where billions of objects can sense, communicate and share
information, all interconnected over public or private Internet Protocol (IP) networks. These
interconnected objects have data regularly collected, analyzed and used to initiate action,
providing a wealth of intelligence for planning, management and decision making. This is the
world of the Internet of Things (IOT).
Internet of things (IOT) is a network of physical objects. The internet is not only a
network of computers, but it has evolved into a network of device of all type and sizes,
vehicles , smart phones, home appliances, toys, cameras, medical instruments and industrial
systems, animals, people, buildings, all connected ,all communicating & sharing information
based on stipulated protocols in order to achieve smart reorganizations, positioning, tracing,
safe & control & even personal real time online monitoring , online upgrade, process control
& administration
People to people.
People to machine/things.
Things /machine to things /machine, interacting through internet.
Internet of Things Vision: Internet of Things (IoT) is a concept and a paradigm that
considers pervasive presence in the environment of a variety of things/objects that through
wireless and wired connections and unique addressing schemes are able to interact with each
other and cooperate with other things/objects to create new servers or applications and reach
common goals. In this context the research and development challenges to create a smart
KIET Page 8
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
world are enormous. A world where the real, digital and the virtual are converging to create
smart environments that make energy, transport, cities and many other areas more intelligent.
KIET Page 9
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
With the Internet of Things the communication is extended via Internet to all the
things that surround us. The Internet of Things is much more than machine to machine
communication, wireless, sensor networks, sensor networks 2G/3G/4G, GSM, GPRS,
RFID,WI-FI, GPS, microcontroller, microprocessor etc. These are considered as being
the enabling technologies that make “Internet of Things” applications possible
Enabling technologies for the Internet of Things can be grouped into three categories:
Technologies that enable “things” to acquire contextual information
Technologies that enable “things” to process contextual information
Technologies to improve security and privacy.
The first two categories can be jointly understood as functional building blocks
required building “intelligence” into “things”, which are indeed the features that
differentiate the IoT from the usual Internet.
KIET Page 10
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
2.2.4 CHARACTERISTICS:
The fundamental characteristics of the IoT are as follows:
Interconnectivity:
With regard to the IoT, anything can be interconnected with the global information and
communication infrastructure.
Things-related services:
The IoT is capable of providing thing-related services within the constraints of things,
such as privacy protection and semantic consistency between physical things and their
associated virtual things. In order to provide thing-related services within the constraints of
things, both the technologies in physical world and information world will change.
KIET Page 11
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Heterogeneity:
The devices in the IoT are heterogeneous as based on different hardware platforms
and networks. They can interact with other devices or service platforms through different
networks.
Dynamic changes:
The state of devices change dynamically, e.g., sleeping and waking up, connected
and/or disconnected as well as the context of devices including location and speed. Moreover,
the number of devices can change dynamically.
Enormous scale:
The number of devices that need to be managed and that communicate with each
other will be at least an order of magnitude larger than the devices connected to the current
Internet. Even more critical will be the management of the data generated and their
interpretation for application purposes. This relates to semantics of data, as well as efficient
data handling.
Safety:
As we gain benefits from the IoT, we must not forget about safety. As both the
creators and recipients of the IoT, we must design for safety. This includes the safety of our
personal data and the safety of our physical well-being. Securing the endpoints, the networks,
and the data moving across all of it means creating a security paradigm that will scale.
Connectivity:
KIET Page 12
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
The lowest layer is made up of smart objects integrated with sensors. The sensors
enable the interconnection of the physical and digital worlds allowing real-time information
to be collected and processed. The sensors have the capacity to take measurements such as
temperature, air quality, speed, humidity, pressure, flow, movement and electricity etc. In
some cases, they may also have a degree of memory, enabling them to record a certain
number of measurements. Sensors are grouped according to their unique purpose such as
environmental sensors, body sensors, home appliance sensors and vehicle telematics sensors,
etc.
Most sensors require connectivity to the sensor gateways. This can be in the form of a
Local Area Network (LAN) such as Ethernet and Wi-Fi connections or Personal Area
Network (PAN) such as ZigBee, Bluetooth and Ultra Wide band (UWB). For sensors that do
not require connectivity to sensor aggregators, their connectivity to backend
servers/applications can be provided using Wide Area Network (WAN) such as GSM, GPRS
and LTE. WSNs are gaining popularity as they can accommodate far more sensor nodes
while retaining adequate battery life and covering large areas.
Gateways and Network:
Massive volume of data will be produced by these tiny sensors and this requires a
robust and high performance wired or wireless network infrastructure as a transport medium.
Current networks, often tied with very different protocols, have been used to support
machine-to-machine (M2M) networks and their applications. With demand needed to serve a
wider range of IOT services and applications such as high speed transactional services,
context-aware applications, etc, multiple networks with various technologies and access
protocols are needed to work with each other in a heterogeneous configuration
Management Service Layer:
KIET Page 13
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
formulation of decision logics and trigger interactive and automated processes to enable a
more responsive IOT system.
In the area of analytics, various analytics tools are used to extract relevant information
from massive amount of raw data and to be processed at a much faster rate. Analytics such as
in-memory analytics allows large volumes of data to be cached in random access memory
(RAM) rather than stored in physical disks.
Data management is the ability to manage data information flow. With data
management in the management service layer, information can be accessed, integrated and
controlled. Higher layer applications can be shielded from the need to process unnecessary
data and reduce the risk of privacy disclosure of the data source. Data filtering techniques
such as data anonymisation, data integration and data synchronization, are used to hide the
details of the information while providing only essential information that is usable for the
relevant applications.
Application Layer:
The IoT application covers “smart” environments/spaces in domains such as:
Transportation, Building, City, Lifestyle, Retail, Agriculture, Factory, Supply chain,
Emergency, Healthcare, User interaction, Culture and tourism, Environment and Energy.
Module for interaction with local IoT devices. This module is responsible for
acquisition of observations and their forwarding to remote servers for analysis and
permanent storage.
Module for local analysis and processing of observations acquired by IoT devices.
Module for interaction with remote IoT devices, directly over the Internet. This
module is responsible for acquisition of observations and their forwarding to
remote servers for analysis and permanent storage.
KIET Page 14
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
The third group impacts the management services that support the IOT
applications.
KIET Page 15
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
place. This kind of interoperability is often centered on (communication) protocols and the
infrastructure needed for those protocols to operate.
Syntactical Interoperability is usually associated with data for -mats. Certainly, the
messages transferred by the communication protocols need to have a well-defined syntax and
encoding, even if it is only in the form of bit-tables. However, many protocols carry data or
content, and this can be represented using high-level transfer syntaxes such as HTML, XML
or ASN.1.
Semantic Interoperability is usually associated with the meaning of content and
concerns the human rather than machine interpretation of content. Thus interoperability on
this level means that there is a common understanding between people of the meaning of the
content (information) being exchanged.
In a fully interoperable environment, any IoT device would be to connect to any other
device or system and exchange information as desired. In practicality, interoperability is more
complex. Interoperability among IoT devices and systems happens in varying degrees at
different layers within the communications protocol stack between the devices. Technical
interoperability ensures basic connectivity: mechanism to established physical& logical
connection between systems, network interoperability: to exchange data between multiple
systems across variety of networks. Syntactic interoperability ensures understanding of data
structure in data exchanged between systems. While semantic ensures understanding of
concept contained in data structure.
As the IoT become a key element of the Future Internet and the usage of the Internet
of Things for large-scale, partially mission-critical systems creates the need to address trust
KIET Page 16
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
and security functions adequately. New challenges identified for privacy, trust and reliability
are:
Providing trust and quality-of-information in shared information models to
enable re-use across many applications
Providing secure exchange of data between IoT devices and consumers of their
information.
Providing protection mechanisms for vulnerable devices.
An option to grow, the cost of components that are needed to support capabilities such
as sensing, tracking and control mechanisms need to be relatively inexpensive in the coming
years.
Interoperability:
In the traditional Internet, interoperability is the most basic core value;the first
requirement of Internet connectivity is that “connected” systems be able to “talk the same
language” of protocols and encodings. Different industries today use different standards to
support their applications. With numerous sources of data and heterogeneous devices, the use
of standard interfaces between these diverse entities becomes important. This is especially so
for applications that supports cross organizational and various system boundaries. Thus the
IOT systems need to handle high degree of interoperability.
Data Management:
KIET Page 17
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER-3
HARDWARE IMPLEMENTATION
This chapter briefly explains about the Hardware Implementation of the project. It
discusses the design and working of the design with the help of block diagram in detail. It
explains the features, timer programming, serial communication, interrupts of processor. It
also explains the various modules used in this project. Hardware implementation deals in
drawing the schematic on the plane paper according to the application, testing the schematic
design over the breadboard using
the various IC’s to find if the design meets the objective, carrying out the PCB layout
of the schematic tested on breadboard, finally preparing the board and testing the
designed hardware.
The project design and principle are explained in this chapter using the block
diagram. The block diagram discusses about the required components of the design and
working condition.
BLOCK DIAGRAM OF THE SYSTEM
Below shown block diagram of proposed system depicts various components used in the
proposed system and their interconnections.
The Block diagram of the proposed system consists of Raspberry Pi board (Model 3)
which is a low cost, credit-card sized computer that plugs into a computer monitor or TV,
and uses a standard keyboard and mouse. GPS sensors which are receivers with antennas
KIET Page 18
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
that use a satellite-based navigation system with a network of 24 satellites in orbit around
the earth to provide position, velocity, and timing information. The MQ5 gas sensor that
detects the presence of various gases such as hydrogen, carbon monoxide, methane and
LPG ranging from 100ppm to 3,000ppm and finally MQ135 gas sensor which has high
sensitivity to Ammonia, Sulfide and Benzene steam, also sensitive to smoke and other
harmful gases.
Vin
GAS
GPS SENSOR
RASPBERY
MODULE PI3
SMOKE
SENSOR
CLOUD
MONITORING
KIET Page 19
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
When the cloud is not accessible then the information is stored locally on the
Raspberry Pi and sent when the association resumes. The primary functions of the project are
Pollutants Measurement: emissions from a vehicle like hydrogen, carbon
monoxide, methane and LPG ranging from 100ppm to 3,000ppm is measured.
Accident Detection: accident detection systems rely on the high speed of
the vehicle (extracted from the GPS receiver) and can also be detected using G-
Force value (extracted from accelerometer sensor) to detect an accident.
location tracking: with the presence of GPS , location of the vehicle can be easily
traced round the clock
Graph of pollutants over a period of time: The thinkspeak platform uses the data
uploaded and graphs of different pollutants over a period are drawn Officials and
Owner of vehicle gets an alert, when there is a increase in emissions than the
prescribed value.
Air quality monitoring inside vehicle: Vehicle Indoor Air Quality (VIAQ) is a
very important parameter that we often tend to ignore in our daily driving
Prolonged use of air recirculation inside the vehicle cabin can lead to a gradual
accumulation of carbon dioxide (CO2) which may occur the symptoms such as
fatigue, headaches, and dizziness even deleterious effects on cognitive function
towards the occupants. Vehicle cabin is an enclosed environment to prevent the
outdoor air directly flow inside the vehicle cabin. So, the amount of carbon dioxide
present inside the chamber is measured and alert is sent when the gas is in higher
amounts.
HARDWARE COMPONENTS:
Raspberry Pi 3
Smoke sensor (MQ5)
Gas Sensor(MQ37)
GPS
Power Supply
3.1 Raspberry Pi 3:
The Raspberry Pi Compute Module 3+ is a range of DDR2-SODIMM-mechanically-
compatible System on Modules (SoMs) containing processor, memory, embedded Multi-
KIET Page 20
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Media Controller i,e, eMMC Flash (on non-Lite variants) and supporting power circuitry.
These modules allow a designer to leverage the Raspberry Pi hardware and software stack in
their own custom systems and form factors.
Features
3.1.1 Hardware
_ Low cost
_ Low power
KIET Page 21
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
_ High availability
_ High reliability
– Tested over millions of Raspberry Pis Produced to date
– Module IO pins have 15 micro-inch hard gold plating over 2.5 micron Nickel
3.1.2 Specification
3.1.3 Software
_ ARMv8 Instruction Set
_ Mature and stable Linux software stack
– Latest Linux Kernel support
– Many drivers upstreamed
– Stable and well supported userland
– Full availability of GPU functions using standard APIs
KIET Page 22
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 23
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 24
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Table : DC characteristics
KIET Page 25
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 26
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
This is also the case for camera and display interfaces, HDMI, USB interfaces, video
encoders and decoders, and so on. Power chain design is critical for stable and reliable
operation of the Compute Module 3+. We strongly recommend that designers spend time
measuring and verifying power requirements for their particular use case and application, as
well as paying careful attention to power supply sequencing and maximum supply voltage
tolerance
3.1.7 Booting
The eMMC Flash device on CM3+ is directly connected to the primary BCM2837
SD/eMMC interface. These connections are not accessible on the module pins. On CM3+
Lite this SD interface is available on the SDX pins When initially powered on, or after the
RUN pin has been held low and then released, the BCM2837 will try to access the primary
SD/eMMC interface. It will then look for a file called bootcode.bin on the primary partition
(which must be FAT) to start booting the system. If it cannot access the SD/eMMC device or
the boot code cannot be found, it will fall back to waiting for boot code to be written to it
over USB;
3.1.8 Peripherals :
1. GPIO
BCM2837 has in total 54 GPIO lines in 3 separate voltage banks. All GPIO pins have
at least two alternative functions within the SoC. When not used for the alternate peripheral
function, each GPIO pin may be set as an input (optionally as an interrupt) or an output. The
alternate functions are usually peripheral I/Os, and most peripherals appear twice to allow
flexibility on the choice of I/O voltage.
GPIO bank2 is used on the module to connect to the eMMC device and for an on-
board I2C bus (to talk to the core SMPS and control the special function pins). On CM3+
Lite most of bank2 is exposed to allow a user to connect their choice of SD card or eMMC
device (if required).
Bank0 and 1 GPIOs are available for general use. GPIO0 to GPIO27 are bank0 and
GPIO28-45 make up bank1. GPIO0-27 VDD is the power supply for bank0 and GPIO28-45
VDD is the power supply for bank1. SDX VDD is the supply for bank2 on CM3+ Lite. These
KIET Page 27
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
supplies can be in the range 1.8V-3.3V each bank must be powered, even when none of the
GPIOs for that bank are used.
Note that the HDMI HPD N 1V8 and EMMC EN N 1V8 pins are 1.8V IO and are used for
special functions (HDMI hot plug detect and boot control respectively). Please do not use
these pins for any other purpose, as the software for the module will always expect these pins
to have these special functions. If they are unused please leave them unconnected.
All GPIOs except GPIO28, 29, 44 and 45 have weak in-pad pull-ups or pull-downs
enabled when the device is powered on. It is recommended to add off-chip pulls to GPIO28,
29, 44 and 45 to make sure they never float during power on and initial boot.
KIET Page 28
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Both of the tables detail the default pin pull state and available alternate GPIO
functions. Most of these alternate peripheral functions are described in detail in the Broadcom
Peripherals Specification document and have Linux drivers available.
The SMI peripheral is an asynchronous NAND type bus supporting Intel mode80 type
transfers at 8 or 16 bit widths and available in the ALT1 positions on GPIO banks 0 and 1
KIET Page 29
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
(see Table 9 and Table 10). It is not publicly documented in the Broadcom Peripherals
Specification but a Linux driver is available in the Raspberry Pi Github Linux repository
(bcm2835 smi.c in linux/drivers/misc).
3. Display Parallel Interface (DPI)
A standard parallel RGB (DPI) interface is available on bank 0 GPIOs. This up-to-24-
bit parallel interface can support a secondary display. Again this interface is not documented
in the Broadcom Peripherals Specification but documentation can be found here.
4. SD/SDIO Interface
The BCM283x supports two SD card interfaces, SD0 and SD1.The first (SD0) is a
proprietary Broadcom controller that does not support SDIO and is the primary interface used
to boot and talk to the eMMC or SDX x signals. The second interface (SD1) is standards
compliant and can interface to SD, SDIO and eMMC devices;
for example on a Raspberry Pi 3 B+ it is used to talk to the on-board CYW43455 WiFi device
in SDIO mode. Both interfaces can support speeds up to 50MHz single ended (SD High
Speed Mode).
5. CSI (MIPI Serial Camera)
Currently the CSI interface is not openly documented and only CSI camera sensors
supported by the official Raspberry Pi firmware will work with this interface. Supported
sensors are the OmniVision OV5647 and Sony IMX219. It is recommended to attach other
cameras via USB.
6. DSI (MIPI Serial Display)
Currently the DSI interface is not openly documented and only DSI displays
supported by the official Raspberry Pi firmware will work with this interface. Displays can
also be added via the parallel DPI interface which is available as a GPIO alternate function.
7. USB
The BCM2837 USB port is On-The-Go (OTG) capable. If using either as a fixed
slave or fixed master, please tie the USB OTGID pin to ground. The USB port (Pins USB DP
and USB DM) must be routed as 90 ohm differential PCB traces. Note that the port is capable
of being used as a true OTG port however there is no official documentation. Some users
have had success making this work.
KIET Page 30
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
8.HDMI
The TVDAC pin can be used to output composite video (PAL or NTSC). Please route
this signal away from noise sources and use a 75 ohm PCB trace. Note that the TV DAC is
powered from the VDAC supply which must be a clean supply of 2.5-2.8V. It is
recommended users generate this supply from 3V3 using a low noise LDO.
If the TVDAC output is not used VDAC can be connected to 3V3, but it must be powered
even if the TV-out functionality is unused.
10. Thermals
The BCM2837 SoC employs DVFS (Dynamic Voltage and Frequency Scaling) on the
core voltage. When the processor is idle (low CPU utilisation), it will reduce the core
frequency and voltage to reduce current draw and heat output. When the core utilisation
exceeds a certain threshold the core voltage is increased and the core frequency is boosted to
the maximum working frerquency of 1.2GHz.
The voltage and frequency are throttled back when the CPU load reduces back to an
’idle’ level OR when the silicon temperature as mesured by the on-chip temperature sensor
exceeds 80C (thermal throttling). A designer must pay careful attention to the thermal design
of products using the CM3+ so that performance is not artificially curtailed due to the
processor thermal throttling, as the Quad ARM complex in the BCM2837 can generate
significant heat output under load.
The operating temperature range of the module is set by the lowest maximum and
highest minimum of any of the components used. The eMMC and LPDDR2 have the
KIET Page 31
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
narrowest range, these are rated for -25 to +80 degrees Celsius. Therefore the nominal range
for the CM3+ and CM3+ Lite is -25C to +80C. However, this range is the maximum for the
silicon die; therefore, users would have to take into account the heat generated when in use
and make sure this does not cause the temperature to exceed 80 degrees Celsius.
KIET Page 32
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
When a gas interacts with this sensor, it is first ionized into its constituents and is then
adsorbed by the sensing element. This adsorption creates a potential difference on the
element which is conveyed to the processor unit through output pins in form of current. The
gas sensor module consists of a steel exoskeleton under which a sensing element is housed.
This sensing element is subjected to current through connecting leads. This current is known
as heating current through it, the gases coming close to the sensing element get ionized and
are absorbed by the sensing element. This changes the resistance of the sensing element
which alters the value of the current going out of it.
3.2.4 Specifications:
Supply Voltage: 5V
Detecting concentration :200-10000ppm LPG,LNG,Natural gas,Iso-butane
Analog and Digital Output
Digital Out is High or Low based on a adjustable preset threshold.
B. Environment condition
Symbol Parameter name Technical condition Remarks
KIET Page 33
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
C. Sensitivity characteristic
Symbol Parameter name Technical parameter Remarks
2 Electrode Au
3 Electrode line Pt
Fig3.9: Configuration B
KIET Page 34
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Fig3.10: Configuration A
Resistance value of MQ-135 is difference to various kinds and various concentration gases.
So, using this components, sensitivity adjustment is very necessary. we recommend that you
calibrate the detector for 100ppm NH3 or 50ppm Alcohol concentration in air and use value
of Load resistance that( RL) about 20 KΩ(10KΩ to 47 KΩ). When accurately measuring, the
KIET Page 35
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
proper alarm point for the gas detector should be determined after considering the
temperature and humidity influence
Fig.3 shows the typical sensitivity characteristics of the MQ-135 for several gases. in
their: Temp: 20℃、 Humidity: 65%、 O2 concentration 21% RL=20kΩ Ro: sensor
resistance at 100ppm of NH3 in the clean air. Rs:sensor resistance at various
concentrations of gases.
Fig.4 shows the typical dependence of the MQ-135 on temperature and humidity. Ro: sensor
resistance at 100ppm of NH3 in air at 33%RH and 20 degree. Rs: sensor resistance at
100ppm of NH3 at different temperatures and humidities.
3.2.6 Following conditions must be prohibited
KIET Page 36
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
1. Expose to organic silicon steam Organic silicon steam cause sensors invalid, sensors
must be avoid exposing to silicon bond, fixature, silicon latex, putty or plastic contain
silicon environment
2. High Corrosive gas : If the sensors exposed to high concentration corrosive gas (such
as H2Sz, SOX,Cl2,HCl etc), it will not only result in corrosion of sensors
structure, also it cause sincere sensitivity attenuation.
3. Alkali, Alkali metals salt, halogen pollution: The sensors performance will be
changed badly if sensors be sprayed polluted by alkali metals salt especially brine, or
be exposed to halogen such as fluorine.
4. Touch water: Sensitivity of the sensors will be reduced when spattered or dipped in
water.
5. Freezing: Do avoid icing on sensor’surface, otherwise sensor would lose sensitivity.
6. Applied voltage: higher Applied voltage on sensor should not be higher than
stipulated value, otherwise it cause down-line or heater damaged, and bring on
sensors’ sensitivity characteristic changed badly.
7. Voltage on wrong pins: For 6 pins sensor, if apply voltage on 1、3 pins or 4、6
pins, it will make lead broken, and without signal when apply on 2、4 pins
1.Water Condensation
Indoor conditions, slight water condensation will effect sensors performance lightly.
However, if water condensation on sensors surface and keep a certain period, sensor’
sensitivity will be decreased.
2. Long time storage
The sensors resistance produce reversible drift if it’s stored for long time without electrify,
this drift is related with storage conditions. Sensors should be stored in airproof without
silicon gel bag with clean air.
3. Long time exposed to adverse environment
No matter the sensors electrified or not, if exposed to adverse environment for long time,
such as high humidity, high temperature, or high pollution etc, it will effect the sensors
performance badly.
4. Vibration
KIET Page 37
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Continual vibration will result in sensors down-lead response then repture. In transportation
or assembling line, pneumatic screwdriver/ultrasonic welding machine can lead this
vibration.
5. Concussion
If sensors meet strong concussion, it may lead its lead wire disconnected.
3.2.7 Usage
For sensor, handmade welding is optimal way. If use wave crest welding should meet the
following conditions:
Soldering flux: Rosin soldering flux contains least chlorine
Speed: 1-2 Meter/ Minute
Warm-up temperature:100±20℃
Welding temperature:250±10℃
1 time pass wave crest welding machine
If disobey the above using terms, sensors sensitivity will be reduced.
3.2.8 FEATURES
Wide detecting scope
Fast response and High sensitivity
Stable and long life
Simple drive circuit
3.2.9 APPLICATION
They are used in gas leakage detecting equipments in family and industry, are
suitable for detecting of LPG, natural gas , town gas, avoid the noise of alcohol and cooking
fumes and cigarette smoke.
KIET Page 38
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
3.3.4 Features
KIET Page 39
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Supply Voltage: 5V
Detecting concentration :200-10000ppm LPG,LNG,Natural gas,Iso-butane
Analog and Digital Output
Digital Out is High or Low based on a adjustable preset threshold.
B. Environment condition
Symbol Parameter name Technical condition Remarks
C. Sensitivity characteristic
Symbol Parameter name Technical parameter Remarks
KIET Page 40
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Condition
Preheat time Over 24 hour
2 Electrode Au
3 Electrode line Pt
KIET Page 41
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Structure and configuration of MQ-5 gas sensor is shown as Fig. 1 (Configuration A or B),
sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer,
measuring electrode and heater are fixed into a crust made by plastic and stainless steel net.
The heater provides necessary work conditions for work of sensitive components. The
enveloped MQ-5 have 6 pin ,4 of them are used to fetch signals, and other 2 are used for
providing heating current. Electric parameter measurement circuit is shown as Fig.2
E. Sensitivity characteristic curve
Fig.3 is shows the typical dependence of the MQ-5 on temperature and humidity. Ro: sensor
resistance at 1000ppm of H2 in air at 33%RH and 20 degree. Rs: sensor resistance at
different temperatures and humidities.
KIET Page 42
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Fig.4 is shows the typical sensitivity characteristics of the MQ-5 for several gases. in
their: Temp: 20℃,Humidity: 65%、 O2 concentration 21% RL=20Kω Ro: sensor resistance
at 1000ppm of H2 in the clean air. Rs:sensor resistance at various concentrations of gases.
3.3.6 SENSITIVITY ADJUSTMENT
Resistance value of MQ-5 is difference to various kinds and various concentration
gases. So, When using this components, sensitivity adjustment is very necessary. we
recommend that you calibrate the detector for 1000ppm H2 or LPG concentration in air and
use value of Load resistance ( RL) about 20 KΩ(10KΩ to 47KΩ). When accurately
measuring, the proper alarm point for the gas detector should be determined after considering
the temperature and humidity influence.
3.3.7 Application
They are used in gas leakage detecting equipments in family and industry, are suitable for
detecting of LPG, natural gas , town gas, avoid the noise of alcohol and cooking fumes and
cigarette smoke.
KIET Page 43
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
environments. It is based on the high performance features of the MediaTek 3329 single-chip
architecture, Its –165dBm tracking sensitivity extends positioning coverage into place like
urban canyons and dense foliage environment where the GPS was not possible before. The 6-
pin UART connector design is the easiest and convenient solution to be embedded in a
portable device and receiver like PND, GPS mouse, car holder, personal locator, speed
camera detector and vehicle locator.
GPS or Global Positioning System is a satellite navigation system that furnishes
location and time information in all climate conditions to the user. GPS is used for navigation
in planes, ships, cars, and trucks also. The system gives critical abilities to military and
civilian users around the globe. GPS provides continuous real-time, 3-dimensional
positioning, navigation and timing worldwide.
KIET Page 45
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 46
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
appropriate level shifters. the data format is however fixed: X, N, 8, 1, i.e. X baud rate,
no parity, eight data bits and one stop bit, no other data formats are supported, LSB is
sent first. The modules default baud rate is set up 9600bps. The RXD0 & TXD0
recommended to pull up (10KΩ). It can increase the stability of serial data.
Mechanical Specification
KIET Page 47
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 48
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Depending on the number of satellites tracked multiple messages of GSV data may be
required
3.4.7 Applications
LBS (Location Based Service)
Vehicle navigation system
PND (Portable Navigation Device)
GPS mouse and Bluetooth GPS receiver
Timing application
KIET Page 49
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER 4
SOFTWARE TOOLS
In the current project used some important software tools that are embedded with
hardware to perform particular task. Some of the tools used to interface the physical modules
of the circuit and some of the tools used to perform the tasks with respect to given commands
with collaboration of the hardware. The tools details and their usage details in our project are
given bellow.
FIRMWARE TOOLS USED FOR DEVELOPMENT
In our project surveillance and security using Raspberry pi software tools plays a
vital role and the software modules used are:
Raspbian Os
Win32 Diskimager Software
Python IDE
Thinkspeak
The Raspberry Pi gets the first half of its name from a long-standing tradition of
using fruit to name new computing systems from classic microcomputers like the Acorn,
Apricot and Tangerine to more recognisably modern brands including Apple and
BlackBerry but the second half comes courtesy of the Python programming language. The
majority of modern Linux distributions are user-friendly, with a graphical user interface
(GUI) that provides an easy way to perform common tasks. It is, however, quite different
from Windows, so we are going to get the most of the Raspberry Pi with Linux OS.
KIET Page 50
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
4.1 To set up your Raspberry Pi you will need:
1. SD card:
Minimum size 4Gb; class 4 (the class indicates how fast the card is). We
recommend using branded SD cards as they are more reliable.
2. HDMI to HDMI / DVI lead:
HDMI to HDMI lead (for HD TVs and monitors with HDMI input).OR HDMI
to DVI lead (for monitors with DVI input).Leads and adapters are available for few
pounds .there is no need to buy expensive ones.
3. RCA video lead:
A standard RCA composite video lead to connect to your analogue display if
you are not using the HDMI output.
4. Keyboard and mouse:
Any standard USB keyboard and mouse should work. Keyboards or mice that
take a lot of power from the USB ports, however, may need a powered USB hub. This
may include some wireless devices.
5. Ethernet (network) cable [optional]:
Networking is optional, although it makes updating and getting new software
for your Raspberry Pi much easier.
6. Power adapter:
A good quality, micro USB power supply that can provide at least 700mA at
5V is essential. Many mobile phone chargers are suitable check the label on the plug.
KIET Page 51
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
If your supply provides less than 5V then your Raspberry Pi may not work at all, or it
may behave erratically. Be wary of very cheap chargers: some are not what they claim
to be. It does not matter if your supply is rated at more than 700mA.
7. Audio lead [optional]:
If you are using HDMI then you will get digital audio via this. • If you are
using the analogue RCA connection, stereo audio is available from the 3.5mm jack
next to the RCA connector.
KIET Page 52
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
right-click this file and choose “Run as administrator”). You will see
something like this:
c) If the SD card (Device) you are using isn’t found automatically then
click on the drop down box and select it
d) In the Image File box, choose the Raspbian .img file that you
downloaded
e) Click Write
f) After a few minutes you will have an SD card that you can use in
your Raspberry Pi.
5. Booting your Raspberry Pi for the first time
Follow the Quick start guide on page 1
On first boot you will come to the Raspi-config window
Change settings such as timezone and locale if you want
Finally, select the second choice: expand_rootfs and say ‘yes’ to a
reboot
The Raspberry Pi will reboot and you will see raspberrypi login:
Type: pi
You will be asked for your Password
Type: raspberry
You will then see the prompt: pi@raspberry ~ $
Start the desktop by typing: startx
You will find yourself in a familiar-but-different desktop environment.
KIET Page 53
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Python is a fantastic language for programming the Pi, thanks to its ease of use and a ccess
to hardware, including GPIO. In this how-to article, we will look at how to run Python
programs on the Pi.
Things You Will Need
Raspberry Pi
Raspbian OS on SD card
HDMI monitor
Keyboard and mouse
4.1.3 Notes About Python Libraries
It appears that, on Raspbian, a Python program that needs external libraries may
not work using all the methods listed below. Installing additional libraries can be done
using PIP, but these seem to only install libraries for programs running in the terminal
window. This may be due to the fact that the Python IDE programs have their own local
copy of Python. Therefore, it is recommended that you use the terminal window to run
Python programs that require external libraries installed using PIP.
KIET Page 54
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Open a terminal window and use the “cd” command to change the working
directory to the directory that contains your Python program. I used the following
command:
cd Documents/Python
KIET Page 55
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
To confirm that your Python program resides in this directory, you can use the command
“dir”, and this will list all files and folders in that directory. If your Python program is
not listed in the list of files, you will need to go back and find where your Python
program resides.
At this point, we can now execute the Python program by using the “python” command.
This command will execute the Python file that is stated after the command, as shown
here:
python yourfilename.py
Raspbian comes with a number of IDEs for programming, and one of these IDEs is the
official Python IDE. To open this, click the Raspbian logo and then navigat e to
Programming > Python 3 (IDLE).
With the IDE loaded, click File > Open and then navigate to your Python program.
When the file opens, you can run the program by clicking Run > Run Module or by
pressing F5 on the keyboard.
KIET Page 56
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Fig4.22:run code
KIET Page 57
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
Thonny is another Python IDE that boasts a number of features, including a powerful
debugger that can be used to step through code and watch variables. This IDE can also be
used to run Python programs. First, click the Raspbian logo and then navigate to
Programming > Thonny Python IDE.
In the IDE, click File > Open and then navigate to your Python program. With the
program loaded, click Run > Run current script.
4.1.7 Conclusion
There are a number of ways to run Python programs on the Raspberry Pi. As stated
before, some of these other methods may have issues with missing libraries, which is why
it is recommended to run Python programs using the terminal window. Executing Python
programs can also be done using SSH, and this method is identical to the terminal
method.
4.2 THINGSPEAK
ThingSpeak is an IoT analytics platform service from MathWorks, the makers of
MATLAB and Simulink. ThingSpeak allows you to aggregate, visualize, and analyze live
data streams in the cloud. It provides instant visualizations of data posted by your devices or
equipment. Execute MATLAB code in ThingSpeak, and perform online analysis and
KIET Page 58
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
processing of the data as it comes in. ThingSpeak accelerates the development of proof-of-
concept IoT systems, especially those that require analytics. You can build IoT systems
without setting up servers or developing web software. For small- to medium-sized IoT
systems, ThingSpeak provides a hosted solution that can be used in production.
It allows you to aggregate, visualize and analyze live data streams in the cloud. With
ThingSpeak, your data is stored in channels. Each channel stores up to 8 fields of data. You
can create as many channels as you need for your application.
Any internet connected device can be used for thingspeak .When sending data from
our devices or equipment, we can use native libraries for common embedded hardware
prototyping platforms like Arduino, ESP-8266,Particle and Raspberry Pi. You can also send
data to Thing Speak from machines or local gateways using a REST API or an MQTT API.
In addition, the following vendors have built integrations to Thing speak to make setup
much easier. LoRaWAN, Things Network, Senet, Libelium, Beckhoff, Particle
ThingSpeak stores all the information you send it in one central location in the cloud,
so you can easily access your data for online or offline analysis. Your private data is
KIET Page 59
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
protected with an API key that you control. When you are logged in to your ThingSpeak
account, you can use the web to securely download the data stored in the cloud. You can also
programmatically read your data in CSV or JSON formats using a REST API call and the
appropriate API key. Your devices can also read data from a ThingSpeak channel by
subscribing to an MQTT topic. Import data from third-party web services including climate
data from NOAA, public utility data from local utility providers, and stock and pricing data
from financial providers. You can use that data together with the data you are collecting from
your devices and equipment to investigate correlations and develop predictive algorithms.
MATLAB users can import data stored in ThingSpeak into the MATLAB desktop
environment using the thingSpeak read function.
Thing Speak automatically charts the data that you send it, so you can remotely
monitor your devices or equipment from anywhere.View your data from any web browser or
mobile device. Share read only views of your data with the clients and colleagues that you
specify. Alternatively, you can use thingspeak to manage your data, and you can build your
front end for your clients and customers to log in to.
With a commercial ThingSpeak license, you can send data to ThingSpeak as fast as
once every second. This not only enables near-real time monitoring of your devices, but it
allows you to set up control loops from the cloud. For example, you could configure
ThingSpeak to turn a light on when your motion sensor detects a person has walked into a
room. For applications that require faster response times, the best practice is to have the
control loop at the edge closer to the hardware.
With the matlab engine built into thingspeak, you can perform calibrations, develop
analytics and transform your Iot data. You can also use the MATLAB engine built into
Thingspeak license, you can run Matlab calculations that last upto 60 seconds. A commercial
Thingspeak license also enables you to use MATLAB tooboxes for machine learning, signal
processing, system identification, and more with Thingspeak provided you have a license for
the toolbox.
KIET Page 60
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.IN) #Read output from Sensor 1
GPIO.setup(12, GPIO.IN) #Read output from Sensor 2
def upload_cloud():
temp = get_latitude(msgdata)
temp1 = get_longitude(msgdata)
sensor1 = get_sensor1();
sensor2 = get_sensor2();
params = urllib.parse.urlencode({'field1': temp,'field2': temp1,
'field3':sensor1,'field4':sensor2,'key':key })
headers = {"Content-typZZe": "application/x-www-form-urlencoded","Accept" :
"text/plain"}
conn = http.client.HTTPConnection("api.thingspeak.com:80")
try:
conn.request("POST", "/update", params, headers)
response = conn.getresponse()
print(("Lat:",temp))
KIET Page 61
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
print(("Long:",temp1))
print(("Sensor1:",sensor1))
print(("Sensor2:",sensor2))
print((response.status, response.reason))
conn.close()
except KeyboardInterrupt:
print("Connection Failed")
def get_sensor1():
status=GPIO.input(11)
return status
def get_sensor2():
status=GPIO.input(12)
return status
if __name__ == "__main__":
start_gps_receiver(ser, msgdata)
time.sleep(2)
ready_gps_receiver(msgdata)
while True:
upload_cloud()
time.sleep(sleep)
import threading
import pynmea2
import sys
class Message:
def __init__(self):
self.msg =''
# Gps Receiver thread funcion, check gps value for infinte times
def get_gps_data(serial, dmesg):
print("Initializing GPS\n")
while True:
strRead = serial.readline()
if sys.version_info[0] == 3:
strRead = strRead.decode("utf-8","ignore")
if strRead[0:6] == '$GPGGA':
dmesg.msg = pynmea2.parse(strRead)
else:
if strRead.find('GGA') > 0:
dmesg.msg = pynmea2.parse(strRead)
KIET Page 62
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
<!DOCTYPE html>
<html>
<head>
<title>shiyaztech</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script
src="https://maps.googleapis.com/maps/api/js?key=YOUR_Google_MAPS_API_KE
Y"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
KIET Page 63
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
<script>
var map;
var x;
function loadmaps(){
$.getJSON("https://api.thingspeak.com/channels/THINKSPEAK_CHANNEL_ID/fiel
ds/1/last.json?api_key=THINKSPEAK_API_KEY", function(result){
var m = result;
x=Number(m.field1);
//alert(x);
});
$.getJSON("https://api.thingspeak.com/channels/THINKSPEAK_CHANNEL_ID/fiel
ds/2/last.json?api_key=THINKSPEAK_API_KEY", function(result){
var m = result;
y=Number(m.field2);
}).done(function() {
initialize();
});
}
window.setInterval(function(){
loadmaps();
}, 9000);
function initialize() {
//alert(y);
var mapOptions = {
zoom: 18,
center: {lat: x, lng: y}
};
map = new google.maps.Map(document.getElementById('map'),
mapOptions);
KIET Page 64
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
infowindow.open(map, marker);
});
}
KIET Page 65
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER-5
RESULTS
It is now important to monitor air pollution in real time in most of the urban areas.
This project is aimed at developing an IOT device which can monitor air pollution in real
time and log data to a remote server. Remote monitoring was facilitated using classical motes
in the past, which has some pitfalls like limited memory, processing speed and complex
programming strategies. By using Internet of Things and recording sensor data to a remote
server, the limitations of memory in the monitoring devices and manual collection of data
from the installed devices can be overcome. The IOT also helps monitoring the data in real
time.
The air pollution monitoring device developed in this project is based on Raspberry
Pi. The Raspberry board connects with ThingSpeak platform using API key matching. As the
cities usually have Wi-Fi hotspots at most of the places, so the device can be easily installed
near any hotspot for its operation. The ThingSpeak is a popular IOT platform which is easy to
use and program. The sensor used for monitoring the air pollution is MQ-135 smoke sensor
and MQ5 gas sensor. The sensing of data and sending it to the ThingSpeak server using
interent connection is managed by the raspberry pi code. The Python code is written,
compiled and loaded to the Pi board.
KIET Page 66
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 67
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
KIET Page 68
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER 6
ADVANTAGES AND APPLICATIONS
6.1 ADVANTAGES
The advantages of the proposed system is
Accessing the location of the vehicle round the clock
Instant alerts to user and authorities concerned regarding the gases emitted
out to track pollution levels
Low power consumption with high accuracy
Cost-effective compared to other pollution tracking devices
Efficient accident detection
Alert the Users when harmful gases composition increase inside the
vehicle which is tough to track because of the air circulation
Easy setup and maintenance
Easy to customize
6.2 APPLICATIONS
The location of the vehicle and graphs of different pollutants recorded are sent
straightforwardly to a cloud server, sent as Notifications with data and SMS alerts and
when the cloud is not accessible then the information is stored locally on the
Raspberry Pi and sent when the association resumes. Therefore, advantages like these
make this application perfect for smart security surveillance, tracking and monitoring
pollutants inside the car and from the vehicle where ever the manual checking is a big
concern and required security an alert system with instant notifications such as in
huge vehicle like Trucks, trains and cars. This system can be best utilized. Some of
the application areas of this system is given below.
1. Industrial pollutants tracking
2. Gaseous compositions present inside the home
3. Heavy air conditioned rooms gases tracking
4. Light motor vehicles which use fossil fuel
KIET Page 69
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER 7
CONCLUSION
Hence IoT based smart surveillance system using Raspberry pi has been successfully
designed and implemented which is capable of recording the level of pollutants emitted
inside and outside of the Vehicles and the same has been uploading to cloud service
ThingSpeak if it is not available then stores locally on Raspberry Pi storage. At the same
time, notifications and alerts are send to the user of the vehicle and Authorities of the
pollution control board.
KIET Page 70
ADVANCED VEHICLE TRACKING AND MONITORING USING RASPBERRY PI
CHAPTER 8
FUTURE SCOPE
Further extensions and feature enhancements are always inevitable in the present
generation trending technologies. As the future scope this system can be extended further by
adding the huge data sets collected can undergo through Big Data operations and huge
changes in pollution levels of cities can be brought under control, pollution-free spaces
around us can be known easily via a website or through a smart device. This further
decreases the health concerns of humans and improve the safe environment by adopting to
activities like Afforestation and using solar-powered transport system, for shorter distance
going for a walk,.By adding this additional system. Apart from this, we can interface
sensors like MEMS sensor, different Smoke sensors, and Fire sensors to give alerts
respectively.
KIET Page 71