Download as pdf or txt
Download as pdf or txt
You are on page 1of 76

Efficient Sensor Mat For Energy Harvesting And

People Counting
Under Graduate Final Year Project Report

SHAHBAZ ALI FA15-BCE-031


MUDABBAR HUSSAIN FA15-BCE-006
UMER SHOUKAT FA15-BCE-059

Project Advisor: Dr. Abbas Javed


Spring 2019
COMSATS UNIVERSITY ISLAMABAD, LAHORE
CAMPUS, PAKISTAN
NUMBER OF
PROJECT ID 08 MEMBERS
03

TITLE EFFICIENT SENSOR MAT FOR ENERGY HARVESTING AND PEOPLE COUNTING

SUPERVISOR NAME Dr. ABBAS JAVEDRNAL / EXTERNAL

MEMBER NAME REG. NO. EMAIL ADDRESS

SHAHBAZ ALI FA15-BCE-031 Ali132333@outlook.com

MUDABBAR HUSSAIN FA15-BCE-006 Mudabbar44@gmail.com

UMER SHOUKAT FA15-BCE-059 Umershoukat59@gmail.com

CHECKLIST:
Number of pages in this report

I/We have enclosed the soft-copy of this document along-with the


YES / NO
codes and scripts created by myself/ourselves

My/Our supervisor has attested the attached document YES / NO

I/We confirm to state that this project is free from any type of
YES / NO
plagiarism and misuse of copyrighted material

MEMBERS’ SIGNATURES

Supervisor’s Signature

1
This work, entitled “Efficient Sensor Mat for Energy Harvesting And People
Counting” has been approved to fulfil partial requirements for the award of
B. Eng. (Hons.) in Computer Engineering to

SHAHBAZ ALI SDP-FA15-BCE-031


And
MUDABBAR HUSSAIN SDP-FA15-BCE-006
And
UMER SHOUKAT SDP-FA15-BCE-059

External Examiner:

Head of Department:

Department of Electrical and Computer Engineering


COMSATS UNIVERSITY ISLAMABAD, LAHORE CAMPUS
LAHORE – PAKISTAN

2
ACKNOWLEDGEMENTS

In the name of Allah, the most kind and most merciful

We would like to thank our parents who kept backing us up in all the times, both financially
and morally.

We would also like to thank Dr. Abbas Javed for his guidance and encouraging us to work
hard and smart. We have found him very helpful while discussing the optimization issues in
this dissertation work. His critical comments on our work have certainly made us think of new
ideas and techniques in the fields of optimization and software simulation.

We are grateful to the God Almighty who provides all the resources of every kind to us, so that
we make their proper use for the benefit of mankind. May He keep providing us with all the
resources and the guidance to keep helping humanity.

3
ABSTRACT

In past few years, increase in production of less power consuming electronic devices made our
lives more comfortable. Although, energy consumed by these moveable electronic
devices will increase, the idea of energy harvesting in human surroundings arise a
new interest among us. In our project we proposed a sensor mat which can harvest ambient
energy source into usable electrical energy. As it will be successful approach to make power
through a sensor mat.

This objective can be accomplished by placing piezoelectric materials inside the mat and it
placed at entrance where it allows maximum people to go through it. Whenever, the person steps
on the mat it will generate a signal in the form of potential difference. This amount of potential
difference will be dependent on the force exerted by human footstep. After receiving the
threshold signal a program will run which will count the person and his direction. This would
allow us to generate appropriate amount of electricity as well as counting the number of people
and their direction.

4
TABLE OF CONTENTS
1. INTRODUCTION .................................................................................................................................... 8
1.1 Problem Statement ..................................................................................................................... 10
1.2 System Overview......................................................................................................................... 10
1.3 Project Goals And Scope ............................................................................................................. 11
2 LITERATURE REVIEW .......................................................................................................................... 12
2.1 The Basic Energy Resources ........................................................................................................ 12
2.2 Non-Renewable Energy Crises .................................................................................................... 12
2.3 Human Interest In Renewable Energy Resource ........................................................................ 13
2.4 Available Resources .................................................................................................................... 13
2.5 Vibrational Resources of Energy ................................................................................................. 14
2.6 Related Work .............................................................................................................................. 17
2.7 People Counting And Its Relationship With Energy .................................................................... 19
3 PROJECT DESIGN................................................................................................................................. 21
3.1 Prototype .................................................................................................................................... 21
3.2 Architecture ................................................................................................................................ 22
3.3 Description .................................................................................................................................. 24
4 IMPLEMENTATION ............................................................................................................................. 27
4.1 Energy Harvesting System: ......................................................................................................... 27
4.2 Circuit Implementation: .............................................................................................................. 28
4.3 People Counting mat .................................................................................................................. 31
4.4 Show results on the Web App: ................................................................................................... 37
4.5 Integration of Above Modules .................................................................................................... 38
5 EVALUATION AND RESULTS ............................................................................................................... 38
5.1 Evaluation of Energy Harvesting System .................................................................................... 39
5.2 Calculations for Battery Charging ............................................................................................... 43
5.3 Evaluation of Counting Mat ........................................................................................................ 44
5.4 Show results on LCD.................................................................................................................... 45
6 CONCLUSION AND FUTURE WORK .................................................................................................... 45
6.1 Conclusion ................................................................................................................................... 45
6.2 Future Work ................................................................................................................................ 46
REFERENCES ................................................................................................................................................ 48

5
Appendix A: Source Code ........................................................................................................................... 51
Appendix B: Hardware Schematic ............................................................................................................. 64
Appendix C: List of Components ................................................................................................................ 65
Appendix D: Timeline ................................................................................................................................. 66

6
Table of Figures
Figure 1-1 Future of Energy Reserves of Fossil Fuel [1]. .............................................................. 9
Figure 1-2 Estimation of available power that could be harvested during human activities[3]. .. 10
Figure 1-3 System Overview. ....................................................................................................... 11
Figure 2-1 Basic steps of manufacturing of piezoelectric device [20] ........................................ 16
Figure 3-1 Architecture Diagram 1 .............................................................................................. 21
Figure 3-2 Architecture Diagram 2 .............................................................................................. 22
Figure 3-3 Piezoelectric Sensor (27mm) ..................................................................................... 23
Figure 3-4 Piezoelectric Ceramic ................................................................................................. 23
Figure 3-5 Diode (1N4007) ......................................................................................................... 24
Figure 3-6 Bridge Rectifier .......................................................................................................... 24
Figure 3-7 INA219 ....................................................................................................................... 24
Figure 3-8 Battery ........................................................................................................................ 25
Figure 3-9 Arduino ...................................................................................................................... 25
Figure 4-1 Energy Harvesting System ......................................................................................... 26
Figure 4-2 Mechansim of mat ...................................................................................................... 27
Figure 4-3 Battery Circuit ............................................................................................................ 28
Figure 4-4 INA219 Connection with Source ............................................................................... 27
Figure 4-5 INA219 pin configration ............................................................................................ 27
Figure 4-6 Designed idea for mat ................................................................................................ 30
Figure 4-7 Patch based system ..................................................................................................... 34
Figure 4-8 Voltage Sensor circuit ................................................................................................ 35
Figure 4-9 20x4 LCD ................................................................................................................... 36
Figure 4-10 Implemented sensor mat .......................................................................................... 36
Figure 5-1 Voltage Sensor circuit ................................................................................................ 38
Figure 5-2 DMM results .............................................................................................................. 38
Figure 5-3 Oscilloscope results .................................................................................................... 39
Figure 5-4 Taped boundary placed at C block ............................................................................. 40
Figure 5-5 Testing of energy harvesting system at Park .............................................................. 41
Figure 5-6 Simulation results of people counting on arduino ...................................................... 44
Figure 5-7 Simulation results of people counting in C block ...................................................... 45
Figure 5-8 Harvested and counting results .................................................................................. 45
Figure 6-1 Piezoelectric shoe ....................................................................................................... 47

7
1. INTRODUCTION

For life, sun is the main source of energy on Earth. As we mostly depend on non-renewable
energy resources and become us believe it will vanish one day. There are most commonly used
non-renewable energy resources are:
 Using Oil
 Using Natural gas
 Using Coal

According to research we are consuming 11 billion tons of oil and infinite reserves of fossil fuel
every year. If we still consume with the same rate then it will be vanished till 2052. Remaining
other two resources will not be sufficient to fulfill the needs of energy and will vanished after 8
years in 2060. Although, coal is available in large amount but it is still finite reserves, so it will
also finished till 2088 [1].

Figure ‎1-1 Future of Energy Reserves of Fossil Fuel [1]

8
Because of this, researchers are trying their best to introduce ambient/renewable energy sources
form the nature with the help of science. The renewable energy sources are eco-friendly and non-
harmful for environment. Taking the concept of renewable energy resources, human beings have
started to generate energy from wind (by windmill) and sun (solar cell) with help of technology
[2].

In few past decades, researchers want to use the ambient source of energy, so they notice that a
human body carries large amount of energy which simply gets wasted in our regular work, like
energy in the form of heat from our body. So, they concluded that we utilized a large amount of
energy in moving from one place to another.

Figure 1-2 Estimate of available power that could be harvested during human activities [3].

So, it is possible to convert this energy (mechanical stress put by human through his motion) into
electrical pulse and this would be a big achievement in the field of technology. We are trying to
put this concept in generation of energy from mechanical stress by using piezoelectric energy
conversion principle.

9
The output energy of piezoelectric generator depends on its thickness [4]. We have examined
different piezoelectric generators [5-7]. Actually, this project focuses on mechanical vibration in
micro energy harvesting technology. Piezoelectric energy generator methodology that isn't
harder and that they have high output voltages that makes it the most suitable option in the field
of vibration based energy harvesting. Till now many researches have done a lot of work and
made remarkable achievements in the field of energy harvesting through piezoelectric [8, 9].
The proposed piezoelectric mat will generate energy by human walk, which convert mechanical
energy into electrical energy when piezoelectric material is stretched or deformed.

1.1 PROBLEM STATEMENT

Management of people and concept of saving maximum energy is today’s big issue. As ambient
energy harvesting is become a new interest of human. Sometimes in busy areas manual people
counting is not easy, already designed system make intrusive environment for people counting.
So these issues can be addressed by designing smart mat which can harvest energy and can also
count pedestrians in an efficient manner without interfering in the privacy of people.

1.2 SYSTEM OVERVIEW

Figure 1-3 System Overview

10
 Mat: Mat is based on grid system. Through this grid system, mat will able to recognize
either pedestrian leaved or entered. Each grid consists of 4-6 piezoelectric plates.
 Piezoelectric transducer: Whenever it is pressed it generates the pulse which goes to the
rectified circuit to get the DC converted value of voltages.
 Rectified Circuit: Use rectified circuit to convert the AC output of a piezoelectric into
DC.
 Battery: Battery is used to store generated voltages, the rectified output of proposed mat.
 Control Unit: Control unit executes the algorithm to detect which intersection of grid is
pressed first according to its reference line, then detect very next second pressed
intersection after it. And decide either the pedestrian enter or leave as well as his
direction.
 Web App: Web app shows the harvested energy and pedestrian’s count.

1.3 PROJECT GOALS AND SCOPE

The main aim of this project is to design a prototype to harvest energy from ambient sources
with the motion of pedestrians through walking on piezoelectric generators which is installed
on road or a path.

Our main goal is to generate energy and count people in an efficient way without any
compromises in the safety and privacy of the pedestrians.

The energy which will be produced through piezo sensors will eco-friendly and non-harmful
for the environment and will be available for future usage from a battery.

11
2 LITERATURE REVIEW
The term “Technology” refers to “The machinery and equipment developed from the application
of scientific knowledge” [10]. Computers and the internet are examples of technology. Licensed
from iStock Photo.Noun. The definition of technology is science or knowledge put into practical
use to solve problems or invent useful tools. With the passage of time, technology is improved
due to increased interest of people to upgrade their lifestyle remarkably. The discovery of energy
(electricity) was the greatest achievement and now it became our basic necessity. In this chapter,
we will discuss about some resources of energy and as well as some methods for production of
energy.

2.1 THE BASIC ENERGY RESOURCES


Two different types of energy resources are non-renewable energy resources and renewable
energy resources.

Non-Renewable Energy Resources:

These are the resources that do not renew itself such that the natural organic material needs heat
and pressure to become fuel which is gas or oil. Common non-renewable energy resources are:

 Oil
 Natural Gas
 Coal

Renewable Energy Resources:

Renewable energy resources are those energy resources that are continuously replenished
naturally on human timescale. There are some renewable energy resources like Sun, Wind,
Water and fire. So, these resources become the new interest of human [11].

2.2 NON-RENEWABLE ENERGY CRISES


The world has suffered many energy shocks most of them have fallen under the definition of
“Human-made energy crisis”. First oil crises erupted in 1974 due to consecutive wars and
Middle East operations, upon which World was heavily dependent on oil. [12]

12
2.3 HUMAN INTEREST IN RENEWABLE ENERGY RESOURCE
Healthy Environment: Non-renewable energy is a cause of global warming but natural
resources are not affecting the environment.

Availability: Non-renewable energy resources will be vanished one day from earth but the
natural energy resources are infinite.

Energy Security: By use of renewable energy resources at wide scale we will be able to make
our country rich in resources of energy.

2.4 AVAILABLE RESOURCES


Available natural energy resources are:
Solar Energy: Solar cells use photovoltaic to convert the solar energy into electrical energy. The
sun produces energy 200 times more than energy consumed by human. A lot of work has done in
this field [13].

Wind energy: The turbines are installed in windmills at height to harvest maximum energy
through maximum wind passes over blades of turbines. [14].

Geothermal Energy: The core of earth is extremely hot with the temperature of 4200°. For the
generation of energy, the required temperature is round 150°. It is also less expensive method to
harvest energy. [13].

Summary:

Main focus is to reduce the use of non-renewable resources for energy consumption because no
replenished has done. Whereas renewable resources like sun will give energy ever and wind give
energy as nature, means that they are infinite resources.

Comparison between solar and vibration renewable energy sources and their power density:

13
Table 1 A comparison of energy sources [15]

ENERGY SOURCE POWER DENSITY

SOLAR (OUTDOORS) 15mW/cm2 (direct sun)


0.15mW/cm2 (cloudy day)

SOLAR (INDOORS) 0.006mW/cm2 (standard office desk)


0.057mW/cm2(<60W desk lamp)

VIBRATIONS 0.01-0.1mW/cm3

2.5 VIBRATIONAL RESOURCES OF ENERGY

When we talk about vibrational resources of energy and their conversion mechanisms from
vibrational energy into electrical energy, we found these three methods:

 Electro-magnetic induction
 Electrostatic induction
 Piezoelectric transduction.

Electromagnetic Induction:

In this mechanism, energy is harvested due to relative motion between magnetic field and
conductor. Output power depends on strength of magnetic field, number of turns of coil and the
magnet and coil’s relative velocity. If you want to store the energy into battery, firstly you need

14
to rectify the output energy to convert it into DC signal. Energy generating by electromagnetic
mechanism has low voltage and high current output [16].

Electrostatic Induction:

In this mechanism, energy is harvested due to motion of one plate by external mechanical
motion and one should be fixed at that time, in that process mechanical energy is converted into
electrical energy [17]. It also needs DC voltages as supply to charge the capacitor plate. Actually,
the electrostatic induction take place between the parallel plates of capacitor which stores charge.

Piezoelectric Transduction:

In this mechanism, energy is harvested due to the deformation of piezo material, ceramics (has
piezoelectric effect) stick on metal plate. Most important thing is that generated output power
directly from its piezoelectric effect and it has high voltage output as well. Example is 27mm
piezoelectric disk harvests 3v if we stroke piezoelectric disk uniformly and constantly at same
place on it. For battery storage, the output of piezoelectric device should be converted into stable
voltages with the help of rectifying bridge and also make a smooth output by applying the AC to
DC converter [18]. It has an ability to generate energy by itself that is make it mature technology.
It is used in different fields such as aerospace, medical etc. Some piezoelectric material has
ability to work up to 1000°C. The effective method to generate max output from piezoelectric
material is mechanical vibration. It is used as an energy source for generation of power. Power
generation also depend upon amount of vibration which is applied [19]. Two major piezoelectric
types:

PZT: lead Zirconate and Titanate is one of the most popular piezoelectric ceramic material.
Some piezoelectric material has ability to work up to 1000°C. Basic manufacturing steps of
piezoelectric device are:

15
Figure 2-1 Basic steps of manufacturing of piezoelectric device [20]

PVDF:

Polyvinylidene fluoride or polyvinylidene difluoride is 50% amorphous and semi crystalline


polymer made up of radical polymerization of difluoro ethylene. It has ability to work between
185° – 250°C. It has more opposition against heat.

16
PVDF is the most important polymer in piezoelectric material because of its structure and
polarizing extruded film [21].

Here is comparison of vibrational energy resources: piezoelectric mechanism, electro-mechanics


mechanism and electrostatic mechanism.

Table 2 bit comparison between vibrational energy resources [22]

TYPE ENERGY DENSITY (MJ ASSUMPTIONS


CM‫־‬3)

PIEZOELECTRIC 35.4 PZT 5H

ELECTROMAGNETIC 24.8 0.25 T

ELECTROSTATIC 4 3 x 10⁷ m‫־‬¹

2.6 RELATED WORK


Around the world, there are institutes who are continuously work on piezoelectric sensor for
different type of applications. Well known projects Magic Carpet and Energy generation with
Shoe-Mounted Piezoelectric was completed by MIT a few years ago. German company also
work on advance piezoelectric transducers with slogan “no batteries and no wires”. Japan also
work on the piezoelectric generation by producing the piezoelectric effect on the stairs of the
bus, when passenger steps on the stair with that exerted force vibration is produced which is
input for piezoelectric sensor that produce small energy which is store in energy storage [23-25].
17
In [26], the authors presented the new technique “Synchronized switch harvesting on inductor”,
it was non-linear technique which gave significant increase in electromechanical coupling
coefficient of piezoelectric material and also increased the harvesting efficiency between 250%
and 450%.

In [27], the objective of “Power management for energy harvesting wireless sensor nodes” was
to create wireless sensing nodes which can operate on extremely low power level and energy
harvesting system consist of piezoelectric material. This sensing nodes contained
microprocessor, sensor signal conditioning board memory 2.4GHz IEEE 802.15.4 radio
transceiver and battery. This system delivered ~200µW under low level vibration condition [27].

In [28], “Multimodal energy harvesting device” was designed, in which electromagnetic and
piezoelectric energy harvesting mechanism was combined. The device in which piezoelectric
crystals bonded to cantilever beam and the beam tip had an attached permanent magnet and
oscillated within a stationary coil that is fixed to the package top. So, this magnet had two
purposes, Firstly, it acted as a tip mass of cantilever beam which lowered the resonance
frequency and secondly, it acted as a core which was oscillated between the inductive coils that
produced current through faraday’s effect. Power generated from this prototype was 0.25W by
using electromagnetic mechanism and 0.25mW by piezoelectric mechanism at 20 Hz frequency
and 35g acceleration.

In [29], the authors generated power from the piezoelectric transducers using PZT. The
generated power was 450mW from the 200 sensors that were connected in the parallel to get
higher value of current. A single piezo generates 10-20V voltages and 110u-120uA of current.
To avoid the voltage dropping problem in the parallel combination of sensors they put gel into
the center of each piezo to maintained similar amount of pressure. They used the LTC 3588 IC
which is a high hysteretic DC-DC converter to get higher amount of power. The generated
voltage was 3.6 so, they connect two DC-DC buck converters to get 5V-7V that were required to
charge a lithium battery. They use the Schottky diode which has the less reverse current to
handle the reverse current due to two DC-DC buck converters. The generated power was stored
in the Lithium-Polymer battery of 600mah in 7 hours.

18
In [30], the “fabric-based real-time pressure force mapping system” was designed to count the
people by tracking a single step. The mat gives information about the applied pressure on the
area of 1.5cm of mat after each 40ms to make the working of mat efficient. In the experimental
results they showed the average accuracy of 77% with the error margin of 2%. The foot
segmentation was performed by dividing the mat into boxes and algorithm was designed to
detect the new upcoming foot on the mat.

Designed a fabric sensor mat which has parallel electrodes on top and bottom which are actually
metallic fibers woven and middle layer is carbonate polymer fabric. Total thickness of all three
layers are combined is 0.5mm. In 2014, the fabrics designed by Sefar AG was used for people
counting [31, 32].

2.7 PEOPLE COUNTING AND ITS RELATIONSHIP WITH ENERGY


The word has suffered many energy shocks, most of them shocks have fallen under the definition
of “Human-made energy crisis”. One of these energy crisis, is waste of energy due to ignorance
and forgotten of power off the devices after use. To solve this big issue, if we use the people
counting technology to reduce this problem. Counts people in the room and decides when torn
off power (when no one in that room). On the other hand, for commercial purposes, people
counting and tracking is very useful such as it gives support in events. People counting also show
the difference between users (customers) and visitors. Also detects traffic and gives information
about which place or event attracts the people means shows the public present at event. Some of
few methods for people counting by advanced technology:

Thermal people counter:

This method receives incredible attention in recent years because major factor is to gives
maximum privacy. It is low energy consumer and also work in humidity and in foggy weather
conditions. It not works perfectly in dense traffic [33, 34]. In 2001, Portmann et al. [35] studied a
problem of detecting and tracking people from aerial views. Thermal camera’s framework uses a
resolution of thermal image is 324×256. This achievement is real time performed on desktop
“Intel i5 @3.3Ghz”.

19
Stereo people counters:

People counting process can be done by stereo cameras it’s one of the best features is many
people in view at once. To improve the tracking results, by increasing in image range. In 2001,
Nguyen et al [36] has been applied this people counting method by stereo cameras in different
situations successfully, and also tracking rigid objects. In 2007, Zhao et al [37] has applied
people counting method by using stereo cameras to detecting segments and tracking humans in
crowded places [37].

Infrared (IR) people counter:

In this method, infrared beam or heat sensors were used where no obstructing the path, maybe it
will suffer from undercounting problem due to the overlapping of people. In addition, these
systems may have a tendency to over count since the distinction among people not clear and
objects in the counting zone is difficult to identify.

Radar based people counter:

In this method, you can easily count the number of people passing though passageway in each
direction in the case of fire, smoky or dark (lightless) situations. In [38], the authors proposed
IR-UWB radar-based people counter in which each person is counted when he approached or
departed the IR-UWB radar. It only worked properly when one person passes through it.

20
3 PROJECT DESIGN

3.1 PROTOTYPE
First of all, we use wooden board as a mat to place the sensors on it. The mat has two layers
lower layer is used for energy harvesting and upper layer is used for people counting. The size of
the lower layer is 2’x2.5’ and upper layer is 2’x2’. The base of mat is covered with the sheet to
avoid any damage to the piezo ceramics transducer.

Upper layer consists of piezoelectric sensors which have the diameter of 2.7mm and the lower
layer have the piezo ceramic transducer. Upper layer of mat is divided into 12 patches to
estimate the direction of the pedestrian.

It has total of 64 piezoelectric sensors and after every patch we use a diodes to stop the reverse
flow of the current. Piezoelectric sensor are used as an input to the Arduino indicating the
pressed patch of the mat. Then apply the algorithm on the given coordinates to determine
whether the pedestrian enter or leave the room or building where the mat was placed.

In the lower layer we use piezo sensors (YCB-A20) for the purpose of energy harvesting. We use
3 piezo sensors (YCB-A20), 60 (local piezo) and connect them in the series-parallel combination
of the circuits to get higher value of power.

A bridge rectifier (KBJ608G) is used to convert the AC signal into DC signal. We use a diode to
oppose the reverse flow of the current. The battery was used to store the harvested energy.

21
3.2 ARCHITECTURE

Figure 3- 1 Architecture diagram 1

22
Figure 3- 2 Architecture diagram 2

23
3.3 DESCRIPTION
The list of components that are used in our project are:

Piezoelectric Sensors:

Piezoelectric sensors have been actively used in a wide range of industries these days. A
piezoelectric sensors material is material that converts a mechanical effect such as force or
vibration into an electrical signal. Piezoelectric sensors give the voltages whenever some
pressure is applied on them but they have lower value of current. This component is not good to
generate higher amount of the current, so we use them for the purpose of people counting as an
input to the microcontroller.

Figure 3- 3 Piezoelectric Sensor (27mm)

Piezoelectric Ceramic Generation Film:

“Piezoelectric Ceramic Generation Film” with model number YCB-A20 is used for the purpose
of energy harvesting. Its area is 100*60mm2 and it is more thin and sensitive as compared to the
local sensors. Its base is made of brass and have 4 separate ceramics with common ground. This
ceramic film has dual ability of producing current and voltages depending upon the
requirements.

Figure 3- 4 Piezoelectric Ceramic Generation Film


24
Diode (1N4007):

Diode will allow the flow of current in only one direction. 1N4007’s current carrying capacity is
1A. 1N4007 is general-purpose silicon rectifier diodes which is used in AC adapters for
household items. We use this component to stop the reverse flow of current to achieve high
accuracy.

Figure 3- 5 Diode (1N4007)

Bridge Rectifier (KBJ608G):

Bridge rectifier is a device which takes AC value as input and give output into DC value. It’s a
single phase bridge rectifier with 60HZ frequency. Its reverse voltage are 400-1000V and
forward current is 6.0 Amperes.

Figure 3- 6 Bridge Rectifier (KBJ608G)

INA219 Module:

This device is used to get the value of current and voltages available in the battery. The output of
this device is then send to the server to show the harvested energy on the web application.

25
Figure 3-7 INA219

Battery:

There are commonly two types of batteries that can be used, the batteries that must be thrown
after the use are known as primary batteries while the batteries that can be used to store the
charges are secondary batteries .We use Lithium polymer battery (secondary battery) in our
project to store the energy generated by the piezo ceramic material. It’s a 700MAH battery.

Figure 3-8 Battery

Arduino (Mega):

Arduino is an open-source programmable circuit board used for electronics projects. It has its
own built-in development environment. It consumed the less power as compared to the
Raspberry pi. It supports the simplified version of C++ and is easy for coding. It operates on 5v
with 56 digital and 16 analogue pins.

Figure 3-9Arduino (Mega)

26
4 IMPLEMENTATION

We have implemented the project in three different parts and then we integrate the three parts to
have our system ready.

 The first part is implementation of the energy harvesting system


 The second part is algorithm designing and people counting
 The third part is to show the harvested energy and counting result on the web application.

4.1 ENERGY HARVESTING SYSTEM:


We implemented the energy harvesting system on 2’x2.5’ wooden board. “Piezoelectric sensors”
are connected in the series-parallel combination of circuits to get the higher value of power.
After that we connect wires of the each of “Piezoelectric ceramic power generation film” to the
bridge rectifier to convert the AC value of voltages to DC. Total of 72 bridge rectifier are used in
this implementation. This figure 4-1 explains the above discssion.

Figure 4-1 Energy Harvesting System

Then we implemented our mechanism to press all the piezo plates at a time whenever the
pressure is applied on the mat. This mechanism will be helpful to achieve higher power. After
the implementation of this mechanism the mat will look like figure 4-2.

27
Figure 4-2 Mechanism for mat

4.2 CIRCUIT IMPLEMENTATION:


A circuit diagram is a graphical representation of an electrical circuit. A drawing meant to
describe the physical arrangement of the components connected by wires is called physical design,
or wiring diagram. The major components that are used in the circuit implementation are:

Major components

Wooden board:

Wooden board is used to place the piezoelectric sensors to achieve the purpose of energy
harvesting.

Piezoelectric ceramic power generation film:

It’s an important component of the project to generate the energy. They generate voltages
whenever some pressure is applied on them. The dimension of each sensor is given below:

 Length of plate = 100 mm


 Width of plate = 60mm
 Area of one Plate = 60mm x 100mm=6000mm2

28
 No of “Piezoelectric ceramic power generation film” = 3

Each “Piezoelectric ceramic power generation film” is directly connected with the 4 bridge
rectifiers. These 12 bridge rectifiers are connected in the parallel combination of circuits.

Piezoelectric Plate:

Each Piezoelectric sensor is directly connected with the 1 bridge rectifier. These 60 bridge
rectifiers are connected in the series-parallel combination of circuits. After each rectifier DC pins
a diode is used to mitigate reverse flow of current.

The dimension of each sensor is given below:

 Diameter of local Piezoelectric Sensors=27mm


 No of local Piezoelectric sensors=60

Bridge Rectifier (KBJ608G):

Bridge rectifiers are connected with piezoelectric sensors to get the DC converted value.

Battery:

The Lithium polymer battery is directly connected with the sensor mat to store the generated
energy in the form of DC. It’s a 700mAh battery. The figure 4-3 describes the connection of
battery with the sensor mat:

Figure 4-3 battery Circuit

29
INA219 Module:

This module is used to get the value of current and voltages available in the battery. The output
of this device is then send to the Arduino to show the harvested energy on the web application.
The connection of the module is described in figure 4-4 and figure 4-5 describes the pin
configuration of the module.

Figure 4-4 INA219 connection with source and battery

The above diagram shows the input side of the INA219 module. The module’s positive input pin
is connected with the sensor mat (source) and negative input pin is connected with the positive
terminal of the battery and the ground pin is connected with the negative terminals of the battery
and sensor mat (source).

The module’s SDA and SCL pins are connected with the SDA and SCL pins of the Arduino. The
VCC pin is connected with the Arduino’s 3v pin and ground is connected with the Arduino
ground pin respectively.

Figure 4-5 INA219 pin configuration


30
Arduino (Mega):

Arduino gives the required voltages (3.3) to the INA219 module and gets data from it through
the SDA and SCL pins. The Arduino’s IDE shows the results of INA219 module on the console.
Later on these results are saved in the database through the serial communication. The values
stored in the database are then showed on the web application through the localhost.

4.3 PEOPLE COUNTING MAT


In this stage we design the algorithm for the purpose of the people counting. The algorithm is
based on the patch system to get higher accuracy of count. There are total of 12 patches which
contains 4-6 piezoelectric sensors. Each patch is connected with a bridge rectifier to get the DC
value of sensors. Each bridge rectifier is connected with the voltage sensor which is working like
a pull up resistor. The patch layout for the mat is given defined in figure 4-6.

Figure 4-6 Designed Idea for mat

U0 (R):
The right most first upper patch.
U0 (M):
The medium first upper patch.
U0 (L):
The left most first upper patch.

31
U1 (R):
The right most second upper patch.
U1 (M):
The medium second upper patch.
U1 (L):
The left most second upper patch.
D1 (R):
The right most second lower patch.
D1 (M):
The medium second lower patch.
D1 (L):
The left most second lower patch
D0 (R):
The right most first lower patch.
D0 (M):
The medium first lower patch.
D0 (L):
The left most first lower patch.
The table given below describes the scenarios that can happen due to the pedestrian’s movement
and the results while walking on the mat.

Patched Pressed Pedestrian’s Direction

If D0(R) and then D1(R) are pressed Person entered

If D0(M) and then D1(M) are pressed Person Entered

If D0(L) and then D1(L) are pressed Person Entered

32
If D1(R) and then U1(M) are pressed Person Entered

If D1(M) and then U1(M) are pressed Person Entered

If D1(L) and then D1(L) are pressed Person Entered

If U1(R) and then U0(R) are pressed Person Entered

If U1(M) and then U0(M) are pressed Person Entered

If U1(L) and then U0(L) are pressed Person Entered

If D0(R) and then D1(M) are pressed Person Entered

If D0(M) and then D1(R) are pressed Person Entered

If D0(L) and then D1(M) are pressed Person Entered

If D0(M) and then D1(L) are pressed Person Entered

If D1(M) and then U1(L) are pressed Person Entered

If D1(L) and then U1(M) are pressed Person Entered

If D1(R) and then U1(M) are pressed Person Entered

If D1(M) and then U1(R) are pressed Person Entered

Patched Pressed Pedestrian’s Direction

If U1(R) and then U0(M) are pressed Person Entered

If U1(M) and then U0(R) are pressed Person Entered

If U1(L) and then U0(M) are pressed Person Entered

33
If U1(M) and then U0(L) are pressed Person Entered

If U0(L) and then U1(L) are pressed Person Leaved

If U0(M) and then U1(M) are pressed Person Leaved

If U0(R) and then U1(R) are pressed Person Leaved

If U1(M) and then D1(M) are pressed Person Leaved

If U1(L) and then D1(L) are pressed Person Leaved

If U1(R) and then D1(R) are pressed Person Leaved

If D1(M) and then D0(M) are pressed Person Leaved

If D1(L) and then D0(L) are pressed Person Leaved

If D1(R) and then D0(R) are pressed Person Leaved

If U0(M) and then U1(L) are pressed Person Leaved

If U0(L) and then U1(M) are pressed Person Leaved

If U0(R) and then U1(M) are pressed Person Leaved

If U0(M) and then U1(R) are pressed Person Leaved

34
Patched Pressed Pedestrian’s Direction

If U1(L) and then D1(M) are pressed Person Leaved

If U1(M) and then U1(L) are pressed Person Leaved

If U1(M) and then D1(R) are pressed Person Leaved

If U1(R) and then D1(M) are pressed Person Leaved

If D1(M) and then D0(L) are pressed Person Leaved

If D1(L) and then D0(M) are pressed Person Leaved

If D1(M) and then D0(R) are pressed Person Leaved

If D1(R) and then D0(M) are pressed Person Leaved

The implemented patch based system is shown in figure 4-7.

35
Figure 4-7 Patch based System

Major Components

 Piezo sensors (with diameter of 27 mm)


 Diodes
 Bridge Rectifier
 Wires
 Wooden board

Piezoelectric Plate:

4-6 piezoelectric sensor are connected with the 1 bridge rectifier. These 4 bridge rectifiers are
connected in the series-parallel combination of circuits. After each rectifier DC pins a diode is
used to mitigate reverse flow of current.

The dimension of each sensor is given below:

 Diameter of local Piezoelectric Sensors=27mm


 No of local Piezoelectric sensors=60

Bridge Rectifier (KBJ608G):

Bridge rectifiers are connected with piezoelectric sensors to convert the AC value to the DC.
36
Voltage Sensor:

The Voltage Sensor module is used with the Arduino as pull up resistor. The figure 4-8 describes
the circuit diagram of this component.

Figure 4-8 Voltage Sensor Circuit

4.4 SHOW RESULTS ON THE LCD:

In this stage we use a LCD of 20x4 to show the data of our sensor mat. The LCD gets data from
Arduino and displays the harvested energy and the counting results. The LCD shows harvested
energy generated by one step and pedestrian’s count and direction of the pedestrian. The figure
4-9 shows the results on the LCD.

Figure 4-9 20x4 LCD

37
In figure 4-9 the first row shows the voltage generated by one step and second row shows the power
and current, whereas the third row shows the pedestrian’s count and fourth row shows the direction of
the pedestrian.

4.5 INTEGRATION OF ABOVE MODULES


This stage is the last stage of our implementation process. We have to design a mechanism to
press the both layers of our sensor mat the upper layer (counting layer) and lower layer
(harvesting layer) and also save the mat from damage. So we use the thermocol sheets between
the upper and lower layer to press them at a time and use the screws to make the reasonable
balance between the layers. The complete implemented sensor mat is shown in figure 4-10.

Figure 4-10 Implemented sensor mat

5 EVALUATION AND RESULTS


The evaluation of this project “Efficient Sensor mat for Energy Harvesting and People Counting”
has been done successfully. The evaluation phase is divided in two parts:

 Evaluation of energy harvesting System


 Evaluation of People Counting System

38
5.1 EVALUATION OF ENERGY HARVESTING SYSTEM

To amylase any project, it is mandatory to test distinct specification of the project. In the testing
phase of energy harvesting System all the modules are tested successfully and values generated
by the System are shown in the Figure 5-1.This figure shows the results shown on the console of
Arduino during testing.

Figure 5-1 power Generated by one step

39
Results shown on the Digital Multi meter while testing are shown in the figure 5-2.

Figure 5-2 DMM results

We also test the System in the lab to check the waveforms generated by the energy harvesting
system. Some results are shown in the figure 5-4.

Figure 5-3 Oscilloscope results

Following values have been calculated using the readings of the Figure5-4.

Vpp is the peak to peak value of the voltages.We calculate the Vp (peak voltages) using the
equation
40
Vp = Vpp / 2 ……………………..Eq (1)

As Vpp=9.40 so put the value of Vpp in Eq (1) we get

Vp = 9.40/2 = 4.7

Vp =4.7V

Vrms is the root mean square value of the voltages. Vrms can be defined as

Vrms =Vp / √2 …………………Eq (2)

Putting Vp=4.7V in the Eq (2) we get the value of Vrms

= 4.7 x 0.707

Vrms = 3.11V

Irms is the root mean square value of the current. Vrms can be defined as

Irms = Vrms / R ……………………………Eq (3)

Where Vrms is root mean square voltages and R is the resistance.

Putting the value of Vrms from Eq (2) and R=5500 in Eq (3) we get

= 3.11 / 5500

Irms= 0.56mA

The power can be find using the formula

Power = P = Irms x Vrms ……………….Eq (4)

Putting the value of Eq (2) and Eq (3) in Eq (4) we get

Power= 1.74mW

So a step can generate 1.74mW of power.

41
We also placed a taped boundary at the entrance of C block of the COMSATS UNIVERISTY.
The taped boundary was placed to get a rough estimate of foot traffic in the department. In the
test we noticed that 72.32% of the pedestrians put only one foot in the mat’s area and remaining
27.32% put two foots on the mat’s area. The mat was placed for 15 minutes and during this time
108 pedestrians passed through the mat’s area. The taped boundary used for estimate is shown in
figure 5-4.

Figure 5-4 Taped Boundary placed at C block

The results based on the estimate are:

Time for which Taped boundary was placed=15min

Total no of pedestrian passed through the boundary=112

Pedestrian who put one foot on the taped boundary=81

Pedestrian who put two feet on the taped boundary=31

Total steps= 81+ (2*31) = 143

Power generated by one step=1.74mW

Generated Power =No of steps * power generated by one step……..Eq (5)

=1.74mW*143
42
=0.248W

Energy harvested in 1 hour = (energy harvested in 15 min)*4

=0.248*4

Energy harvested in 1 hour =0.992W

Energy harvested in 1 day = (Energy harvested in 1 hour)*24

=0.992*24

Energy harvested in 1 day=23.992W

Energy harvested in 1 month = (Energy harvested in 1 day)*30

=23.808*30

Energy harvested in 1 month=714.24W

Energy harvested in 1 Year=149.76W*12

Energy harvested in 1 Year=8570.88W

We also test the energy harvesting System at the entrance of a public park. We choose the public
park due to high foot traffic at night time. We have to face different problems during the testing
process. The pedestrians in the park were not passing through the mat so, we get less values of
current and voltages. We have to convince them to pass through the mat. The figure 5-5 shows
the pedestrian passing through the sensor mat.

Figure 5-5 Testing of Energy Harvesting System in the entrance of park


43
During the testing process we get the following results:

Total no of pedestrian passed through the sensor mat=50

Pedestrian who put one foot on the sensor mat =40

Pedestrian who put two feet on the sensor mat=10

Total steps= 40+ (2*10) = 60

Power generated by one step=1.74mW

Putting the values in Eq (5) we get

=1.74mW*60

=0.104W

So in 30 mins total of 0.104W energy is harvested.

If we take the above values as the basis then

Energy harvested in 1 hour = (energy harvested in 30 min)*2

=0.104*2

Energy harvested in 1 hour =0.208W

Energy harvested in 1 day = (Energy harvested in 1 hour)*24

=0.208*24

