intelligence bus information systemict.siit.tu.ac.th/senior-itcs/final/report-bu2.pdffinal report...
TRANSCRIPT
Final Report
Intelligence Bus Information System
Group Members Mr. Nuttakit Tungtong 5422781708 Mr. Varote Siriluesai 5422792762
Advisor Dr. Bunyarit Uyyanonvara (Associate Professor)
School of Information, Computer and Communication Technology,
Sirindhorn International Institute of Technology, Thammasat University
Semester 2, Academic Year 2014 4th May 2015
Table of Contents
1 INTRODUCTION 1
2 BACKGROUND 2
3 OBJECTIVES 3
4 OUTPUTS AND EXPECTED BENEFITS 4
4.1 OUTPUTS 4 4.2 BENEFITS 4
5 LITERATURE REVIEW 5
6 METHODOLOGY 7
6.1 APPROACH 7 6.2 TOOLS AND TECHNIQUES 8
7 PROJECT SCHEDULE 9
8 TECHNICAL DESCRIPTION 10
9 REFERENCES 28
Statement of Contribution
By submitting this document, all students in the group agree that their contribution in the project so far, including the preparation of this document, is as follows:
Mr. Nuttakit Tungtong 5422781708 50%
Mr. Varote Siriluesai 5422792762 50%
Senior Project 2014 I B I S
School of ICT, SIIT 1
1 Introduction The topic of this project is based on the embedded board system. There are different kinds of
embedded board but the two well-known boards are Raspberry Pi and Arduino. Both of the two
boards share similar features. The type of board to be used depends on the type of project. For this
project we will develop a counting system based on Arduino. [1]
There are a total of 9 sections in this proposal. Section 2 provides the project background,
primarily explaining about the problems and the reasons to why we want to solve it. Section 3
describes the objectives we want to achieve. Section 4 outlines the output, things that are going to be
developed from the project and its benefit. Section 5 reviews similar system. Section 6 describes the
approach for our systems and the methods, tools and techniques used to implement it. Section 7
outlines the tentative project schedule. Section 8 highlights the technical aspects of the project. The
last section contains the list of references used in this report and project.
Figure 1:The bus
Figure 2:CCTV sign for showing security area
Figure 3:Counter passenger device
Senior Project 2014 I B I S
School of ICT, SIIT 2
2 Background Bus is the number one transportation for long distance trips in Thailand. The network is
very dense, the bus rotations are numerous. There are public buses the less expensive and many private companies offering VIP bus offering a little more comfort and better service. Most buses are very good condition and air conditioned [2].
Bangkok has an extensive bus network providing local transit services within the Greater
Bangkok area. The Bangkok Mass Transit Authority (BMTA) operates a monopoly on bus services,
with substantial concessions granted to private operators. 3,506 BMTA buses, together with private
joint buses, minibuses, song thaeo buses and vans totalling 16,321 in number, operate on 470 routes
throughout the region. Although a large number of commuters still ride the buses daily, passenger
numbers have been almost consistently on decline in the last two decades. The BMTA reported an
average of 1,048,442 trips per day in 2010, a quarter of the 4,073,883 reported in 1992 [3].
Eventually, they will face an organization problem. For example; Deficit, Less profit, Driving
habit, Corruption, and Better choice. That is why we try to develop new device available for
installation on transit vehicles including buses and rail vehicles which accurately records boarding
and alighting data. This technology can improve the accuracy and reliability of tracking transit
ridership over traditional methods of manual accounting by drivers or estimation through random
surveying. These devices are becoming more common among American transit operators seeking to
improve the accuracy of reporting patronage as well as analysing transit use patterns by linking
boarding and alighting data with stop or station location.
Due to the above, to solve the problem, we therefore will introduce a step sensing technology
into the embedded board “Arduino”. To combine them together, a device could be show the
available seat in the bus to the passenger to decide which bus that passenger will get in.
To implement a step sensing technology, we choose button. It can be used to count objects,
motions or represent that get on or get off the bus by step on the stair. For the programming, we
choose machine for developing the device.
System Component
server
Database
Portable Router + Ethernet Shield W5100
98
Figure 4: The component of application
Senior Project 2014 I B I S
School of ICT, SIIT 3
3 Objectives There are two main objectives for this project. The first objective is to show available seat in the bus and record number of passenger with a high accuracy. The second objective is to try increasing the service of the bus by improving upon existing techniques.
In order to achieve these aims, the following requirement must be met:
1. Study and report on the design and deployment issues of existing intelligent bus Information
2. Design and develop the intelligent bus information system with the following capabilities: Accurate counting passenger Store number of passenger that get on and get off the bus in Real-Time Sensor can detect passenger that get on and get off the bus
Senior Project 2014 I B I S
School of ICT, SIIT 4
4 Outputs and Expected Benefits
4.1 Outputs
Counting device: The main objective of this project is to develop a counting device that accurately counts the number of people using the bus. The counting information will be able use in real time to check the availability of the bus.
4.2 Benefits
The complete project will benefit two groups of people. The first group is the bus users. With the information provided, the bus user can know in real time the availability of the seats in the bus they plan to use. The second group is the bus company. With the counting device, information about the number of users could be plot into graph to show the number of people using the bus. The bus company could check if the profits they gain match the number of people using. Furthermore, the bus company could also increase or decrease the bus to match the number of user base on the information.
Senior Project 2014 I B I S
School of ICT, SIIT 5
5 Literature Review There are many projects that other people have done that use raspberry pi to create a
counting device. People counters are typically expensive device used in the retail industry, but using raspberry pi to build a functional people counter is much cheaper. Some of project listed in this section will provide some basic idea of how to implement a raspberry pi as a counting device [5].
Figure 6: bi-directional counter
Figure6 show a bi-directional person or object counter which can be used to monitor the number of objects entering or exiting through it. This project has two variants: laser diode and LDR (Light Dependent Resistor) combination, and IR (infrared) led and photodiode combination. The laser diode-LDR version can be used where the distance between the source (laser diode) and the sensor (LDR) is large whereas the IR-photodiode can only be used for short distances and is comparatively less accurate.
Senior Project 2014 I B I S
School of ICT, SIIT 6
Figure 7: PIR counter
Figure7 show a counter that uses a motion sensor to detect if a person or an object passes in front of the raspberry pi. This project use raspberry pi connected to PIR sensor to detect the motion. One problem with using PIR is that it can only detect motion. The system cannot identify if a person is moving in or moving out [6].
Senior Project 2014 I B I S
School of ICT, SIIT 7
6 Methodology
6.1 Approach
There are 9 main steps in the implementation of this project as follow
1. Study about the development tools
In this step, because of we don’t have knowledge in developing embedded system
“Arduino” and infrared sensing technology, so we prefer to study first before setting a scope. Many
different development tools will be studied in order to see strong and weakness of each of them.
Some may be good in terms of easiness of using, however they may not cover a particular
functionality. At the end, our group decides to focus on the sensor for counting as we think that it is
the most appropriate function equipped with all required functionalities. However, other feature may
be also used.
2. Functional design and conceptualization
In this step, we have to discuss about the concept of the device like what it is about and the
type of device. It will be design base on the possibility of creation with the present technology. At
the end, we come up with our own idea of concept of solving problem in daily life and the problem
of bus. 3. Collecting information related to development
After we finished the design and the concept, we have to study in deep detail the
development and the tools for the implementation. The information that we will search for will be
based on the embedded design.
4. Developing a demo product
After we understand the implementation, we have to try to build the prototype to test whether
the information we have collected are correct.
5. Create the product
This step is very important. In this step, we have to create hardware with system that will be
in the system together with programming. The programming will be created by coding in Python
Language.
6. Build the cover of product
After we finished, we have to build the cover of hardware, so the product can be protect and
strong harden to broken.
7. Testing device
The final step, we have to test the device whether it conform to the requirement. If it
conforms to the requirement, Next step we will test it to find bugs from coding step.
Senior Project 2014 I B I S
School of ICT, SIIT 8
6.2 Tools and Techniques
Tools that is used in this project:
Arduino - The Arduino is a low cost, credit-card sized.
Figure 8: Raspberry Pi VS. Hand
button
Figure 9: button
Programming language that is used in this project:
Machine code
All stages of our classification system (as mentioned in the previous part), we will be using the Machine programming language to record and process the number data.
Senior Project 2014 I B I S
School of ICT, SIIT 9
7 Project Schedule
Task Description Person Duration Status
1 Discuss the project topic with advisor NT & VS 2w 100% Completed
2 Finalise the topic NT & VS 1w 100% Completed
3 Research about the embedded board and decide on which board to be use
NT & VS 2w 100% Completed
4 Study about the similar system NT & VS 2w 100% Completed
5 Get a hold on raspberry pi and start getting familiar with it
NT & VS 3w 100% Completed
6 Write the proposal report and prepare for presentation
NT & VS 1w 100% Completed
7 Start developing the counting system NT & VS 2w 60% Completed
8 Create model of the system NT & VS 3w 40%
9 Test the system NT & VS 2w 20% Completed
10 Display the information in graph form NT & VS 2w 0% Completed
11 Write the final report and prepare for presentation
NT & VS 1w 0% Completed
Note: NT and VT are Nuttakit Tungtong and Varote Siriluesai respectively
Senior Project 2014 I B I S
School of ICT, SIIT 10
8 Technical Description
Project Progress
The current progress of the project will be described as follow:
1. Learning
We learned basic Arduino project and follow. Then we compare suitable between PIR sensor
and pushbutton, so that we can make decision to use push button because the PIR has very
sensitive and hard to count on the bus.
Figure 10 show the basic setup of Arduino project. When we run a code on the Arduino, the
7-segment display will run the number from 1 to 9.
Figure 10: LED count up project
Senior Project 2014 I B I S
School of ICT, SIIT 11
Figure 11 and 12 show the testing for PIR sensor. When the sensor sense that something is in its
range the light will turn on (Figure 12). For this testing we found that PIR is too sensitive. So for our
project we decide not to use this type of sensor.
Figure 11: PIR sensor testing(LED off) Figure 12:PIR sensor testing(LED on)
Figure 13 and 14 show the testing for push button sensor. It is set up so that when the button is push
the light orange light will turn on (Figure 14) and when the button is push again the light will turn off
(Figure 13). We will this type of sensor.
Figure 13: Push button testing(LED off) Figure 14: Push button testing(LED on)
Senior Project 2014 I B I S
School of ICT, SIIT 12
2. System Design
For the system design, there will be two buttons in the system. If button1 is push first the button2,
then the system count as the people get in. If button2 is push first then button1, then it count as get
off.
Figure 15:The state diagram
start
Senior Project 2014 I B I S
School of ICT, SIIT 13
3. Circuit Design
Figure 16: Breadboard layout
To complete this layout, you will need the following parts.
Figure 17: Material
1) LED
2) Resistor 220 Ω Resistor
3) Breadboard
4) Jumper wire
5) Tactile push switch
6) Arduino uno
Senior Project 2014 I B I S
School of ICT, SIIT 14
Figure 18: wiring up
Then programming to this project
4. Programming in Arduino 1.6.0 code of this project
Senior Project 2014 I B I S
School of ICT, SIIT 15
Senior Project 2014 I B I S
School of ICT, SIIT 16
Figure19: Uploaded sketch
Then Uploaded to arduino and complete
Senior Project 2014 I B I S
School of ICT, SIIT 17
5. Testing and Result
When the black button is pressed before the yellow button the system count as “Get in”
(Figure21) and the LED light will turn on(Figure20). The number of button press count will
increase by 1(Figure21).
Figure 20: LED light turn on
Figure 21: “Get in” display
Senior Project 2014 I B I S
School of ICT, SIIT 18
When the yellow button is pressed before the black button the system will count as “Get out”
(Figure23) and the LED light will turn off (Figure22). The number of button press count will
decrease by 1(Figure23).
Figure 22: LED light turn off
Figure 23: “Get out” display
Senior Project 2014 I B I S
School of ICT, SIIT 19
Model The model of the project will be described as follow:
1. Parts Arduino uno
Ethernet shied
Figure 24: Arduino Uno+Ethernet shield
Button
Figure 25: pushbutton
Stair
Figure 26: 3step plastic ladder
Senior Project 2014 I B I S
School of ICT, SIIT 20
Wooden board
Figure 27: white-wooden board
2. Stair Set Up
We decided to use the 3step plastic ladder because it resembles stair steps of the
bus.
Figure 28: bus stair
Figure 29: 3step plastic ladder
Senior Project 2014 I B I S
School of ICT, SIIT 21
2.1 Set up the breadboard We cut the wooden board to fit the size of the stair steps. We used two wooden
board one for each step.
Figure 30: lay out
2.2 Connect to the stair We attach the button to stair using glue. Then we place the wooden board on top
of it to protect the button and to detect when the user step on the stair. We also
connect the button to the Arduino and properly arranged the wired.
Figure 31: button and wooden
Senior Project 2014 I B I S
School of ICT, SIIT 22
3. Programming
3.1Website
We create page for store Passenger Number on BUS and store data that
passenger get in/get off the bus.
add_data.php
We create page to display Current Passenger Number on BUS and Charts.
Everyone can see the number on any platform.
http://www.mrjele.com/IBIS/view_data.php
Figure 32: web page
Senior Project 2014 I B I S
School of ICT, SIIT 23
3.2Arduino part
upload passcount.ino into the Arduino editor and compile, then hit upload.
You're done with the software!
Here is the code :
Senior Project 2014 I B I S
School of ICT, SIIT 24
Senior Project 2014 I B I S
School of ICT, SIIT 25
Senior Project 2014 I B I S
School of ICT, SIIT 26
4. Make you first step passengers
Senior Project 2014 I B I S
School of ICT, SIIT 27
9 References
[1] http://readwrite.com/2014/05/07/arduino-vs-raspberry-pi-projects-diy-platform
[2] http://en.wikipedia.org/wiki/Transport_in_Thailand
[3] http://en.wikipedia.org/wiki/Transport_in_Bangkok
[4] http://www.education.rec.ri.cmu.edu/content/electronics/boe/ir_sensor/1.html
[5] http://www.instructables.com/id/IR-laser-person-counter/
[6] http://www.instructables.com/id/How-to-build-a-People-Counter-with-Raspberry-Pi-an/
[Figure1]http://upload.wikimedia.org/wikipedia/commons/6/6e/MTC_white_line_bus.
jpg
[Figure2]http://www.epsomcoaches.com/wp-content/uploads/bus_cctv.jpg
[Figure3]http://thumbs.dreamstime.com/z/counting-people-hand-held-tally-counter-
headcount-queue-35151370.jpg
[Figure5]http://www.education.rec.ri.cmu.edu/content/electronics/boe/ir_sensor/image
s/409px- IR_Sensor_Principles.png
[Figure6]http://cdn.instructables.com/FX9/VQS4/HXSD7NJ7/FX9VQS4HXSD7NJ7.
LARGE.jpg
[Figure7]http://cdn.instructables.com/F6D/NX78/I0ENLJIQ/F6DNX78I0ENLJIQ.LA
RGE.jpg
[Figure8]http://kickstarter.ttmschool.org/wpcontent/uploads/edd/2013/11/raspberry_pi
_on_hand.jpg
[Figure9]https://www.futurlec.com/Pictures/PIR_Module.jpg
[Figure16] https://learn.adafruit.com/assets/2209
[Figure25]https://www.vilros.com/media/catalog/product/cache/1/image/1200x1200/9
df78eab33525d08d6e5fb8d27136e95/b/u/button.jpg
[Figure28] http://www.skoolie.net/albums/LoneBus_Stairs/IMG_1753.sized.jpg (n.d.). Retrieved from Snowball: http://snowball.tartarus.org/
Aggarwal, C., & Zhai, C. A SURVEY OF TEXT CLASSIFICATION ALGORITHMS.
Alexa. (n.d.). Retrieved 09 27, 2013, from http://www.alexa.com/topsites
Beaujon, A. (2012, Septermber). Pew: Half of Americans get news digitally, topping newspapers,
radio. Retrieved from Poynter: http://www.poynter.org/latest-news/mediawire/189819/pew-tv-
viewing-habit-grays-as-digital-news-consumption-tops-print-radio/
Becker, H., Naaman, M., & Gravano, L. (2011). Beyond Trending Topics: Real-World Event
Identification on Twitter . Proceedings of AAAI .
Senior Project 2014 I B I S
School of ICT, SIIT 28
Dilrukshi, I., Zoysa, K. D., & Caldera, A. (2013). Twitter News Classification Using SVM. The 8th
International Conference on Computer Science & Education .
http://mines.humanoriented.com/classes/2010/fall/csci568/portfolio_exports/lguo/decisionTree.html.
(n.d.).
Joachims, T. (1997). A Probabilistic Analysis of the Rocchio Algorithm with TFIDF for Text
Categorization. ICML Conference .
Lee, K., Palsetia, D., Narayanan, R., Patwary, M. M., Agrawal, A., & Choudhary, A. (2011). Twitter
Trending Topic Classification. 2011 11th IEEE International Conference on Data Mining
Workshops .
McCallum, A., & Nigam, K. (1998). A Comparison of Event Models for Naive Bayes Text
Classification . IN AAAI-98 WORKSHOP ON LEARNING FOR TEXT CATEGORIZATION , 41-48.
Nearest neighbour classifiers. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/Nearest_neighbour_classifiers
Optimization of support vector machine (SVM) for object classification. (n.d.). Retrieved from
http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/42775/1/12-1989_A1b.pdf
REST API v1.1 Resources. (n.d.). Retrieved from https://dev.twitter.com/docs/api/1.1
Sankaranarayanan, J., Samet, H., Teitler, B., Lieberman, M., & Sperling, J. (2009). TwitterStand:
News in Tweets . Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances
in Geographic Information Systems , 42-51.
Sriram, B., Fuhry, D., Demir, E., & Ferhatosmanoglu, H. (2010). Short Text Classification in Twitter
to Improve Information Filtering. Proceeding of the 33rd international ACM SIGIR conference on
Research and development in information retrieval , 841–842.
Twitter4J Code examples. (n.d.). Retrieved from http://twitter4j.org/en/code-examples.html
Yerva , S. R., Miklós , Z., & Aberer , K. (2011). What have fruits to do with technology? The case of
Orange, Blackberry and Apple. . Proceedings of the International Conference on Web Intelligence,
Mining and Semantics .