Vous êtes sur la page 1sur 51

Pamantasan ng Lungsod ng Maynila

University of the City of Manila


College Of Engineering and Technology
ME/ MfgE Department

INSTRUMENTATION AND CONTROL SYSTEMS


Sense It: A Bidirectional People Counter

Submitted by:
Calma, Ma. Cheyenne C.
De Jesus, Princess Yvette
Fetalvero, Krizia F.
Nucup, Lee Ann Gail
Sugatan, Rancel L.
Ulpindo, Janusz Jerard B.
BS MfgE V

Submitted to:
Engr. Perferinda Caubang
1

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

September 21, 2016

TABLE OF CONTENTS
I. Introduction..3
II. Objectives..5
III. Scope and Limitations..6
IV. Theory..9
V. System Requirements16
VI. Design Process..19
VII. Materials22
VIII. Construction Procedure..26
IX. Conclusion.30
X. Recommendation31
XI. Appendices..33
2

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

A. Code..33
B. Specifications of material used36
C. Pictures39
D. References..42

I.

INTRODUCTION

In todays world, there is a continuous need for automation. With the


increase in standard of living, there is a sense of urgency for developing circuits
that would ease the complexity of life. Many times we need to monitor the
people visiting some place like airports, seminar halls and even in shopping
mall.
The financial performance of a retailer relates to its ability to attract
traffic into its stores and convert the incoming traffic into sales profitably.
Thus, retailers invest heavily in marketing activities, to draw customers into
their stores, and in store operations, to convert the traffic into profitable sales.

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Retailers use different strategies to increase store traffic. They invest in


prime real estate having desirable properties such as high foot-traffic of their
targeted customer segments, convenience, and visibility. Once they determine a
location, retailers drive store traffic in a variety of ways; these methods include
spending on advertising, offering loss-leader products, and conducting various
promotional events, such as offering discounts, getting celebrities like authors
or sportspeople, and conducting workshops or seminars.

When customers visit the stores, retailers try to convert the traffic into
sales profitably through several means. They ensure that the right product is
available at the right place, at the right time, and at the right price (Fisher
1997). People counters will assist you in understanding retail store traffic in
your establishment. Once you have a better understanding of how the retail
store traffic flows through your establishment, you will be in a better position
to make well-informed business decisions. These well-informed business
decisions will lead to an increase in your sale conversion rates.

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The researchers are proposing a project called SenseIt to aid in the


process of helping generate data in order for the administrator to know if the
display or the area of the store is providing enough attention in turn increasing
the chance of a more profitable retail display/area.
The project is basically a visual counter. The basic concept behind this
project is to measure and display the number of persons entering in any area
in the store. Then the LCD displays the number of person inside that area. This
works in two way. That means the counter will be incremented if a person
enters the room and will be decremented if a person leaves the room.

II. OBJECTIVES

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

There are also specific objectives that the researchers would like to be able
to answer at the end of the project. The study would be able to:
1. Construct a device that would present the number of people entering and
leaving a certain establishment or a specific area of a retail store.
2. Identify and understand the theories and concepts behind the prototype
using what weve learned in Instrumentation and Control Systems.
3. Correlate Manufacturing Engineering as a profession to the project.
The study has the following specific objectives:
1. Familiarize with the different connections of our prototype and the
different components and its uses.
2. One day, market the prototype here in the Philippines in order to help
not only large companies but also small business owner.

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

III. SCOPE AND LIMITATION


Scope
The target client for this type of project is the managers or administrators
of different types establishments. The information that they would acquire or
receive will be beneficial to them due to the fact that they will be more
knowledgeable on when, this includes: time of the day, days of the week and
even seasonal periods, that they would attract more visitors or what retail
owners call traffic to their business. This data can be used to help these
establishments or business owners to take advantage or to increase their sale
conversions based on the number of people who are present in their
establishment.
The prototype is a make shift miniature SM Manila. The ultrasonic
sensors are strategically placed beside the entrance and exit doors. These
sensors position are estimations only, to detect the makeshift people who will

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

enter the miniature mall. The researchers used miniature people who are
roughly 1.5 in height to act as customers for the project.

