Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Assignment 2 - Internet of Things - Distinction, Assignments of Computer Science

Assignment 2 - Internet of Things - Distinction

Typology: Assignments

2022/2023
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 01/05/2023

minh-huy-huynh
minh-huy-huynh 🇻🇳

4.8

(53)

39 documents

Partial preview of the text

Download Assignment 2 - Internet of Things - Distinction and more Assignments Computer Science in PDF only on Docsity! HUYNH MINH HUY 0 Huynh Minh Huy UNIVERSITY OF GREENWICH | GCD1001 Assignment 2 INTERNET OF THINGS HUYNH MINH HUY 1 ASSIGNMENT 2 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 43: Internet of Things Submission date 27/12/2022 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Huynh Minh Huy Student ID GCD210173 Class GCD1001 Assessor name Phan Thanh Tra Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Huy Grading grid P5 P6 P7 M5 M6 D3 D4 HUYNH MINH HUY 4 Table of Contents INTRODUCTION ................................................................................................................................................... 11 CHAPTER 1: THE AN IOT APPLICATION USING ANY COMBINATION OF HARDWARE, SOFTWARE, DATA, PLATFORMS, AND SERVICES ..................................................................................... 12 I. THE APPROPRIATE SET OF TOOLS TO DEVELOP THE PLAN INTO AN IOT APPLICATION. (P5) 12 1. The problem. ......................................................................................................................................................... 12 2. The solution. ......................................................................................................................................................... 14 3. Schematic. .............................................................................................................................................................. 16 a. Gate. ..................................................................................................................................................................... 17 b. Car Parking. ....................................................................................................................................................... 18 4. IoT Hardware. ...................................................................................................................................................... 19 a. Arduino Uno. .................................................................................................................................................... 21 b. NodeMCU ESP8266 Wifi Module. ............................................................................................................. 24 c. Infrared Sensor. ............................................................................................................................................... 26 d. Servo SG90. ....................................................................................................................................................... 27 e. RFID RC522. ...................................................................................................................................................... 28 5. IoT Platform. ......................................................................................................................................................... 29 6. IoT IDE. ................................................................................................................................................................... 33 7. Database. ................................................................................................................................................................ 34 8. Framework. ........................................................................................................................................................... 35 9. Planning. ................................................................................................................................................................. 36 a. Initiating phase. ............................................................................................................................................... 36 b. Planning phase................................................................................................................................................. 39 c. Timeline. ............................................................................................................................................................ 44 HUYNH MINH HUY 5 10. Developing the IoT solution. ...................................................................................................................... 45 a. Setting up Blynk. ............................................................................................................................................. 45 b. Setting up Firebase. ....................................................................................................................................... 52 11. The actual connection diagrams. .............................................................................................................. 54 12. Code (Sketch), upload Sketch, and evidence. ....................................................................................... 58 13. Link Project. ...................................................................................................................................................... 72 II. END-USER EXPERIMENTS AND EXAMINES FEEDBACK. (P6) .............................................................. 73 1. Practical Application. ......................................................................................................................................... 73 2. Evidence for apply Da Nang Parking System in practice. .................................................................... 75 3. Examining the system feedbacks of Da Nang Parking System. ......................................................... 79 III. RECONCILE AND EVALUATE END-USER FEEDBACK AND DETERMINE THE ADVANTAGES AND DISADVANTAGES OF CHOSEN IOT TECHNIQUES. (M5) ........................................................................ 79 1. The Modification. ................................................................................................................................................ 79 2. Evaluate the entire solution, advantages, and disadvantages ........................................................... 80 3. Solutions to improve the solution or to replace in the future. .......................................................... 81 IV. CRITICAL EVALUATE SECURITY RISKS THAT YOUR APPLICATION MIGHT ENCOUNTER. (D3) 82 1. Security Vulnerability. ...................................................................................................................................... 82 2. Solution for security risks................................................................................................................................ 85 a. Automate using the cloud. ........................................................................................................................... 85 b. Use real-time occupancy data. ................................................................................................................... 85 c. Hire Security Personnel. .............................................................................................................................. 86 d. Keep Systems and Software Updated. .................................................................................................... 86 e. Pay Close Attention to Physical Security. .............................................................................................. 87 HUYNH MINH HUY 6 CHAPTER 2: EVALUATE IOT APPLICATION AND DETAIL THE PROBLEM IOT APPLICATION SOLVES, THE POTENTIAL IMPACT ON PEOPLE, BUSINESS, SOCIETY, AND THE END-USER AND THE PROBLEMS IT MIGHT ENCOUNTER WHEN INTEGRATING INTO THE WIDER IOT ECOSYSTEM. .......................................................................................................................................................... 88 I. EVALUATING END-USER FEEDBACK FROM YOUR IOT APPLICATION. (P7) .................................. 88 1. Feedback from users. ........................................................................................................................................ 88 2. IoT application evaluation board.................................................................................................................. 94 II. UNDERTAKE A CRITICAL REVIEW AND COMPARE YOUR FINAL APPLICATION WITH THE ORIGINAL PLAN. (M6) ................................................................................................................................................... 95 1. Evaluate the key points of the end-application. ...................................................................................... 95 a. Feasibility for practice. ................................................................................................................................. 95 b. Ability to commercialize. ............................................................................................................................. 96 c. Possibility of improvement......................................................................................................................... 97 d. Problem-solving. ............................................................................................................................................. 99 2. Compare problem in the first Da Nang Parking System and current Da Nang Parking System. .......................................................................................................................................................................... 100 3. Plan for the next product cycle. .................................................................................................................. 101 III. CRITIQUE THE OVERALL SUCCESS OF YOUR APPLICATION. DID IT SOLVE YOUR PROBLEM? WHAT IS THE POTENTIAL IMPACT ON PEOPLE, BUSINESS, SOCIETY AND THE END USER? WHAT PROBLEMS MIGHT IT ENCOUNTER WHEN INTEGRATING INTO THE WIDER IOT ECOSYSTEM? (D4) ........................................................................................................................................................ 102 1. How Da Nang Parking System solve the problem? ............................................................................. 102 2. The potential impact on people, business, society and the end-user. ......................................... 104 3. The problems might it encounter when integrating into the wider IoT ecosystem? ............ 110 CONCLUSION ....................................................................................................................................................... 113 References ........................................................................................................................................................... 114 HUYNH MINH HUY 9 Figure 58: Visualize how Da Nang Parking System IR Sensor works with parking car. ......................... 74 Figure 59: Demo setup IoT Devices in street.. ........................................................................................................... 74 Figure 60: Test case for using Da Nang Car Parking in different weather. .................................................... 75 Figure 61: The car wants to park. .................................................................................................................................. 75 Figure 62: Using RFID to unlock the security gate. ................................................................................................. 76 Figure 63: Car parking at slot parking lot 3. .............................................................................................................. 76 Figure 64: The sensor representing slot 3 is lit up. ................................................................................................. 77 Figure 65: The result when using the application on mobile phone. ............................................................... 77 Figure 66: The result when using the application on website. ........................................................................... 78 Figure 67: The result when using the application on firebase database. ....................................................... 78 Figure 68: Board SIM800C IntoRobot-Fox. ................................................................................................................ 81 Figure 69: IOE-SR05. .......................................................................................................................................................... 81 Figure 70: The incorrect password scenario. ............................................................................................................ 83 Figure 71: Incorrect identification scenario. ............................................................................................................. 83 Figure 72: Authentication scenario. .............................................................................................................................. 84 Figure 73: User Satisfied Result. ..................................................................................................................................... 91 Figure 74: Result of User's thinking this project will solve the problem........................................................ 91 Figure 75: Result of which part did user find most relevant. .............................................................................. 92 Figure 76: Result of can the system be widely applied in the future. .............................................................. 92 Figure 77: Result of any overall feedback for the system. .................................................................................... 93 Figure 78: Parking Monitoring. ....................................................................................................................................... 97 Figure 79: Parking Reservation. ..................................................................................................................................... 97 Figure 80: On-Street Parking. .......................................................................................................................................... 97 Figure 81: Off-Street Parking. .......................................................................................................................................... 98 Figure 82: GPS Parking Directions. ................................................................................................................................ 98 Figure 83: Payment Methods. .......................................................................................................................................... 99 Figure 84: Setup IR Sensor. ........................................................................................................................................... 103 Figure 85: Detect car with Da Nang Parking System. .......................................................................................... 103 HUYNH MINH HUY 10 Table of Tables Table 1: IoT Hardware. ..................................................................................................................................................... 21 Table 2: Pin Description. (Components101, 2021) ................................................................................................. 23 Table 3: Arduino Uno Technical Specifications. (Components101, 2021) .................................................... 24 Table 4: NodeMCU Parameters. (Elecrow, n.d.) ....................................................................................................... 25 Table 5: Wire Configuration. ............................................................................................................................................ 27 Table 6: RC522 Pin Configuration. (Components101, 2019) .............................................................................. 28 Table 7: Project Charter. .................................................................................................................................................... 38 Table 8: Project Cost............................................................................................................................................................ 40 Table 9: Equipment cost for prototype. ....................................................................................................................... 43 Table 10: Project risk. ......................................................................................................................................................... 44 Table 11: Project Timeline. ............................................................................................................................................... 44 Table 12: Test Case for Arduino uno (Gate). .............................................................................................................. 61 Table 13: Test Case for Arduino Uno (IR Sensor). ................................................................................................... 65 Table 14: Modification of Da Nang Car Parking through each version. .......................................................... 79 Table 15: IoT Application evaluation board. ............................................................................................................. 94 Table 16: Table version of Da Nang Car Parking. .................................................................................................. 100 Table 17: Table of the item that the system need to do in future. .................................................................. 100 Table 18: SWOT - Strengths. ......................................................................................................................................... 105 Table 19: SWOT - Weaknesses. .................................................................................................................................... 105 Table 20: SWOT - Opportunities.................................................................................................................................. 106 Table 21: SWOT - Threats. ............................................................................................................................................. 106 Table 22: Functional and non-functional requirements. ................................................................................... 110 HUYNH MINH HUY 11 INTRODUCTION Parking is undergoing a disruptive transition as technology provides new ways to maximize parking space use and drivers grow more demanding of utilizing apps and other services to discover vacant places. Parking generates cash for the city, promotes economic progress, and helps to improve the quality of life in many communities. Giving vehicles access to parking spaces near where they live, work, and engage in leisure activities is critical to a city's economic development. Many of the problems cities face with pollution and traffic may be linked directly back to bad parking management:  Vehicles circle city streets looking for parking.  New vehicles enter cities even when parking facilities are full.  Vehicles queue waiting to enter and leave car parks. This greater movement generates traffic and increases car miles driven, resulting in more pollution. This has the unintended consequence of wasting time and money. Businesses suffer as a result of people being unable to contact them, and productivity suffers as a result of individuals being late for work, school, and other commitments. These concerns can be lessened or eliminated totally by managing parking demand and supply more effectively. HUYNH MINH HUY 14 2. The solution. Smart Parking Management System, Smart Gate Control, Smart Cameras that can detect vehicle kinds, ANPR (Automatic Number Plate Recognition), Smart Payment System, Smart Entry System, and many more advancements have occurred in the Smart Parking business. Today, a similar approach will be used, and a smart parking solution will be constructed that will use an infrared sensor to detect car presence and automatically open or close the gate. The ESP8266 NodeMCU will serve as the main controller for any peripherals connected to it. Parking is an area where IoT sensor technology is making a significant difference, both in terms of user experience and parking spot management and enforcement. Whether in Ho Chi Minh City, Ha Noi, or Da Nang, most major cities, particularly in Vietnam, have begun to adopt different innovative Smart Parking Solutions in the recent five years. The majority of these installations now include vehicle identification sensors, pay-by-app alternatives, and, in some cases, navigation aid. According to our study, the penetration rate of these smart parking spots is still fairly low, but solutions are already sprouting up in most major cities, demonstrating how prevalent and crucial IoT technology has become. Figure 4: Da Nang Parking will solve the problem with a parking car. HUYNH MINH HUY 15 The Da Nang Parking System, which makes use of IoT, can help to reduce the aforementioned parking issue. Figure 5: Logo. This system will notify the driver and indicate the status of parking on the road where the car desires to park, allowing them to make rapid decisions and save time. Figure 6: Location place to parking using Da Nang Parking. We will transfer data to the server in this IoT Smart Parking System to verify the availability of automobile parking spots. HUYNH MINH HUY 16 3. Schematic. According to the plan in Assignment 1, the parking lot will feature a total of 6 infrared sensors corresponding to 6 parking spaces, as well as an I2C LCD screen to indicate the number of parking slots available. However, the project timeline was disrupted for many days, and the process of restoring the gate system and linking the parking system with Blynk-IoT and Firebase took a long time. To keep the project on schedule, I decided to temporarily lower the number of infrared sensors from 6 to 4, and also temporarily to discontinue use of LCD I2C. Reducing the number of IR sensors and LCD I2C will likewise have no negative consequences. I just simplify the system temporarily but still ensure the goal set out. Also, because this is version 1 of the parking system, I would like to hear from users about this project after it is released to the market in order to continue maintaining the system and increasing the number of slots, or I will have to change a few things in the system to be able to reach users more easily. As a prototype, four infrared sensors were connected to Arduino pins 4 to 7. The infrared sensor's VCC pins are connected to the Arduino's 5v power supply. All ground connections are connected to the Arduino's ground, and all infrared sensor output pins are connected to pins 4 to 7. The Nodemcu module's Tx and Rx pins are connected to Arduino pins 2 and 3, respectively, while the GND of Nodemcu are conneted to GND of Arduino. This system will include two schematics: one for the main operation (Da Nang Parking) and one for the extension (Gate). HUYNH MINH HUY 19 4. IoT Hardware. Tools Image Arduino Uno R3 Breadboard IR Sensor HUYNH MINH HUY 20 Nodemcu esp8266 wifi module Servo SG90 RFID RC522 HUYNH MINH HUY 21 Buzzer LED Table 1: IoT Hardware. a. Arduino Uno. Figure 11: Arduino Uno Pin Diagram. HUYNH MINH HUY 24  Arduino Uno Technical Specifications. Microcontroller ATmega328P – 8 bit AVR family microcontroller Operating Voltage 5V Recommended Input Voltage 7-12V Input Voltage Limits 6-20V Analog Input Pins 6 (A0 – A5) Digital I/O Pins 14 (Out of which 6 provide PWM output) DC Current on I/O Pins 40 mA DC Current on 3.3V Pin 50 mA Flash Memory 32 KB (0.5 KB is used for Bootloader) SRAM 2 KB EEPROM 1 KB Frequency (Clock Speed) 16 MHz Table 3: Arduino Uno Technical Specifications. (Components101, 2021) b. NodeMCU ESP8266 Wifi Module. Figure 12: NodeMCU Esp8266 pin diagram. HUYNH MINH HUY 25 Categories Categories Values Wi-Fi Parameters Certificates Certificates Wi-Fi Protocols 802.11 b/g/n Frequency Range 2.4GHz-2.5GHz (2400M- 2483.5M) Hardware Parameters Peripheral Bus UART/HSPI/I2C/I2S/Ir Remote Control Operating Voltage 3.0~3.6V Operating Current Average Value: 80mA Operating Temperature Range -40°~125° Ambient Temperature Range Normal Temperature Package Size 16mm*24mm*3mm External Interface N/A Software Parameters Wi-Fi Mode station/ softAP/ SoftAP+station Security WPA/WPA2 Encryption WEP/TKIP/AES Firmware Upgrade UART Download / OTA (via network) / download and write firmware via the host Software Development Supports Cloud Server Development / SDK for custom firmware development Network Protocols Pv4, TCP/UDP/HTTP/FTP User Configuration AT Instruction Set, Cloud Server, Android/iOS App. Table 4: NodeMCU Parameters. (Elecrow, n.d.) HUYNH MINH HUY 26 The following results were obtained from INPUT and OUTPUT testing on the pins:  digitalWrite was incompatible with GPIOs 6, 7, 8, 11, and ADC (A0).  digitalRead was incompatible with GPIOs 1, 3, 6, 7, 8, and 11, as well as the ADC (A0).  analogWrite did not work with GPIOs 6, 7, 8, 11, or the ADC (A0) (GPIOs 4, 12, 14, 15, and A0 have hardware PWM, while the rest are software-based).  analogRead could only be used with the ADC (A0).  6, 7, 8, and 11 do not work for the aforementioned four instructions. c. Infrared Sensor. Figure 13: Infrared Sensor.  Specifications:  The comparator uses LM393, working stably.  Working voltage: 3.3V - 5V DC.  When the power is turned on, the red power indicator lights up.  Screw holes 3 mm, easy to fix and install.  Size: 3.2cm * 1.4cm.  If utilized in regular mode, please do not arbitrarily alter the potentiometer.  Features:  High Reliability.  Excessive Radiant Intensity.  Forward Voltage is Low.  Having Lead Spacing of 2.54mm.  Maximum Wavelength is 940nm. HUYNH MINH HUY 29  Features:  13.56MHz RFID module.  Operating voltage: 2.5V to 3.3V.  Communication: SPI, I2C protocol, UART.  Maximum Data Rate: 10Mbps.  Read Range: 5cm.  Current Consumption: 13-26mA.  Power down mode consumption: 10uA (min). 5. IoT Platform. Blynk is an Internet-of-Things platform that facilitates the creation and deployment of smart IoT devices. It can read, store, and display sensor data as well as remotely operate devices. The Internet of Things has been all the rage recently, and more and more gadgets are connecting to the internet on a daily basis. With the advancement of such incredible technology, the danger of security has also grown significantly. Some of the most pressing issues in IoT are:  If IoT devices communicate your data to the internet, the communication must be closed and encrypted, which is impossible to achieve without the use of a specialized and closed server, which is extremely difficult to operate.  IoT devices must also be responsive, which is impossible without a server with low latency and high responsiveness.  In the Internet of Things, the platform must be compatible with a wide range of hardware architecture and devices, so that it does not confine its users to a particular type of hardware with restricted capabilities. Keeping in view the problems mentioned above, Blynk is the perfect solution for all these problems. Blynk consists of the following three major components: HUYNH MINH HUY 30 Figure 16: Blink Application.  Blynk App: Blynk's mobile app functions as a control panel for visualizing and controlling your gear. It is compatible with both Android and iOS. The program has a very functional UI and a variety of widgets for various uses. Blynk has its own money called energy. With a free Blynk account, new users receive 2000 Blynk energy, which they may use to purchase and deploy widgets in their projects. Figure 17: Widget Box on blink app. HUYNH MINH HUY 31  Blynk Server: The Blynk Server is the most wonderful component of the Blynk Platform that makes it all possible. Blynk provides a safe, responsive, and centralized cloud service via its server, which enables all of this device connection. The Blynk server is also open-source, which means you can easily build your own server and make it even more secure with a little fiddling.  Blynk Library: The Blynk Library is the essential component of the Blynk platform that makes it scalable and fantastic. The Blynk library allows you to quickly connect your hardware and get it up and running. The library includes support for a variety of hardware devices such as Arduino, ESP8266, and Raspberry Pi, as well as the ability to connect to hardware via a variety of communication methods such as Wi-Fi, Bluetooth, BLE, USB, and GSM. In the parking problem, the Blynk Platform was used to solve this because:  Provides similar API & user interface for all supported devices and hardware.  Connect to the server using:  WIFI.  Bluetooth and BLE.  Ethernet.  USB (Serial).  GSM.  The interface utilities are easy to use by the provider.  Drag and drop interface directly without writing code.  Easily integrate and add new functions by using the virtual connection ports built into the blynk app.  Track data history.  Communication from device to device using Widgets.  Email, tweet, realtime notifications, etc.  Blynk HTTP RESTful API: Blynk HTTP RESTful API allows us to easily read and write values to/from Pins in Blynk apps and Hardware (microcontrollers and microcomputers like Arduino, Raspberry Pi, ESP8266, Particle, etc.).Every PUT request will update Pin's state both in apps and on the hardware. Every GET request will return HUYNH MINH HUY 34 Figure 21: Arduino IDE. 7. Database. Firebase was created in 2011 by Firebase, Inc. as a platform for developing mobile and internet apps, and Google acquired it in 2014. The ability to access a database of data (such as sensor data) from anywhere with an internet connection might be highly helpful. Thanks to Firebase, saving and obtaining data is simple. This database will be NoSQL so that I can save the real-time information that was obtained from the sensor, such as the time and date the fire began and ended. Data in Firebase will be saved as a JSON string rather than a table like in a SQL database. Figure 22: Data stored in Firebase. HUYNH MINH HUY 35 8. Framework. The five-layer framework paradigm is the foundation of my IoT system, as illustrated below. Figure 23: IoT design framework.  Perception Layer: The physical layer that has sensors to sense the surroundings and gather data about it. By sensing specific physical qualities, it locates and recognizes other intelligent things in the surrounding environment.  Transport Layer: Transmits sensor data over WiFi, 3G, LAN, Bluetooth, RFID, and NFC networks from the perception layer to the processing layer and vice versa.  Processing Layer: Called the "middleware layer" It is in charge of handling enormous volumes of data that are received from the transport layer and storing, processing, and analyzing them. It is able to oversee and offer a wide variety of services to the lower tiers. It uses a range of technologies, including as databases, cloud computing, and big data processing modules.  Application Layer: Giving the user application-specific services is their responsibility. Smart homes, smart cities, and smart health are only a few examples of the applications for the Internet of Things that are defined.  Business Layer: Responsible for the overall management of the IoT system, including applications, business and revenue models, and user privacy. HUYNH MINH HUY 36 9. Planning. a. Initiating phase. PROJECT CHARTER 1. General Project Information Project Name: Da Nang Smart Car Parking Executive Sponsors: Huynh Minh Huy & Greenwich Corporation Department Sponsor: University of Greenwich (DN Campus) Impact of the project: Technology solutions to help parking car in the street 2. Project Team Name Department Telephone E-mail Project Manager: Huynh Minh Huy Greenwich 0914048099 huyhmgcd210173@fpt.edu.vn Team Members: Huynh Minh Huy Greenwich 0914048099 huyhmgcd210173@fpt.edu.vn 3. Stakeholders University of Greenwich (DN Campus) Greenwich Corporation 4. Project Scope Statement HUYNH MINH HUY 39 b. Planning phase. i. Project work breakdown structure (WBS). Figure 24: Work Breakdown Structure. HUYNH MINH HUY 40 ii. Project Cost. Phase Process Members Work hours Cost per hour Total Initiating Develop project Charter 1 member 24 hours $5 $600 Planning Develop project management plan 1 member 24 hours $5 $480 Plan Scope 1 member 16 hours $5 $480 Create WBS 1 member 12 hours $5 $70 Plan Schedule 1 member 72 hours $5 $720 Plan Cost 1 member 20 hours $5 $300 Plan Quality management 1 member 18 hours $5 $270 Plan resource 1 member 10 hours $5 $150 Plan Risk 1 member 24 hours $5 $360 Executing Back-end Server 1 member 130 hours $6 $1.560 Database 1 member 160 hours $6 $2.880 Sensor 1 member 120 hours $5 $1.200 Front-end UX/UI 1 member 40 hours $5 $400 Testing 1 member 18 hours $4 $216 Delivery & Maintenance Delivery System Document 1 member 100 hours $3 $1.200 Maintenance Checking status 1 member 40 hours $4 $120 Checking quality 1 member 60 hours $4 $120 Checking performance 1 member 40 hours $5 $600 Total $11.486 Table 8: Project Cost. HUYNH MINH HUY 41 iii. Equipment for prototype: Tools Image Quantity Price Total Arduino Uno R3 2 $40 $80 Breadboard 1 $10 $10 IR Sensor 4 $0.9 $3.6 HUYNH MINH HUY 44 Resources Medium Budget High Project management Planning Medium Schedule Medium Estimation High Controlling Medium Communication Low Table 10: Project risk. v. Executing phase. The project implementation comprises of two major parts: back-end and front-end to produce a full product with all of the essential features. vi. Delivery and maintenance phase. The last stage of the project is to maintain and create goods that work optimally to satisfy consumers. c. Timeline. Process Description Times Analyze Investigate and evaluate the factors found in the transport system in Danang as well as the locations required for parking. 2 weeks (25/11-09/12) Develop Take the output of the preceding procedure and write it down in a programable platform (Arduino) 5 days (10/12-15/12) Implement Prepare and construct the machine out of the materials listed in the tool list. 4 days (17/12-21/12) Test Begin testing and documenting errors according to the test case list. 2 days (22/12-24/12) Accomplishment Fix all the error which appear in test case. Retest and complete all redundant part. Prepare for the represent days 1 days (25/12-26/12) Table 11: Project Timeline. HUYNH MINH HUY 45 10. Developing the IoT solution. a. Setting up Blynk. We must first download the Blynk IoT app on our smartphone (from the AppStore for iOS or the Play Store for Android) and create an account with Blynk. I already installed it, so I just open it on. Figure 25: Installing Blynk on smartphone. HUYNH MINH HUY 46 This is my account information after signing up with Blynk. Figure 26: Account registered on Blynk. We must visit the blynk.io website on a desktop computer after creating an account on a smartphone in order to log in to that account. Then, we must build a new template in this location. I'll call it "CarParking". HUYNH MINH HUY 49 I must go back to the Web Dashboard part after generating the datastream to click on the settings for the newly formed LED and choose the datastream, which will be from V10 to V13 (the newly created datastream). The newly generated items are then saved once I click the "Save And Apply" button. Figure 31: Setting for the LED. After setting up on the desktop, in the device section on Blynk of the smartphone, we can see that the new “CarParking” device has appeared above. Figure 32: List of devices on Blynk app on smartphone. HUYNH MINH HUY 50 Here I will select the LED to detect the presence of a vehicle ahead on the smartphone. Figure 33: Selecting the LED. At this time, I need to do the setting for the LED, here it will be the Advanced mode with the selected datastream as “slot1” created in Blynk web on the desktop. HUYNH MINH HUY 51 Figure 34: Setting for the LED. HUYNH MINH HUY 54 11. The actual connection diagrams. Overview Da Nang Car Parking System (Prototype): Figure 39: Overview Da Nang Car Parking (Prototype). HUYNH MINH HUY 55 Gate (Extension):  Outside: Figure 40: Outside view of gate. HUYNH MINH HUY 56  Inside: Figure 41: Inside view of gate. Sensor:  Outside: Figure 42: Outside view of sensor. HUYNH MINH HUY 59 byte letter; for (byte i = 0; i < mfrc522.uid.size; i++) { Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); Serial.print(mfrc522.uid.uidByte[i], DEC); content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); content.concat(String(mfrc522.uid.uidByte[i], DEC)); } Serial.println(); Serial.print("Message : "); content.toUpperCase(); if (digitalRead(ir) == LOW) { if (content.substring(1) == "91 120 87 00") //change here the UID of the card/cards that you want to give access { Serial.println("Authorized access"); delay(500); digitalWrite(LED_R, HIGH); tone(BUZZER, 500); delay(300); noTone(BUZZER); myServo.write(90); Serial.println("Gate Opened"); delay(2500); if (digitalRead(ir) == HIGH){ myServo.write(0); Serial.println("Gate Closed"); Serial.println(); digitalWrite(LED_R, LOW); } } else { Serial.println(" Access denied"); Serial.println(); digitalWrite(LED_B, HIGH); tone(BUZZER, 300); delay(1000); digitalWrite(LED_B, LOW); noTone(BUZZER); } } } Figure 45: Code for Arduino UNO (Gate). HUYNH MINH HUY 60  Test Case: No. Action Inputs Expected Output Actual Output Test Result TC01 Using correct cards Using correct card with UID = “91 120 87 00” The Serial print = “Authorized access” and the Servo “open” The Serial print = “Authorized access” and the Servo “open” PASS TC02 Using incorrect cards Using incorrect card with UID = “146 78 133 26” The Serial print = “Access denied” and the Servo “close” The Serial print = “Access denied” and the Servo “close” PASS TC03 Using correct cards after using incorrect cards Using correct card with UID = “91 120 87 00” and Using incorrect card with UID = “146 78 133 26” The Serial print = “Authorized access” and the Servo “open” The Serial print = “Authorized access” and the Servo “open” PASS TC04 Using incorrect cards after using correct cards Using incorrect card with UID = “146 78 133 26” and Using correct card with UID = “91 120 87 00” The Serial print = “Access denied” and the Servo “close” The Serial print = “Access denied” and the Servo “close” PASS TC05 Check IR sensor off when working Turn off IR sensor and using the correct card with UID = “91 120 87 00” The Serial print = “The system has error” and the Servo “close” The system not working FAIL HUYNH MINH HUY 61 TC06 Check when the user moves out of range of IR sensor Active IR sensor and using correct card with UID = “91 120 87 00” then inactive IR sensor The Serial print = “Authorized access” and the Servo “open” After that Servo will “close” The Serial print = “Authorized access” and the Servo “open” After that Servo will “close” PASS Table 12: Test Case for Arduino uno (Gate). Figure 46: How the gate in Da Nang Car Parking work. When the driver arrives at the Da Nang Parking, they must show their parking card to the RFID card reader. Figure 47: When the driver show the invalid card to the RFID card reader. HUYNH MINH HUY 64 { if( digitalRead(parking1_slot1_ir_s) == LOW) { sensor1 = "255"; delay(200); } if( digitalRead(parking1_slot1_ir_s) == HIGH) { sensor1 = "0"; delay(200); } } void p1slot2() // parking 1 slot2 { if( digitalRead(parking1_slot2_ir_s) == LOW) { sensor2 = "255"; delay(200); } if( digitalRead(parking1_slot2_ir_s) == HIGH) { sensor2 = "0"; delay(200); } } void p1slot3() // parking 1 slot3 { if( digitalRead(parking1_slot3_ir_s) == LOW) { sensor3 = "255"; delay(200); } if( digitalRead(parking1_slot3_ir_s) == HIGH) { sensor3 = "0"; delay(200); } } void p1slot4() // parking 1 slot4 { if( digitalRead(parking1_slot4_ir_s) == LOW) HUYNH MINH HUY 65 { sensor4 = "255"; delay(200); } if( digitalRead(parking1_slot4_ir_s) == HIGH) { sensor4 = "0"; delay(200); } } Figure 49: Code for Arduino Uno (IR Sensor).  Test Case: No. Action Inputs Expected Output Actual Output Test Result IR01 Send data to NodeMCU with 1 car Active IR sensor slot 2 Cdata = “0,255,0,0” Cdata = “0,255,0,0” PASS IR02 Send data to NodeMCU with 4 cars Active IR sensor slot 1 to slot 4 Cdata = “255,255,255,255” Cdata = “255,255,255,255” PASS IR03 Check the system working if 1 IR sensor have problem Disconnect IR sensor slot 4 and parking car in to slot 1 Cdata = ““255,0,0,0” And Cdata = “255,0,0,0” PASS Table 13: Test Case for Arduino Uno (IR Sensor). Figure 50: How the sensor in Car Parking work. HUYNH MINH HUY 66 In this situation, after giving the valid card issued by Da Nang Parking, the automobile driver put his car in parking lot 3. You can see the sensor representing slot 3 is lit up. Figure 51: The sensor representing slot 3 is lit up. Here is the result when the driver put his car in parking lot 3 in Blynk IoT App.  On smartphone app. Figure 52: LED represent for slot 3 in Blynk Smartphone App. HUYNH MINH HUY 69 { // You can send any value at any time. // Please don't send more that 10 values per second. // Blynk.virtualWrite(V1, millis() / 1000); if (Firebase.ready() && signupOK ) { // Serial.print("Connect successfuly!"); // implement if (Serial.available() > 0 ) { rdata = Serial.read(); myString = myString+ rdata; //Serial.print(rdata); if( rdata == '\n') { Serial.println(myString); String l = getValue(myString, ',', 0); String m = getValue(myString, ',', 1); String n = getValue(myString, ',', 2); String o = getValue(myString, ',', 3); led1 = l.toInt(); led2 = m.toInt(); led3 = n.toInt(); led4 = o.toInt(); // these leds represents the leds used in Blynk application Firebase.RTDB.setInt(&control_data, "SLOT 1 is actived", led1); Firebase.RTDB.setInt(&control_data, "SLOT 2 is actived", led2); Firebase.RTDB.setInt(&control_data, "SLOT 3 is actived", led3); Firebase.RTDB.setInt(&control_data, "SLOT 4 is actived", led4); myString = ""; // end new code } } sensorvalue1(); sensorvalue2(); sensorvalue3(); sensorvalue4(); } } void setup() { // Debug console HUYNH MINH HUY 70 Serial.begin(9600); Blynk.begin(auth, ssid, pass); timer.setInterval(500L,myTimerEvent); /* Assign the api key (required) */ config.api_key = API_KEY; /* Assign the RTDB URL (required) */ config.database_url = DATABASE_URL; /* Sign up */ if (Firebase.signUp(&config, &AUTH, "", "")){ Serial.println("ok"); signupOK = true; } else{ Serial.printf("%s\n", config.signer.signupError.message.c_str()); } /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; //see addons/TokenHelper.h Firebase.begin(&config, &AUTH); Firebase.reconnectWiFi(true); } void loop() { Blynk.run(); timer.run(); // Initiates BlynkTimer } void sensorvalue1() { int sdata = led1; // You can send any value at any time. // Please don't send more that 10 values per second. Blynk.virtualWrite(V10, sdata); } void sensorvalue2() { int sdata = led2; // You can send any value at any time. // Please don't send more that 10 values per second. Blynk.virtualWrite(V11, sdata); HUYNH MINH HUY 71 } void sensorvalue3() { int sdata = led3; // You can send any value at any time. // Please don't send more that 10 values per second. Blynk.virtualWrite(V12, sdata); } void sensorvalue4() { int sdata = led4; // You can send any value at any time. // Please don't send more that 10 values per second. Blynk.virtualWrite(V13, sdata); } String getValue(String data, char separator, int index) { int found = 0; int strIndex[] = { 0, -1 }; int maxIndex = data.length() - 1; for (int i = 0; i <= maxIndex && found <= index; i++) { if (data.charAt(i) == separator || i == maxIndex) { found++; strIndex[0] = strIndex[1] + 1; strIndex[1] = (i == maxIndex) ? i+1 : i; } } return found > index ? data.substring(strIndex[0], strIndex[1]) : ""; } Figure 55: Code for NodeMCU ESP8266 Wifi Module. HUYNH MINH HUY 74 The "occupied" range is between 10 and 50 cm. Figure 58: Visualize how Da Nang Parking System IR Sensor works with parking car. When used in practice, the gadget created as part of this research is an application of the Internet of Things (IoT). The electronic gadget you create can aid cars in finding a suitable parking place. The data collected by the system will be transferred to the cloud, where anybody in the world will be able to access it for analysis. Figure 59: Demo setup IoT Devices in street.. HUYNH MINH HUY 75 2. Evidence for apply Da Nang Parking System in practice. How does Da Nang Parking System operate? It is critical to get broad assessments from many stakeholders as well as a wide range of input. Based on the data, we may make assessments, improve, and overcome the product's shortcomings. There is a test case for implementing Da Nang Parking System. No. Action Inputs Expected Output Actual Output Test Result TC01 Check the system works under the rain Create artificial rain The sensor still working The sensor has a problem to recognize car parking FAIL TC02 Check the Waterproof of system Put the system into the water The sensor still working The sensor is broken FAIL TC03 Check the system work under Smog Create artificial smog The sensor still working The sensor still working PASS Figure 60: Test case for using Da Nang Car Parking in different weather.  Example Da Nang Parking System in practice: The car wants to park: Figure 61: The car wants to park. HUYNH MINH HUY 76 Using RFID to unlock the security gate: Figure 62: Using RFID to unlock the security gate. Car parking at slot parking lot 3: Figure 63: Car parking at slot parking lot 3. HUYNH MINH HUY 79 3. Examining the system feedbacks of Da Nang Parking System.  Good points:  The sensors function effectively in a variety of weather situations.  Resolve the parking issue on a few important thoroughfares.  The Da Nang Parking System is easy to use.  Correct data was transmitted by the sensor.  The Da Nang Parking System's equipment is easy to install and construct.  Not good points:  In severe weather, such as storms and rain, the device has certain sensor difficulties.  Depending on that network, the device cannot upload data to the application program if there is no Wi-Fi network.  The appliance cannot operate without power. III. RECONCILE AND EVALUATE END-USER FEEDBACK AND DETERMINE THE ADVANTAGES AND DISADVANTAGES OF CHOSEN IOT TECHNIQUES. (M5) 1. The Modification. Version Problem Solution Da Nang Parking 1.0 Sensor Change from Infrared (IR) Sensors to Ultrasonic. Application Change application from Blynk to Da Nang Car Parking application on Android. Networking Change module Nodemcu esp8266 wifi module to Board SIM800C intoRobot Fox. Da Nang Parking 2.0 Sensor Upgrade Waterproof sensor. Application Create application for IOS phone. Database Upload data on Da Nang Parking’s cloud. Networking Testing using LoRa to transfer data. Da Nang Parking 3.0 Energy Use solar energy Table 14: Modification of Da Nang Car Parking through each version. HUYNH MINH HUY 80 2. Evaluate the entire solution, advantages, and disadvantages The new ideas for Da Nang Parking products are based on customer input, which includes both positive and negative feedback. The increasing number of autos on the road throughout the world is intensifying the parking issue. On a global scale, the terrifying problem of traffic congestion is spreading rapidly. The increased necessity to combat and manage parking-related issues has led in an increase in the need for effective parking solutions. Smart parking solutions allow flexibility and scalability to successfully handle parking issues. Smart parking system installation necessitates the use of low-cost sensors and mobile phone-enabled automated payment systems. Such smart features allow customers to assess available parking places and book a slot ahead of time, saving the time necessary to secure parking. The parking system minimizes automotive emissions by eliminating the need for people to circle city blocks looking for parking spaces. Governments all around the world are initiating a slew of initiatives to encourage the widespread use of such parking systems, owing to the system's ability to reduce traffic congestion and pollution levels. Favorable administrative policies are projected to contribute greatly to industry growth in the coming years. The large-scale system component is only achievable via significant financial investments made by national governments. Nonetheless, increased use of these systems at airports, corporate campuses, and other venues is projected to improve commercial possibilities. Plans have been made to create a solution that addresses the majority of the problems, including weather, data transport, and energy consumption. HUYNH MINH HUY 81 3. Solutions to improve the solution or to replace in the future.  Board: Instead than depending on Wi-Fi network conditions to utilize NodeMCU and Arduino devices, the system may employ boards with 3G, 4G, and LTE connection. Figure 68: Board SIM800C IntoRobot-Fox.  Sensor: To improve display results, replace the IR sensor with the IOE-SR05 distance measuring sensor. Figure 69: IOE-SR05. HUYNH MINH HUY 84 including the amount of money currently in the account, and may steal it at any moment. In Da Nang Parking System , there is also a card reader to identify the person who registered the card, thus bad guys may use the card reader to steal consumer information. When the user has passed the authentication system with the parking ID number and an authenticated ID card. Then, the system authenticates the identification card. If the ID card matches the information in the database, the user is prompted to enter their password to complete authentication. In this scenario, the user enters the correct password. The expected result is successful authentication and an attacker has gained access to the parking system. Figure 72: Authentication scenario. In addition, data vulnerabilities are also one of the security risks that we face, both autonomous and connected technologies rely on massive volumes of data to be generated and analyzed. Because of the fast growth of new technologies, connection, and data, the attack surface has grown substantially. Technology in the digital age has the ability to be utilized to acquire access both locally and remotely. The "new arms race" moniker refers to the severity of the data breach problem. This ever-expanding trend requires new ways of thinking about how to protect our gadgets against malicious attacks aimed at stealing personal information. Moreover, Damage to or Theft of Vehicles is also one of the burning problems in the context that the world has just cooled down after the COVID-19 epidemic. Car thieves may target parking lots that aren’t well secured and may also check for careless car HUYNH MINH HUY 85 owners who leave their doors unlocked. Some thieves look for valuables left inside vehicles, while others break windows or cause other damage simply out of malice. Additionally, traffic jams on holidays or peak hours is one of the most common problems in Vietnam. The constant flow of cars in and out of the parking lot can potentially cause the system to malfunction and can provide slow information on whether the parking lot is full or not. Not only that, it can also reduce safety in and around the parking lot. Last but not least is accidents, depending on the layout, illumination, speed limits, and other variables, parking lots can be hazardous. Vehicles pulling out of their positions to depart, for example, can be struck by other cars rushing past. There are also hit-and-run incidents, which occur when one automobile collides with a stopped vehicle and drives away, leaving the driver to return to find dents or other damage. These are just a few unpleasant incidents that can occur. Such occurrences can have a damaging effect on my business and its reputation, but certain actions can greatly improve parking lot safety. 2. Solution for security risks a. Automate using the cloud. Monitoring and reporting requirements for parking companies have gotten much more difficult. The good news is that the Cloud can make things easier. All parking-related equipment may be connected and "speak" to one other via IoT, allowing the parking manager to monitor the system, alarm, occupy seats, automated license plate recognition (ALPR) systems, video feeds, intercoms, and even geofencing. This not only makes the network of devices easier to maintain, but it also improves parking and pedestrian safety and efficiency. b. Use real-time occupancy data. Real-time occupancy data is one of the most powerful tools parking managers have today. Providing real-time occupancy information to parkers reduces congestion, helps people open seats faster, and allowing them to conduct their business either working or spending money, which, frankly, makes people happier. Not only that, but real-time HUYNH MINH HUY 86 occupancy rate data helps to reduce overall frustration and improve safety in and around parking facilities. In addition, by using the same real-time occupancy data, parking managers can respond more quickly to problems and better plan for the future. If they can see where people are parking as part of their overall facility or facility management map, they can see where it is. it may be beneficial to add another garage. When it's time to make a proposal, the data will provide a basis to support claims and even provide insight into how to fund development projects. For example, regression analysis can be used to determine the impact of changing parking prices. This information, along with occupancy rate data, can justify funding. c. Hire Security Personnel. The presence of security guards at a parking area may significantly increase safety. On- foot security patrols around the parking lot or garage, for example, are a great deterrent to crime since they strengthen access control and allow a person to inspect vehicles on a regular basis, identify any license plate that may be violating rules, and monitor activities. Professional security is an expenditure for your company, but it is something to think about if you want to make your workplace safer. d. Keep Systems and Software Updated. Updates to software and systems have a significant influence on your cyber security and digital safety. This is due to the fact that they not only bring new features but also address bugs and assist in the patching of security flaws and vulnerabilities that may be exploited. Malicious hackers create code that exploits weaknesses. Most of the time, this code is packaged as malware, which can disrupt your entire system. As a result, utilize a patch management system to manage all updates automatically and maintain information security. > UNIVERSITY 1) GREENWICH “BT E Cc sane wes IEF taxa ° How satisfied were you with the system? 1 2 2 4 & Nat very oO Oo O° Oo oO Very much Do you think Da Nang Parking System will solve the parking problem? 1 2 3 4 5 Not very Oo Oo oO Oo oO Very much Which part did you find most relevant? Nat relevant Relevant Very relevant Did not attend Sensor O O O O Server oO oO oO Oo Database oO oO oO oO Application O O oO O Can the system be widely applied in the future? © Yes O No HUYNH MINH HUY Ei HUYNH MINH HUY 90 Through the questionnaire provided to 60 users who experienced the Da Nang Parking System. The following are general statistics on the purpose attained after employing the question system: This IoT is a complete system that includes both hardware and software. Key stakeholders must be identified, such as:  Customer: Does using the application meet the needs of the customers? Is the client satisfied with the product or experiencing any problems while using it?  Developer: Is there any progress in project implementation, and have the hardware and software features been stabilized? Do you need to upgrade or replace any hardware or software?  Related People: Providers of software and hardware services. HUYNH MINH HUY 91  The result of the survey: Figure 73: User Satisfied Result. The Da Nang Parking System received positive feedback from the majority of poll participants. Figure 74: Result of User's thinking this project will solve the problem. Regarding the problem of parking, users have felt how the system works to solve the problem, but besides that, there are still unsolved issues. HUYNH MINH HUY 94 2. IoT application evaluation board. Based on user assessments of four factors (on a scale of 10): Feasibility for practice, Ability to commercialize, Possibility of improvement, and Problem-solving. The project's ability to grasp viable development and future development. Evaluation Criteria Car owners Motorcyclists Shop owners along the street Other related people Feasibility for practice 8.8 7.2 8.2 7.9 Ability to commercialize 8.9 8.3 8.0 8.2 Possibility of improvement 9.4 9.1 9.0 9.2 Problem-solving 7.7 7.3 7.9 7.7 Table 15: IoT Application evaluation board.  Feasibility for Practice: The capacity to implement the product in practice is extremely good, according to evaluations from Da Nang Parking System product experience, addressing many real-life difficulties such as management, search, and bean related concerns Parking.  Ability to commercialize: Da Nang Parking System devices are not currently available in city vehicle parks. Da Nang Parking System will be a solution for parking developments to satisfy supply and demand. Besides, to make the city smart, the use of technology like Da Nang Parking System is a vital component. Many clients are interested in this technology.  Posibility of Improvement: Da Nang Parking System goods are products with the capacity to enhance to serve various elements of life such as Optimized parking, Reduced traffic, Reduced pollution, Enhanced User Experience, etc. Because of this, IoT technology has the capacity to improve extremely well by altering a few things such as sensors, servers, etc. The technology was able to address numerous parking challenges. HUYNH MINH HUY 95  Problem-solving: Da Nang Parking System’s parking problem is still not completely solved, but with future advancements, Da Nang Parking System will tackle more than just parking problems. II. UNDERTAKE A CRITICAL REVIEW AND COMPARE YOUR FINAL APPLICATION WITH THE ORIGINAL PLAN. (M6) 1. Evaluate the key points of the end-application. a. Feasibility for practice. The smart parking industry may be classified into three areas based on applications: transportation transit, government, and commercial. Government applications accounted for more than 62% of total market share in 2015 and are predicted to retain their dominance over market growth over the next seven years as a consequence of government activities in both developed and developing countries. The following are some of the benefits of Smart Parking Solutions:  Optimized Parking.  Traffic has been decreased.  Pollution has decreased.  Enhanced User Experience.  New revenue streams.  Payments and POS are connected.  Enhanced security blanket coverage.  Trend analysis and real-time data.  Management expenses have been cut.  Service and brand image have improved. HUYNH MINH HUY 96 b. Ability to commercialize. The high pace of increase in new automobile registrations worldwide, including significant growth from regional economies such as Asia Pacific (APAC), will provide a window of opportunity for parking management businesses. Intelligent parking management solutions will find a home in existing and new smart city initiatives across the world. From 2014 to 2019, the worldwide parking management industry is predicted to develop at a compound annual growth rate (CAGR) of 11.4%. The parking management market is predicted to be worth $5,025.9 million in 2014. The market is predicted to expand in parallel with the increase in car ownership and the expansion of parking facilities. The major drivers for the parking management sector are the need for smooth traffic flow, commercial advantages to parking site operators, and reduced hardware and connection costs. Because these areas are popular with both visitors and residents, the commercial application category has great development potential and is predicted to gain pace throughout the projection period. Such systems are becoming more common in business roadways, retail malls, theaters, and sports complexes, among other areas where smart parking management is a priority. Because of its great convenience and flexibility, as well as mobile payment options, the business segment is likely to grow. Vendors place a premium on consumer convenience and are continually releasing new applications with innovative features. The transportation transit application sector accounted for more than 9% of total market share in 2015, and this figure is likely to grow over the next seven years.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved