Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iothings:proiecte:2022:smart_parking_system [2023/01/19 13:44]
andrei.popa0805
iothings:proiecte:2022:smart_parking_system [2023/01/19 22:12] (current)
andrei.popa0805
Line 12: Line 12:
  
 ==== Hardware Architecture ==== ==== Hardware Architecture ====
-The proposed system architecture from a hardware perspective includes a selection of electronic components that are chosen based on their functional capabilities and cost-effectiveness. ​+The proposed system architecture from a hardware perspective includes a selection of electronic components that were chosen based on their functional capabilities and cost-effectiveness. ​
   * The core component of the system is the **ESP32 microcontroller**,​ developed and manufactured by Espressif Systems, a Chinese company based in Shanghai. The ESP32 series is a low-cost, low-power system-on-a-chip that integrates Wi-Fi and dual-mode Bluetooth capabilities,​ making it an ideal choice for this application;​ \\   * The core component of the system is the **ESP32 microcontroller**,​ developed and manufactured by Espressif Systems, a Chinese company based in Shanghai. The ESP32 series is a low-cost, low-power system-on-a-chip that integrates Wi-Fi and dual-mode Bluetooth capabilities,​ making it an ideal choice for this application;​ \\
 {{ :​iothings:​proiecte:​2022:​esp32_microprocessor.png?​300 |}} {{ :​iothings:​proiecte:​2022:​esp32_microprocessor.png?​300 |}}
Line 31: Line 31:
 The simulated diagram of the hardware architecture is highlighted in the picture below, where the wiring of the system is detailed and can be optimally analyzed. The simulated diagram of the hardware architecture is highlighted in the picture below, where the wiring of the system is detailed and can be optimally analyzed.
 {{ :​iothings:​proiecte:​2022:​wiring_smart_parking_system2.png |}} \\ {{ :​iothings:​proiecte:​2022:​wiring_smart_parking_system2.png |}} \\
-From an electrical point of view, the hardware architecture was configured below for a better understanding of how the system works and how can it be implemented from scratch. \\+From an electrical point of view, the hardware architecture was configured ​and displayed ​below for a better understanding of how the system works and how can it be implemented from scratch. \\
 {{ :​iothings:​proiecte:​2022:​electric_diagram_smart_parking.png |}} \\ {{ :​iothings:​proiecte:​2022:​electric_diagram_smart_parking.png |}} \\
 In the end, the physically hardware architecture fully configured on the breadboard can be observed in the picture below where the barrier between the ultrasonic sensors can be also noticed. In the end, the physically hardware architecture fully configured on the breadboard can be observed in the picture below where the barrier between the ultrasonic sensors can be also noticed.
 {{ :​iothings:​proiecte:​2022:​schema_smart_parking_system.png?​300 |}} {{ :​iothings:​proiecte:​2022:​schema_smart_parking_system.png?​300 |}}
 +A full view of the parking lot is illustrated in the picture below. The difference between these two pictures is that in this case the whole parking lot can be observed and, implicitely,​ the placement of the system on the table. 
 +{{ :​iothings:​proiecte:​2022:​pov_smart_parking2.png |}}
 ==== Software Architecture ====  ==== Software Architecture ==== 
  
-In regards to the software architecture implemented for this project, ​a fundamental ​aspect to consider is the organization ​of the file system. As depicted in the diagram below, a comprehensive examination of each file will be conducted in this chapter, in order to thoroughly explain the configuration of each hardware component and its role in the overall system behavior.+In regards to the software architecture implemented for this project, ​an important ​aspect to consider is the structure ​of the file system. As depicted in the diagram below, a comprehensive examination of each file will be conducted in this chapter, in order to thoroughly explain the configuration of each hardware component and its role in the overall system behavior.
 {{ :​iothings:​proiecte:​2022:​filesystem_smart_parking.png?​300 |}} {{ :​iothings:​proiecte:​2022:​filesystem_smart_parking.png?​300 |}}
 The file "​project_IoT.ino"​ represents the configuration that is uploaded onto the ESP32 microcontroller. In the initial segment of code, the inclusion of the necessary libraries is essential to achieve the intended outcomes. The file "​project_IoT.ino"​ represents the configuration that is uploaded onto the ESP32 microcontroller. In the initial segment of code, the inclusion of the necessary libraries is essential to achieve the intended outcomes.
Line 54: Line 55:
 #include <​WiFi.h>​ #include <​WiFi.h>​
 #include <​ESPAsyncWebServer.h>​ #include <​ESPAsyncWebServer.h>​