Limitations
The study focuses on gathering data that can be of importance to retail
companies here in the Philippines. This prototype emphasizes on counting the
number of customers entering a retail and recreational establishment,
specifically SM City Manila.
The research is limited to the number of people entering the
establishment at a given period of time of the day. Specifically, the researchers
would like to identify the number of customers entering per hour of the day.
Increase in traffic could also lead to crowding, which has been found to
negatively impact the shopping experience. Studies of crowded stores have
found customers to feel disoriented (Dion 1999), less satisfied (Eroglu and
Machleit 1990), more stressed, and tenser (Langer and Saegert 1977). Negative
feelings caused by in-store crowding have been found to translate into lower
patronage for retail stores (e.g., Eroglu and Machleit 1990, Eroglu et al. 2005).
8

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Another study found that in overcrowded stores potential buyers may even
deviate from their planned shopping experience by spending less money than
planned or even leaving without making a purchase (Harrell et al. 1980).
Finally, crowding in retail environments could also affect the performance of
the sales associates who interact with the dissatisfied and/or aggressive
customers, having implications for the overall store performance. This research
neglects this negative implications of intense crowding in malls and similar
establishments.
Some of the assumptions made by the researchers are as follows:
The customers that needs assistance in entering the establishment that
are incapable of entering on their own (eg. Elderly who needs help in order to
walk and infants who needs to be carried) will be counted as one.
The customers will be entering the mall at a controlled pace and passing
through the entrance and in an orderly manner.
The positioning of the sensor in the entrance and exit are based on the
height of our prototype figurines, in order to count the maximum number of
people entering. In real life, there are children or even adults who are below the
9

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

average height and because of this the sensor might not be able to include
them in the count data gathered in our system.
The prototype only has one entrance and exit of the mall. This is to
assume that if the device is used in real life, the management would install it in
all of the entrance and exit of the establishment.
The project makes use of an LCD display in order to present the number
of visitor in the establishment.

IV. THEORY
Ultrasonic Sensor
A motion detector is a device that detects moving objects, particularly
people. A motion detector is often integrated as a component of a system that
automatically performs a task or alerts a user of motion in an area.

10

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Ultrasonic sensors are based on measuring the properties of sound


waves with frequency above the human audible range. They are based on three
physical principles: time of flight, the Doppler effect, and the attenuation of
sound waves. Ultrasonic sensors are non-intrusive in that they do not require
physical contact with their target, and can detect certain clear or shiny targets
otherwise obscured to some vision-based sensors. On the other hand, their
measurements are very sensitive to temperature and to the angle of the target.
Ultrasonic sensors are based on the measurement of the properties of
acoustic waves with frequencies above the human audible range, often at
roughly 40 kHz . They typically operate by generating a high-frequency pulse of
sound, and then receiving and evaluating the properties of the echo pulse.

Three different properties of the received echo pulse may be evaluated, for
different sensing purposes. They are:
Time of flight (for sensing distance)
Doppler shift (for sensing velocity)
1
1

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Amplitude attenuation (for sensing distance, directionality, or attenuation


coefficient)
1. Time of Flight
In reflection mode (also known as echo ranging), an ultrasonic
transmitter emits a short burst of sound in a particular direction. The pulse
bounces off a target and returns to the receiver after a time interval t. The
receiver records the length of this time interval, and calculates the distance
travelled r based on the speed of sound c:

Figure 4.1 Time of Flight


Very often, separate transmitting and receiving transducers are placed
immediately next to each other, housed as a single unit. (The PING))) Range
12

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Finder, Omega flowmeter and Migatron high-accuracy sensor below are all
designed this way.) In these cases, the distance calculated will be twice the
distance from the sensor to the target.
Using proper coordination, a single transducer can be used for both
emitting the pulse and receiving the echo. Note that it takes time for the
transducer to change modes, presenting a challenge to short-distance
measurement.
1B. Direct Measurement Mode
In this mode of operation the transmitter and receiver are two separate
units that move relative to each other. For example, the receiver can be fixed to
a target that moves relative to a stationary transmitter, or vice-versa.

1
3

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Figure 4.2 Direct Measurement Mode


Multiple transmitters can be used to increase the directionality of the
transmitted pulse. Lima et al. placed multiple ultrasonic transmitters on a
performer,

whose

performance

signals

space,

were

enabling

received
computer

by

multiple

program

to

receivers

in

the

triangulate

the

performer's position.

Gizduino Microcontroller
The Gizduino is a microcontroller board based on the ATmega328
(datasheet). It has 14 digital input/output pins (of which 6 can be used as
PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection,
a power jack, an ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a
USB cable or power it with a AC-to-DC adapter or battery to get started. The
Uno differs from all preceding boards in that it does not use the FTDI USB-toserial driver chip. Instead, it features the Atmega8U2 programmed as a USB-toserial converter.
14

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The Gizduino can be powered via the USB connection or with an external
power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter


(wall-wart) or battery. The adapter can be connected by plugging a 2.1mm
center-positive plug into the board's power jack. Leads from a battery can be
inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied
with less than 7V, however, the 5V pin may supply less than five volts and the
board may be unstable. If using more than 12V, the voltage regulator may
overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:

VIN. The input voltage to the Gizduino board when it's using an external
power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.
1
5

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

5V. The regulated power supply used to power the microcontroller and
other components on the board. This can come either from VIN via an
on-board regulator, or be supplied by USB or another regulated 5V
supply.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum


current draw is 50 mA.

GND. Ground pins.

Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5
volts. Each pin can provide or receive a maximum of 40 mA and has an
internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition,
some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX)
TTL serial data. TThese pins are connected to the corresponding
pins of the ATmega8U2 USB-to-TTL Serial chip .

16

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

External Interrupts: 2 and 3. These pins can be configured to


trigger an interrupt on a low value, a rising or falling edge, or a
change in value. See the attachInterrupt() function for details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogWrite() function.

SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support


SPI communication, which, although provided by the underlying
hardware, is not currently included in the Gizduino language.

LED: 13. There is a built-in LED connected to digital pin 13. When
the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin
and the analogReference() function.

Traffic to Sales Conversion


1
7

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The briefly review of the marketing literature that treats store traffic as a
traditional variable of interest. In contrast to our paper, most studies treat store
traffic as a dependent variable and study the impact of marketing activities
such as advertisements and price promotions on store traffic. Because of the
lack of traffic data, most of those studies use the number of transactions as a
proxy for store traffic (Walters and Rinne 1986, Walters and MacKenzie 1988).
One paper that uses actual store traffic data is Lam et al. (2001), which
assesses the effectiveness of marketing activities on store traffic, transactions,
and sales volume. Our project differs from Lam et al. (2001) in both motivation
and methodology. While Lam et al. (2001) use traffic as a dependent variable,
the researchers are interested in studying the possible impact of traffic on sales
performance.

Increase in traffic could also lead to crowding, which has been found to
negatively impact the shopping experience. Studies of crowded stores have
found customers to feel disoriented (Dion 1999), less satisfied (Eroglu and
Machleit 1990), more stressed, and tenser (Langer and Saegert 1977). Negative

18

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

feelings caused by in-store crowding have been found to translate into lower
patronage for retail stores (e.g., Eroglu and Machleit 1990, Eroglu et al. 2005).

V. SYSTEM REQUIREMENTS
In this project, the systems requires the following criteria to be met by
the components in order to achieve its system goals or purpose. The following
are the minimum values of the different components in order for the system to
work accordingly.
For the Microcontroller part of the project
The microcontroller must have at least 32 kb of memory in order to
upload the necessary program in to it. The standard Arduino uno or any other
Genuino boards that has 14 digital pins and 6 anolog pins in order to connect
all the fundamental components of this project.

For the Display


1
9

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The display board must be able to display both numbers and


letters in order to produce a more understandable output. Preferably, a 16x2
display board.
For the Sensor
Since the more important aspect of the Ultrasonic sensor that this
project focuses on is distance, the researchers made sure that the sensor range
of the sensor used is at least 2cm or 20 mm. This is an appropriate size for our
prototype which still gives us room for adjustments.
For the Power Supply
The system requires at least a 5V power supply in order for all the
components to be turned on and to function with ease.
For the Arduino application or software (for uploading/editing codes)
Arduino 1.6.11 is necessary in order to control the microcontroller. The
open-source Arduino Software (IDE) makes it easy to write code and upload it
to the board. It runs on Windows and Mac OS X. The environment is written in
Java and based on Processing and other open-source software.