Energy harvested in 1 day=4.992W

Energy harvested in 1 month = (Energy harvested in 1 day)*30

=4.992*30

Energy harvested in 1 month=149.76W

Energy harvested in 1 Year=149.76W*12

Energy harvested in 1 Year=1797.12W


44
The table given below compares the energy harvested in taped boundary and at park’s entrance.

Time Energy harvested in Energy harvested at

the taped boundary the entrance of the park

1 Hour 0.992W 0.208W

1 Day 23.992W 4.992W

1Month 714.24W 149.76W

1 year 8570.88W 1797.12W

5.2 CALCULATIONS FOR BATTERY CHARGING

As we know that charging current should be 10% of the Ah rating of battery.


So,
Charging current for 700mAh Battery = 700mAh x (10/100) = 0.07 Amperes.
But due to some losses, we may take 1 Amperes for battery charging purpose.

Then Charging time for 700mAh battery = 0.7/ 1 = 0.7 Hrs. which is equal to 42 min.

Practically, it has been noted that 5% of losses occurs in case of battery charging.

Then 0.7 x (5/100) = 0.035 …………..(700mAh x 5% of losses)

So, 0.7+ 0.035= 0.735 Ah ………….( 0.7Ah + Losses)

45
Now Charging Time of battery = Ah / Charging Current

Putting the values;

0.735 / 1 = 0.735 hrs. or 42 min . ( in real case)

Therefore, a 700mAh battery would take 42 minutes to fully charge in case of the required 1A
charging current.As we know, volts x amps-hours = watts-hours

(V) X (Ah) = (Wh)

1.5 x 700m = 1.05Wh

= 3780W

Generated power by each step = 0.017 Watts

Total steps to charge the battery = 3780/0.017W

= 222,352 steps

5.3 EVALUATION OF COUNTING MAT

People counting mat is successfully assembled and tested. The mat was placed at the entrance of
the C block of Comstas University for testing purpose. In the testing process of the floor mat the
mat count the pedestrian as well as estimate the direction of the pedestrian. The sensor mat gives
80% of accuracy for direction estimating and 100% for counting. The figure 5-6 shows the
testing results while testing on Arduino. The figure 5-7 shows the testing results while in C block
of the Comstas University.

46
Figure 5-6 Simulation results of the People Counting on Arduino

Figure 5-7 Simulation results of the People Counting in C block

5.4 SHOW RESULTS ON LCD


Last phase of testing was to show the results of energy harvesting and people counting on the
LCD. This phase is also tested and completed successfully. The figure 5-8 shows the harvested
energy and counted people and the direction of the pedestrian.

47
Figure 5-8 Harvested and counting results

6 CONCLUSION AND FUTURE WORK

6.1 CONCLUSION

We initiated our project with described objectives and milestones to achieve. No doubt during
this journey we kept on working hard and accomplished our 90% of the objectives yet we
experience many serious problems that restrict our work and progress. The piezoelectric
mechanism is an easy and good source of energy harvesting but, it is the costly mechanism
because it took too much cost as compared to other mechanism but generate less amount of
energy.

The project “Efficient Sensor Mat for Energy Harvesting and People Counting” has been
successfully implemented and tested. The main purpose of this project is to produce energy
through piezoelectric sensors and the count the pedestrian in an efficient way without
disturbing their privacy. It has been developed by integration of all the hardware modules
and software algorithms. Every designed module has a specific reason and is placed carefully
to help in the best working of the unit. We have designed a small prototype to display about
the generation of energy from the piezoelectric sensors to increase the output power from the
piezoelectric sensor, the count of piezoelectric sensors and piezoelectric plates can be
increased in future. This project has a limitation that it depends on the foot traffic so cannot
be installed in those areas where the foot traffic is not consistent.

The plus point of this project is that we are able to counting the pedestrian and the other
subjects in an un-intrusive way and give the better results as compared to the already
48
designed systems. We have concluded that the sensor mat will be a good choice from the
counting prospective as it is also generating a little amount of the energy by the motion of the
subjects placed on it.

6.2 FUTURE WORK


The designed project is just a prototype but, later on number of piezoelectric sensors can be
increased according to the needs of energy. It can also be put down along the road sides in
those areas where the foot traffic is very high. The energy generated by the footsteps could
be used for human being usage. There are many uses of this project in future but few are
given below:

Piezoelectric Shoes

Piezoelectric sensors can be placed in shoes to store and utilize energy which is wasted
energy through walking. And stored energy can be used to give energy to our portable
devices like mobiles.

Piezoelectric sensors can also be installed in shoes that are used by the army soldiers, so that
when they go on a drill mission they can use the power generated by their own footstep.
Further this system can be implemented with GSM module and Neural Networks to get the
body reading of a solider and informs the team that a man is injured depending upon their
blood pressure.

Figure 6.1 Piezoelectric shoe

49
Counting Mat

This our counting mat is very useful and practical functional in many ways some them are given
below

 The mat can be used in the future to save power by checking the occupancy in a hall or
room and turn off the electricity automatically when there is no one in the room.
 The mat can placed in the entrance of a marriage hall to count the number of guest
entertained by the hall management.
 The mat can also be used for security purpose with the buzzer or alarm at the entrance of
home or server room at specific time. When the count increases the specific number the
alarm is turned on automatically.
 The mat can be placed in a market to check the most visited shop.

50
REFERENCES

[1] “The End Of Fossil Fuels,” The End Of Fossil Fuels - Our Green Energy - Ecotricity.
[Online]. Available: https://www.ecotricity.co.uk/our-green-energy/energyindependence/the-
end-of-fossil-fuels
[2] B. Lee et al., "Generating characteristics of a hump shaped piezoelectric energy
harvester," 2015 Joint IEEE International Symposium on the Applications of Ferroelectric
(ISAF), International Symposium on Integrated Functionalities (ISIF), and Piezoelectric Force
Microscopy Workshop (PFM), Singapore, pp. 240-243, 2015.
[3] Wikipedia: Vitruvian Man. Available online: http://en.wikipedia.org/wiki/File:Da_Vinci_
Vitruve_Luc_Viatour.jpg
[4] C. Keawboonchua and T. G. Engel, Factors Affecting Maximum Power Generation in
Piezoelectric Pulse Generator Vol.1, pp 327 –330
[5] T. G. Engel, W. C. Nunnally, and N. B. VanKirk, Compact kinetictoelectrical energy
conversion, Proc 11th IEEE Int. Pulsed Power Cod., Baltimore,MD, 1997, pp. 1503-1507.
[6] T. G. Engel, C. Keawboonchuay, and W. C. Nunnally, Energy conversion and high power
pulse production using miniature piezoelectric compressors, IEEE Trans. Plasma Science., vol
28, no. 5,
pp. 1338-1341.
[7] C. Keawboonchuay, Exploration of high power piezoelectric kinetic to electrical enera
converter, Master’s Thesis, University of Missouri-
Columbia, May, 2000.
[8] W. M. Jayarathne, W. A. T. Nimansala and S. U. Adikary, "Development of a Vibration
Energy Harvesting Device Using Piezoelectric Sensors," Moratuwa Engineering Research
Conference (MERCon), Moratuwa, pp. 197-202, 2018.
[9] W. Wang, T. Yang, X. Chen, X. Yao and Qifa Zhou, "Vibration energy harvesting using
piezoelectric circular diaphragm array," 2011 International Symposium on Applications of
Ferroelectrics (ISAF/PFM) and 2011 International Symposium on Piezoresponse Force
Microscopy and Nanoscale Phenomena in Polar Materials, pp. 1-4, 2011.
[10] Oxford Dictionaries | English. (2018). technology | Definition of technology in English by
Oxford Dictionaries. [online] Availableat:https://en.oxforddictionaries.com/definition/technology
51
[11] "Renewable Energy: Why Use Renewable Energy?," March 2001. [Online]. Available:
http://www.nrel.gov/docs/fy01osti/27955.pdf.
[12] Study.com. [Online]. Available: https://study.com/academy/lesson/energy-crisis-definition-
solutions.html. [Accessed: 09-Dec-2018].
[13] Systems, E., Ghosh, T., Prelas, M. and Netherlands, S. (2018). Energy Resources and
Systems - Volume 2: Renewable Resources | Tushar Ghosh | Springer. [online] Springer.com.
Available at: https://www.springer.com/gp/book/9789400714014 [Accessed 5 Dec. 2018].
[14]Ei.lehigh.edu.(2018).[online]Availableat:http://www.ei.lehigh.edu/learners/energy/readings/
wind.pdf [Accessed 5 Dec. 2018].
[15] RabaeyJ. M.AmmerM. J.daJ. L.SilvaD.PatelRoundyS.PicoPicoRadio supports ad hoc ultra-
low power wireless networking. Computer20003342
[16]Pue.kar.nic.in.(2018).[online]Availableat:http://pue.kar.nic.in/PUE/PDF_files/recogn/ipu_IIq
b/33_ch6.pdf [Accessed 5 Dec. 2018].
[17]Pue.kar.nic.in.(2018).[online]Availableat:http://pue.kar.nic.in/PUE/PDF_files/recogn/ipu_IIq
b/33_ch6.pdf [Accessed 5 Dec. 2018].
[18] Zhou, Y., Li, S. and Zhou, H. (2015). State space finite element analysis for piezoelectric
precision positioning considering secondary converse piezoelectric effect. Finite Elements in
Analysis and Design, 102-103, pp.85-94.
[19] H. A. S. a. D. J. Inman, "A Review of Power Harvesting from Vibration using Piezoelectric
Materials," The Shock and Vibration Digest, vol. 36, no. 3, pp. 197-205, 2004.
[20] Talapatra, A. (2011). Characterization of an ultra-high temperature ceramic composite
(UHTCC) by ultrasonic testing. Ultrasound, 66(2).
[21] Ieeexplore.ieee.org. (2018). IEEE Xplore Full-Text PDF:[online] Available at:
https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8354982 [Accessed 6 Dec. 2018].
[22] RoundyS.WrightP. K.piezoelectricA.vibrationbased.generatorfor.wirelesselectronics.Smart
Materials & Structures. 2004131131
[23] EnOcean GmbH | Kolpingring 18a | D-82041 Oberhaching, “EnOcean,” Energy Harvesting
Wireless Sensor Solutions and Networks from EnOcean. [Online]. Available:
https://www.enocean.com/en/.