-</​code> ​\\+</​code>​
 This snippet of code declares several variables and constants that are used in the program. The Servo object "​myservo"​ is created to control a servo motor. The trigPin1, echoPin1, trigPin2, and echoPin2 constants represent the pin numbers that are used for the trigger and echo pins of two ultrasonic sensors. The led1 and led2 constants represent the pin numbers of two LEDs. The button1 and button2 constants represent the pin numbers of two buttons. The DHT_PIN constant represents the pin number of the DHT11 sensor, DC_Motor and servoPin constants represents the pin number of the DC Motor and Servo Motor respectively. The ssid and password constants are used to store the WiFi network'​s name and password. The "​state"​ variable is used to keep track of the state of the trigger button from the web interface and the "​servoPos"​ variable is used to store the position of the servo motor. The AsyncWebServer object "​server"​ is created and set to listen on port 80. The DHT object "​dht"​ is created and connected to the DHT11 sensor on pin DHT_PIN. This snippet of code declares several variables and constants that are used in the program. The Servo object "​myservo"​ is created to control a servo motor. The trigPin1, echoPin1, trigPin2, and echoPin2 constants represent the pin numbers that are used for the trigger and echo pins of two ultrasonic sensors. The led1 and led2 constants represent the pin numbers of two LEDs. The button1 and button2 constants represent the pin numbers of two buttons. The DHT_PIN constant represents the pin number of the DHT11 sensor, DC_Motor and servoPin constants represents the pin number of the DC Motor and Servo Motor respectively. The ssid and password constants are used to store the WiFi network'​s name and password. The "​state"​ variable is used to keep track of the state of the trigger button from the web interface and the "​servoPos"​ variable is used to store the position of the servo motor. The AsyncWebServer object "​server"​ is created and set to listen on port 80. The DHT object "​dht"​ is created and connected to the DHT11 sensor on pin DHT_PIN.
 <​code>​ <​code>​
Line 255: Line 256:
 </​code>​ </​code>​
 In this project, the ESP32 microcontroller serves as the central control unit for the operation of all sensors and motors involved. This is demonstrated also in the demo video. Additionally,​ the file "​index.html"​ was uploaded to the microcontroller'​s internal memory in order to facilitate the display of a user-friendly web interface, as depicted in the picture below. Through this interface, users can easily monitor the temporal evolution of humidity and temperature and make a decision to activate the ventilation system via the button provided at the top of the page. \\ In this project, the ESP32 microcontroller serves as the central control unit for the operation of all sensors and motors involved. This is demonstrated also in the demo video. Additionally,​ the file "​index.html"​ was uploaded to the microcontroller'​s internal memory in order to facilitate the display of a user-friendly web interface, as depicted in the picture below. Through this interface, users can easily monitor the temporal evolution of humidity and temperature and make a decision to activate the ventilation system via the button provided at the top of the page. \\
-{{ :​iothings:​proiecte:​2022:​preview_web_server_smart_parking.png |}}+<note tip>The flash on the ESP32 internal memory of the "​index.html"​ file was realized with a plugin called **ESP32FS**,​ documented in the resource chapter of this project.</​note>​ 
 +{{ :​iothings:​proiecte:​2022:​preview_web_server_smart_parking.png |}} \\
 The above code is the HTML document that contains the structure, layout, and styling of the web page depicted above. The web page is used to display two Highchart graph and a switch button. The switch button is used to turn on and off the ventilation system, when the switch is on the button is green, and when it's off it's red. The page uses a stylesheet to define the layout and design of the page elements such as the switch, the labels and the charts. The JavaScript code is used to create the charts and to handle the switch button "​onchange"​ event. The above code is the HTML document that contains the structure, layout, and styling of the web page depicted above. The web page is used to display two Highchart graph and a switch button. The switch button is used to turn on and off the ventilation system, when the switch is on the button is green, and when it's off it's red. The page uses a stylesheet to define the layout and design of the page elements such as the switch, the labels and the charts. The JavaScript code is used to create the charts and to handle the switch button "​onchange"​ event.
 <​code>​ <​code>​
Line 476: Line 478:
 </​html>​ </​html>​
 </​code>​ </​code>​
 +To sum up, a simple yet efficient software architecture was obtained and the whole system'​s usability was highlighted in the diagram below.
 +{{ :​iothings:​proiecte:​2022:​activity_diagram_smart_parking2.png |}}
 ===== Usability. Demo Video ===== ===== Usability. Demo Video =====