20

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Since the researchers used a Gizduino instead of an authentic arduino


board, the researchers also need the Arduino IDE for Gizduino patches which
can be downloaded from the e-gizmo website (full website in our reference
section).
In this bidirectional circuit two Ultrasonic sensor components are used
for counting, respectively. Whenever an interruption is observed by the
Ultrasonic sensor then the Ultrasonic sensor increment the value of counter
and whenever the second sensor detects any obstacle, the counter is
decremented. The number of interruption count depend upon the sensors
input and displayed on a set of LCD displays. The Ultrasonic sensor input is
defined as inaudible sound waves that is then converted to the distance from
the sensor to an object. Every time the first sensor is blocked, the first sensor
gives a lesser or decreased distance value and the count the value gets
incremented. The value of second sensor gets decremented when connected to
second a sensor, gives a lesser distance compared to the set or the original
distance set from the sensor up to the wall. At every setup, the value of the
2
1

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

counter is sent from the sensor to the microcontroller and eventually to the
LCD display board.

The Ultrasonic sensor continuously senses the presence of any obstacles


(a person in our case ).

If sensor 1 senses a person, it informs the controller that a person has


entered so that controller can increment the count.

At the same time it gives a delay of 1sec so that the person can cross and
the count is maintained correctly.

When a person exits, the sensor 2 informs the controller to decrement


the count. Similarly it also provides a delay of 1 sec to maintain count
properly.

The count is displayed on LCD by the controller.

VI. DESIGN PROCESS

22

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

This study focuses on the following variables to control. First is the


distance from the sensor beside the entrance and or exit to the wall (60 mm).
Another is the time period in which the total number of customers enters the
establishment (per hour).
In order for the sensor to achieve its purpose, the distance from the
sensor to the wall would decrease thus indicating that there is an interference
caused by a person passing through the entrance or exit. This would then
increment the visitor count and will be displayed in the LCD display alongside
with the time of the day.
The actuator used in the project is the gizduino microcontroller. The code
used for the system is stated in the appendix part of this paper.
Specifications and descriptions of the ultrasonic sensor, gizduino board
and other materials and components are specified in the materials part and
specification requirements in the end of this paper.
In building the prototype, the researchers tested if the distance of the
doors would be sufficient to achieve the main goal of the system. The
researchers tried to make the distance appropriate for our miniature people
2
3

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

who would be used in the project. The researchers concluded that the 50 mm
distance is more appropriate to use and is the optimized for all the factors
involved in the prototype.

Design Process Flow Chart


START

LCD Display = 0

LCD Display = Initial Display

24

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

If distance < 6 cm

No

Yes
New Display=Initial Display + 1

Print LCD Display= New Display

END

VII. MATERIALS
1. Gizduino
An Arduino is an open-source microcontroller development board.
Arduino consists of both a physical programmable circuit board (often referred
2
5

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

to as a microcontroller) and a piece of software, or IDE (Integrated Development


Environment) that runs on computer, used to write and upload computer code
to the physical board. The board features an Atmel ATmega328 microcontroller
operating at 5 V with 2Kb of RAM, 32 Kb of flash memory for storing programs
and 1 Kb of EEPROM for storing parameters. The clock speed is 16 MHz, which
translates to about executing about
The Gizduino board is similar to the Arduino, the only difference is its
name. But all the specs and descriptions are the same and also its function in
our system.

2. 16x2 LCD Screen


LCD (Liquid Crystal Display) screen is an electronic display module and find
a wide range of applications. A 16x2 LCD display is very basic module and is
very commonly used in various devices and circuits. These modules are
preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven segments),
26

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

animations and so on. A 16x2 LCD means it can display 16 characters per line
and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel
matrix.
The command register stores the command instructions given to the LCD.
The data register stores the data to be displayed on the LCD. The data is the
ASCII value of the character to be displayed on the LCD.

3. Motor Driver Shield