52
[24] C. A.-y. H. R. Joseph Paradiso, "The Magic Carpet: Physical Sensing for Immersive
Environments," USA, 1997.
[25] N. S. S. Nathan S. Shenck, "ENERGY SCAVENGING WITH SHOE-MOUNTED
PIEZOELECTRICS," MIT Media Laboratory, 2001.
[26] A. Badel, D. Guyomar, E. Lefeuvre, and C. Richard, “Efficiency Enhancement of a
Piezoelectric Energy Harvesting Device in Pulsed Operation by Synchronous Charge Inversion,”
Journal of Intelligent Material Systems and Structures, vol. 16, no. 10, pp. 889–901, 2005.
[27] S. W. Arms, S. W. Arms, C. P. Townsend, C. P. Townsend, D. L. Churchill, D. L.
Churchill, J. H. Galbreath, J. H. Galbreath, S. W. Mundell, S. W. Mundell, "Power management
for energy harvesting wireless sensors", Proc. SPIE 5763, Smart Structures and Materials 2005:
Smart Electronics, MEMS, BioMEMS, and Nanotechnology, (16 May 2005); doi:
10.1117/12.600302;
[28] Y. Tadesse, S. Zhang, and S. Priya, “Multimodal Energy Harvesting System: Piezoelectric
and Electromagnetic,” Journal of Intelligent Material Systems and Structures, vol. 20, no. 5, pp.
625–632, 2008.
[29] Xu, X., Wei, X., Gao, H., Zhu, J. et al., "Research on Charging Strategy of Lithium-ion
Battery," SAE Technical Paper 2015-01-1192, 2015, doi:10.4271/2015-01-1192.
[30] J. John Livingston and M. Hemalatha School of Computing, SASTRA University,
Thanjavur, Tamil Nadu, India
[31] “Sefar ag.” [Online]. Available: http://www.sefar.com/
[32] B. Zhou, J. Cheng, M. Sundholm, and P. Lukowicz, “From smart clothing to smart table
cloth: Design and implementation of a large scale, textile pressure matrix sensor,” in ARCS2014.
Springer LNCS, 2014.
[33] Hao Q., et al: Human tracking with wireless distributed pyroelectric sensors, IEEE Sensors
Journal, Vol. 6, No. 6, pp. 1683–1694, Dec. 2006.
[34] Li N. and Hao Q.: Multiple walker recognition with wireless distributed pyroelectric
sensors, Proceedings of SPIE Defense and Security, pp. 694034(1-12), March 2008.
[35] J.Portmann et al., “People detection and tracking from aerial thermal views,” in Proc. ICRA
Conf. IEEE,2014.
[36] https://pdfs.semanticscholar.org/0288/10bac9dbd07f3929c1969794c12c5a8e11d0.pdf

53
[37] T., Nevatia, R., and Wu, B. (2007). Segmentation and tracking of multiple humans in
crowded environments. IEEE transaction son pattern analysis and machine intelligence, pages
1198–1211.
[38] X. Quan, J. W. Choi, and S. H. Cho, “In-bound/out-bound detection of people’s movements
using an IR-UWB radar system,” in Proc. Int. Conf. Electron. Inf. Commun. (ICEIC), Kota
Kinabalu, Malaysia, Jan. 2014, pp. 1–2.

54
Appendix A:INA219 Code
//ina219
#include <Wire.h>
#include <Adafruit_INA219.h> // library

Adafruit_INA219 sensor219; // Declare and instance of INA219


static int count = 0;
static int flag=0;
void setup(void)
{
Serial.begin(9600);
sensor219.begin();
}
void loop(void)
{
float busVoltage = 0;
float current = 0; // Measure in milli amps
float power = 0;

busVoltage = sensor219.getBusVoltage_V();
current = sensor219.getCurrent_mA();
power = busVoltage * (current); // Calculate the Power

int sensorValue = analogRead(A0);


if(sensorValue>= 1000){

Serial.print(busVoltage);

55
Serial.print(",");

Serial.print(current);
Serial.print(",");
Serial.print(power);
Serial.print(",");
Serial.print(count);
Serial.println("");
if(flag==0){
count++;
flag=1;
}
} else{
flag=0;
}
//Serial.println(count);
delay(100);
}
Database Conection: Node JS code
// ------------ MySQL ------------ //
const MySQL = require('mysql');
const con = MySQL.createConnection({
host: "localhost",
port: "3306",
user: "root",
password: "",
database: "arduino",
charset: "utf8mb4_general_ci"
56
});
con.connect((err) => {
if (err)
console.error(err);
console.log("Connected to database");
});
function insertValueIntoDatabase(value) {
const sql = 'INSERT INTO `status` (volt,current,power,count) VALUES ('+value+');';
con.query(sql, function (err, result) {
if (err)
console.error(err);
});
}
// ------------ Serial ------------ //
const SerialPort = require('serialport');
const baudRate = 9600;
SerialPort.list((err, ports) => {
if (err)
console.error(err);
if (ports.length == 0)
console.error("No Serial ports found");
// Iterate over all the serial ports, and look for an Arduino
let comName = null;
ports.some((port) => {
if (port.manufacturer
&& port.manufacturer.match(/Arduino/)) {
comName = port.comName;
console.log('Found Arduino');
57
console.log('\t' + port.comName);
console.log('\t\t' + port.pnpId);
console.log('\t\t' + port.manufacturer);
return true;
}
return false;
});

if (comName == null) {
comName = ports[0].comName;
console.warn('No Arduino found, selecting first COM port (' + comName + ')');
}
// Open the port
const port = new SerialPort(comName, { baudRate: baudRate },
(err) => {
if (err)
console.error(err);
});
// Attach a callback function to handle incomming data
port.on('data', receiveSerial);
console.log("Connected to Arduino");
});

// A class for reading lines of text