-The way the proposed solution is working was highlighted in the video attached in the link below. ​Hereone can observe ​the full environment and the hardware implementation'​s placement in the parking lot. The example displays how the ultrasonic sensors sense the activity which happens in front of them, how the barrier can be moved manually using the buttons or automatically when the ultrasonic sensors detect some movement, the LEDs which indicate the state of the barrier (open/​closed) and the web server interface in which the evolution in time of the humidity and temperature can be seen in the graphs and the trigger button of the DC Motor which should be pressed when temperature/​humidity exceed a desired treshold. +The way the proposed solution is working was highlighted in the video attached in the link below. ​There, the full environment and the hardware implementation'​s placement in the parking lot can be observed. The example displays how the ultrasonic sensors sense the activity which happens in front of them, how the barrier can be moved manually using the buttons or automatically when the ultrasonic sensors detect some movement, the LEDs which indicate the state of the barrier (open/​closed) and the web server interface in which the evolution in time of the humidity and temperature can be seen in the graphs and the trigger button of the DC Motor which should be pressed when temperature/​humidity exceed a desired treshold. ​\\ 
-Link: #TODO+Link: [[https://​drive.google.com/​file/​d/​1O56uAq17g-68r0betEHjXbiDiJ5rza-4/​view?​usp=share_link]]
 ===== Future Work & Improvements ===== ===== Future Work & Improvements =====
 This project presents a smart parking system that utilizes an ESP32 microcontroller,​ two ultrasound sensors, a servomotor, two buttons, a humidity and temperature sensor, two LEDs and a DC motor. The system is capable of detecting the presence of cars at the entrance of the parking lot. However, there is still room for improvement. This project presents a smart parking system that utilizes an ESP32 microcontroller,​ two ultrasound sensors, a servomotor, two buttons, a humidity and temperature sensor, two LEDs and a DC motor. The system is capable of detecting the presence of cars at the entrance of the parking lot. However, there is still room for improvement.
Line 489: Line 493:
 The implementation of the ESP32 module has proven to be highly effective in providing the necessary intelligence and connectivity capabilities to the parking system, allowing for efficient allocation and management of parking spaces. \\ The implementation of the ESP32 module has proven to be highly effective in providing the necessary intelligence and connectivity capabilities to the parking system, allowing for efficient allocation and management of parking spaces. \\
 The use of a servomotor to simulate a parking barrier, along with the implementation of manual and automatic modes of operation, has resulted in a more secure and user-friendly parking experience for users. The integration of temperature and humidity sensors in the ventilation subsystem has not only ensured a comfortable environment for the users but also helped to reduce energy consumption by only activating the ventilation when needed.\\ The use of a servomotor to simulate a parking barrier, along with the implementation of manual and automatic modes of operation, has resulted in a more secure and user-friendly parking experience for users. The integration of temperature and humidity sensors in the ventilation subsystem has not only ensured a comfortable environment for the users but also helped to reduce energy consumption by only activating the ventilation when needed.\\
-The web-based interface has provided an easy way for the administrator to monitor and manage the system, it could also be further developed to allow users to check the parking space availability in advancereserve parking spots and make payments.\\+The web-based interface has provided an easy way for the administrator to monitor and manage the system, it could also be further developed to allow users to check the parking space availability in advance ​or reserve parking spots.\\
 The results of this study have shown that it is possible to develop an intelligent parking system that is not only efficient but also cost-effective by using commercially available modules like the ESP32. The results of this study have shown that it is possible to develop an intelligent parking system that is not only efficient but also cost-effective by using commercially available modules like the ESP32.
-This research can be expanded to include more sensors and modules to improve the overall performance and user experience, such as facial recognition or license plate recognition to further automate the parking process.+This research can be expanded to include more sensors and modules to improve the overall performance and user experience, such as license plate recognition to further automate the parking process.
  
 ===== Resources & References ===== ===== Resources & References =====
Line 518: Line 522:
 [21][[https://​docs.espressif.com/​projects/​esp-idf/​en/​latest/​esp32/​api-reference/​storage/​spiffs.html]] \\ [21][[https://​docs.espressif.com/​projects/​esp-idf/​en/​latest/​esp32/​api-reference/​storage/​spiffs.html]] \\
 [22][[https://​randomnerdtutorials.com/​esp32-web-server-arduino-ide/​]] \\ [22][[https://​randomnerdtutorials.com/​esp32-web-server-arduino-ide/​]] \\
 +[23][[https://​github.com/​me-no-dev/​arduino-esp32fs-plugin]]
iothings/proiecte/2022/smart_parking_system.1674128648.txt.gz · Last modified: 2023/01/19 13:44 by andrei.popa0805
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0