The Motor Driver Shieldfor our system acts as the terminal for the Gizduino
board to be hooked up to the 7V battery power source. The researchers opted
to use this even though its kinda pricey because the researchers intend to use
the motor driver shield for our microcontroller project next semester.

4. 9V Battery
This 9 V Battery will serve as our source of power for the whole system.

2
7

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

5. Resistors
The purpose of the resistor in our circuit is it acts as a potentiometer in
order to lower the voltage across the LCD display in order to adjust the
contrast/brightness of the display.

6. Ultrasonic Sensors
This is the sensor used to measure distance from it to a surface. This
indicates if the fix distance programmed to in the gizduino board changes,
meaning there is someone passing through the entrance/exit then the arduino
board will increase in number. Ultrasonic sensors are sensors that are convert
ultrasound waves to electrical signals or vice versa.

7. Illustration Board (1/4)

28

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The electronic components are embedded in a make shift SM City Manila.


The miniature model will act as a base for the whole system. The base is made
up of Illustration boards.

8. Connecting Wires
Connecting wires allows an electrical current to travel from one point on a
circuit to another, because electricity needs a medium through which to move.
9. Digital Clock
This is use to display the time of the day when the people are leaving and
entering the establishment
1.

2.

3.

2
9

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

4.

5.

7.

8.

6.

9.

Table 7.1 Pictures of Materials Used

VIII. CONSTRUCTION PROCEDURE


For the construction of the Platform:
1. Prepare the materials needed.
2. Construct the box 2 x 3 x 3 using the illustration board. Then
construct the lid of the box also using the illustration board.
30

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

3. Now, cut out the walls of the miniature SM Manila using the
illustration board.
4. Using another illustration board, The researchers then constructed the
entrance of the SM Manila model. The researchers made sure to cut the
doors out (50 cm in length)
5. The researchers made sure to replicate the real SM Manila as much as
possible, so the researchers did the glass effect of the entrance of SM
Manila facing Manila City Hall using blue cellophane.
6. Next, the researchers made the Administrator Office of our miniature
SM Manila, using the scraps of illustration board. Constructing the
LCD Display holder in order for it to be erected on our prototype.
7. In order for our Ultrasonic sensor to be instituted to our prototype, the
researchers made a holder using illustration boards.
8. After the walls and the entrance is assembled, the researchers bore holes
in order for the connecting wires to pass through from the display to the
Gizduino board that is hidden inside the makeshift box/platform.
3
1

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

9. The researchers added some finishing touches like; detailed painting and
staging of the miniature SM Manila model.

For the assembly of the Microcontroller:


1. Prepare the materials needed. Test if ever there are some problems or
defects on the materials to be used and to check if the specs of the
materials you have are enough or meets the specs that the system
requires you to have.
2. Next the researchers positioned the Motor driver shield atop of the
Gizduino board. The researchers made sure that all the pins are placed
correctly and are secured.
3. The researchers first assembled the LCD display. The researchers used
the guide from hacktronics.com in order to properly connect the LCD
display to our microcontroller. For LCD Pins 3 and 15 the researchers
used 2000 Ohms resistor to adjust the contrast and backlight of the
display.

32

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Table 8.1 LCD Gizduino Pin Connections


4. After connecting the LCD Display with the Motor Driver Shield using the
connecting wires that has one male end and the other end stripped
exposing the copper strands, the researchers then soldered the wires in
place. Note: While soldering, one must be very careful.

3
3

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

5. Afterwards, the researchers then connected both the ultrasonic sensor to


the Motor Driver Shield using the male end & female end connecting
wires. The connections are as follows:
Trigger Pin

Echo Pin

VCC

Ground

Ultrasonic 1

+5V

GND

Ultrasonic 2

+5V

GND

Table 8.2 Ultrasonic Sensors Gizduino Pin Connections


Note: Trigger and Echo pins are all connected in the Digital Pins of the
Microcontroller
6. The researchers combined the connections for the ground of the LCD
and of the sensors in order to conserve space on our microcontroller.
7. After the hardware is assembled, the researchers then focused on the
code to program the microcontroller using the arduino.app. Then the
program is uploaded from the laptop to the Gizduino using a standard
USB cable.

34

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

8. Instead of using the RTC in order to display the time of day, the
researchers used an old clock to display the time of the day in which the
customers can visit and leave the establishment.

IX. CONCLUSION
The foot traffic data generated from the prototype people counting system
can be used to calculate conversion rates for number of shoppers, seasonal
traffic patterns, impact of events and differences between regions or groups, in
order to better understand how your store is performing and how to positively
impact sales. The foot traffic counts obtained from our people counting system
can answer the following questions from our objectives.
The researchers successfully constructed a bidirectional counting device
using the ultrasonic sensors, gizduino board, LCD display and the rest of the
materials stated above. They also identified the principle behind the sensor
that is used in order to count the number of people entering and leaving an
establishment. The sensors convert the time it took for the inaduible sound
waves it produces to bounce back from a certain object, in this case a wall,

3
5

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

back to the sensor and converting that into distance, specifically in


centimeters.
There are a number of field that us, future manufacturing engineers,
may take once we venture on to the real world. One of these fields is Operations
and Management. In order to optimize a certain process or a certain type of
business, it is important that informations or data are gathered. By
incorporating this project to a retail store or esablishment, the management
would have an idea of how many, when, where, and why there are a lot or few
people

visiting

their

store.

Once

the

management

has

an

improved

understanding of how the retail store traffic moves through your business, they
will be in a better position to make well-informed business choices.

X. RECOMMENDATION
The researchers encountered a couple of problems in doing the prototype.
There are a number of things that would be beneficial if they are improved and

36

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

if ever there would be someone who will dedicate their time and effort to
further improve this study, the following recommendations are advised:
The original plan of the researchers was to construct a device that would
not only count the number of people entering the establishment but also record
how long those people stayed in a certain area of the store. This would not only
record the traffic in a store but can also be used to track if a certain area of the
store or display attracts more customer compared to the other parts of the
store.
Another recommendation would be to construct a similar device but
instead of using an LCD Display in order to present the data, it would be
presented in a PC so that not only does it present the data, it also
automatically be stored for future reference and use.
To further improve on our project, future researchers could simulate the
sensors in real life. They could test it at a given period of time thus obtaining
enough data for trial purposes and would be able to point out if there is a
significant relationship between people traffic versus sales conversion.

3
7

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

The use of an RTC or real time clock can also be an improvement for the
project since it would be able to display the current time even if the device is
turned off. This is to separate the data gathered in an hour, a day, or even in a
longer period of time to assess or identify the time they entered the
establishment.
Additionally, the panel suggested that future researchers would assemble
the wiring a little more neatly and orderly for a more hassle-free project.
Lastly, in order to achieve full automation of this system, future
researchers could use the microcontroller to save or store the gathered data
from the number of people who stayed inside the establishment at that certain
period of time (hourly interval). The data can be transmitted wirelessly through
the use of Bluetooth connection.

XI. APPENDICES
A. Code
#include <NewPing.h>
38

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

#include <LiquidCrystal.h>
float distance,distance2;
int customer=0;
int trigger=1;
int echo=7;
int trigger2=9;
int echo2=8;
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
int backLight = 13;
NewPing sonar(trigger,echo);
NewPing sonar2(trigger2,echo2);
void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
pinMode(backLight, OUTPUT);
digitalWrite(backLight, HIGH);
lcd.begin(16,2);
lcd.clear();
}

void uread() {
unsigned int uS=sonar.ping();
3
9

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

distance =sonar.convert_cm(uS);
Serial.print("\n");
Serial.println(distance);
delay(500);
}
void uread2() {
unsigned int uS=sonar2.ping();
distance2 =sonar.convert_cm(uS);
Serial.print("\n");
Serial.println(distance);
delay(500);
}
void count()
{
if(distance<6)
{
customer++;
Serial.print("Customer Count:");
Serial.println(customer);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Customer:");
40

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

lcd.setCursor(10,0);
lcd.print(customer);
}
}
void count2()
{
if(distance2<6)
{
customer--;
Serial.print("Customer Count:");
Serial.println(customer);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Customer:");
lcd.setCursor(10,0);
lcd.print(customer);
}
}
void plus()
{
uread();
count();
4
1

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

}
void minus()
{
uread2();
count2();

}
void loop()
{
plus();
minus();
}

B. Specifications of Materials
a. GIZDUINO ATMEGA328

Microcontroller: ATmega168 or ATmega328

User Interface: USB Port, DC Jack, Reset Button, ICSP Port,


Shield Connection Port

42

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Debbuger Port: ICSP

Power Input:

External: 8V-12V

USB: 5V

DC Power Output: 3.3V

PCB Size: 2.7 x 2.1 inch

On-board Crystal: 16MHz and 12MHz

Memory: 32 KB

b. 16x2 LIQUID CRYSTAL DISPLAY

Model No: SC162A3

Voltage Range: 5V

Dimensions: 8 cm x 3.5 cm x 1 cm

Weight: 0.036 kg

4
3

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Display Formate: 16 Character x 2 Line

Viewing Direction: 6 OClock

Input Data: 4-Bits or 8-Bits interface available

Display Font : 5 x 8 Dots

Power Supply : Single Power Supply (5V10%)

c. MOTOR DRIVER SHIELD 1.1

Used to attach the Power Supply to the Microcontroller

Up to 16VDC 1.4A per motor output drive

Compatible in all Gizduino/Arduino kits

d. US-100 ULTRASONIC SONAR MODULE

44

Technology: 40kHz Ultrasonic Sonar

Sensor Range: 2cm 350cm (Temperature Compensated)

Power Input: 3V-5V DC @ 3.5mA Type

Trigger Input: TTL

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Echo Output: TTL

PCB Size: 20x45mm

e. Power Supply

7V Battery

f. USB CABLE 1.5M


Color: Black
Compatibility: USB 2.0 / M - USB 3.3 1.5 m DLC
Cable Length: 1.5 m

C. Pictures
In the making

4
5

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Final Prototype

46

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

4
7

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Oral Defense

48

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

D. References
Dion, D. 1999. A theoretical and empirical study of retail crowding. European
Advances in Consumer Research. 51-57.
Eroglu, S.A., K.A. Machleit. 1990. An empirical study of retail crowding:
Antecedents and consequences. J. Retailing. 201-221

4
9

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Eroglu, S.A., K.A. Machleit, T. F. Barr. 2005. Perceived retail crowding and
shopping satisfaction: The role of shopping values. J. Business Research .11461153.
Fisher, M.L., 1997. What is the right supply chain for your product? Harvard
Bus. Rev. 105- 116.
Lam, S.Y., M. Vandenbosch, M. Pearce. 1998. Retail sales force scheduling
based on store traffic forecasting. J. Retailing. 61-88.
Lam, S.Y., M. Vandenbosch, J. Hulland, M. Pearce. 2001. Evaluating
promotions in shopping environments: Decomposing sales response into
attraction, conversion, and spending effects. Marketing Sci. 194215.
Langer, E.J., S. Saegert. 1977. Crowding and cognitive control. J. Personality
and Social Psychology. 175-182.
Harrell, G.D., M.D. Hutt, J.C. Anderson. 1980. Path analysis of buyer behavior
under conditions of crowding. J. Marketing Res. 45-51.
Walters, R. G., S. B. MacKenzie.1988. A structural equations analysis of the
impact of price promotions on store performance. J. Marketing Res. 51-63
50

Pamantasan ng Lungsod ng Maynila


University of the City of Manila
College Of Engineering and Technology
ME/ MfgE Department

Massa, D. 1999. Choosing an ultrasonic sensor for proximity or distance


measurement. Sensorsmag. 1 February.
Palls-Areny, R., and J. Webster. 2001. Sensors and Signal Conditioning, 2nd
ed. Toronto, Ontario: John Wiley & Sons.
https://www.openhacks.com/uploadsproductos/eone-1602a1.pdf
https://www.e-gizmo.com/oc/
http://www.playembedded.org/blog/en/2016/02/29/an-object-counter-usingan-ir-sensor-and-arduino/
https://bindopos.com/blog/6-retail-metrics-to-track-monitor-for-your-store/
https://en.wikipedia.org/wiki/Ultrasonic_transducer

5
1

Vous aimerez peut-être aussi