class TextParser {
constructor() {
this.string = '';
}
58
static isEndMarker(char) {
return char == '\r' || char == '\n'; // New line characters (NL & CR)
}
parse(char) {
if (this.clear) {
this.string = '';
this.clear = false;
}
if (TextParser.isEndMarker(char)) {
if (this.string.length > 0) {
this.clear = true;
return true;
}
return false;
} else {
this.string += char;
}
}
get message() {
return this.string;
}
}

const parser = new TextParser;

function receiveSerial(dataBuf) {
let str = dataBuf.toString();
// Loop over all characters
59
for (let i = 0; i < str.length; i++) {
// Parse the character
if (parser.parse(str[i])) {
// If a complete line has been received,
// insert it into the database

insertValueIntoDatabase(parser.message);
}
}
}

People Counting:

#include <Wire.h>

#include <Adafruit_INA219.h>

#include <LiquidCrystal_I2C.h>

Adafruit_INA219 sensor219;

LiquidCrystal_I2C lcd(0x27, 20, 4);

float busVoltage = 0;

float current = 0;

float power = 0;

int count=0;

int counter=0;

60
void base_IN_1(){

static int flag=0;

int counter0 = digitalRead(3);

int counter1 = digitalRead(4);

while(counter0==HIGH){

counter0 = digitalRead(3);

counter1 = digitalRead(4);

while(counter1 == HIGH){

counter0 = digitalRead(3);

counter1 = digitalRead(4);

if(flag==0){

digitalWrite(7,HIGH);

flag=1 ;

else{flag=0;}

if(counter0== LOW){

digitalWrite(7,LOW);

Serial.println("in");

count = counterIN(count);

in();

break;

}else

digitalWrite(7,LOW);
61
}}}

void base_IN_2(){

static int flag=0;

int counter0 = digitalRead(4);

int counter1 = digitalRead(5);

while(counter0==HIGH){

counter0 = digitalRead(4);

counter1 = digitalRead(5);

while(counter1 == HIGH){

counter0 = digitalRead(4);

counter1 = digitalRead(5);

if(flag==0){

digitalWrite(8,HIGH);

flag=1 ;

else{flag=0;}

if(counter0== LOW){

digitalWrite(8,LOW);

Serial.println("in");

count = counterIN(count);

in();

break;

}else
62
{

digitalWrite(8,LOW);

}}}

void base_IN_3(){

static int flag=0;

int counter0 = digitalRead(5);

int counter1 = digitalRead(6);

while(counter0==HIGH){

counter0 = digitalRead(5);

counter1 = digitalRead(6);

while(counter1 == HIGH){

counter0 = digitalRead(5);

counter1 = digitalRead(6);

if(flag==0){

digitalWrite(9,HIGH);

flag=1 ;

else{flag=0;}

if(counter0== LOW){

digitalWrite(9,LOW);

Serial.println("in");

count = counterIN(count);
63
in();

break;

}else

digitalWrite(9,LOW);

}}}

void base_OUT_1(){

static int flag=0;

int counter0 = digitalRead(4);

int counter1 = digitalRead(3);

while(counter0==HIGH){

counter0 = digitalRead(4);

counter1 = digitalRead(3);

while(counter1 == HIGH){

counter0 = digitalRead(4);

counter1 = digitalRead(3);

if(flag==0){

digitalWrite(10,HIGH);

flag=1 ;

else{flag=0;}

if(counter0== LOW){
64
digitalWrite(10,LOW);

Serial.println("out");

count = counterOUT(count);

out();

break;

}else

digitalWrite(10,LOW);

}}}

void base_OUT_2(){

static int flag=0;

int counter0 = digitalRead(5);

int counter1 = digitalRead(4);

while(counter0==HIGH){

counter0 = digitalRead(5);

counter1 = digitalRead(4);

while(counter1 == HIGH){

counter0 = digitalRead(5);

counter1 = digitalRead(4);

if(flag==0){

digitalWrite(11,HIGH);

flag=1 ;

}
65
else{flag=0;}

if(counter0== LOW){

digitalWrite(11,LOW);

Serial.println("out");

count = counterOUT(count);

out();

break;

}else

digitalWrite(11,LOW);

}}}

void base_OUT_3(){

static int flag=0;

int counter0 = digitalRead(6);

int counter1 = digitalRead(5);

while(counter0==HIGH){

counter0 = digitalRead(6);

counter1 = digitalRead(5);

while(counter1 == HIGH){

counter0 = digitalRead(6);

counter1 = digitalRead(5);

if(flag==0){
66
digitalWrite(12,HIGH);

flag=1 ;

else{flag=0;}

if(counter0== LOW){

digitalWrite(12,LOW);

Serial.println("out");

count = counterOUT(count);

out();

break;

}else

digitalWrite(12,LOW);

}}}

int counterIN(int variable){

harvestD();

return(++variable);

int counterOUT(int variable){

harvestD();

if(variable!=0)
67
return(--variable);

int total(int variable){

return(++counter);

void in(){

lcd.setCursor(0,0);

lcd.print("Board Interaction");

lcd.setCursor(18,0);

counter = total(counter);

lcd.print(counter);

Serial.println(counter);

lcd.setCursor(0,1);

lcd.print("Occupy");

lcd.setCursor(7,1);

lcd.print(count);

lcd.setCursor(11,1);

lcd.print("DRCTN");

lcd.setCursor(17,1);

lcd.print("In ");

void out(){
68
lcd.setCursor(0,0);

lcd.print("Board Interaction");

lcd.setCursor(18,0);

counter = total(counter);

lcd.print(counter);

Serial.println(counter);

lcd.setCursor(0,1);

lcd.print("Occupy");

lcd.setCursor(7,1);

lcd.print(count);

lcd.setCursor(11,1);

lcd.print("DRCTN");

lcd.setCursor(17,1);

lcd.print("Out ");

void harvestD(){

busVoltage = sensor219.getBusVoltage_V();

current = abs(sensor219.getCurrent_mA());

power = busVoltage * (current);

Serial.print("Bus Voltage: ");

Serial.print(busVoltage);

Serial.println("V");
69
Serial.print("Current: ");

Serial.print(current);

Serial.println("mA");

Serial.print("Power: ");

Serial.print(power);

Serial.println("mW");

Serial.println("");

lcd.setCursor(0,2);

lcd.print("Power GEN");

lcd.setCursor(14,2);

lcd.print(power);

lcd.print("mW");

float per = (busVoltage / 3.70)* 100;

lcd.setCursor(0,3);

lcd.print("BAT Percentage");

lcd.setCursor(15,3);

lcd.print(per);

lcd.print("%");

70
void setup() {

Serial.begin(9600);

sensor219.begin();

lcd.begin();

lcd.backlight();

lcd.setCursor(0,0);

lcd.print("----QUANTIFY WAY----");

lcd.setCursor(0,1);

lcd.print("Low power pedestrian");

lcd.setCursor(8,2);

lcd.print("flow");

lcd.setCursor(1,3);

lcd.print("equipment in town!");

delay(4000);

lcd.clear();

pinMode(3,INPUT);

pinMode(4,INPUT);

pinMode(5,INPUT);

pinMode(6,INPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

pinMode(12, OUTPUT);
71
}

void loop() {

int counter0 = digitalRead(3);

int counter1 = digitalRead(4);

int counter2 = digitalRead(5);

int counter3 = digitalRead(6);

if(counter0==HIGH && counter1==LOW)

{ base_IN_1(); }

if(counter1==HIGH && counter2==LOW)

{ base_IN_2(); }

if(counter2==HIGH && counter3==LOW)

{ base_IN_3(); }

if(counter1==HIGH && counter0==LOW)

{ base_OUT_1(); }

if(counter2==HIGH && counter1==LOW)

{ base_OUT_2(); }

if(counter3==HIGH && counter2==LOW)

{ base_OUT_3(); }

72
Appendix B: Hardware Schematics

73
Appendix C: List of Components

 Piezoelectric Sensor (27mm)


 Piezoelectric Ceramic
 Diode (1N4007)
 Bridge Rectifier
 INA219
 Battery
 Arduino

74
Appendix D: Timeline

75

You might also like