Differences

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

Link to this comparison view

pm:prj2023:avaduva:weatherstation [2023/05/28 21:35]
sorana_elena.ion [General Description]
pm:prj2023:avaduva:weatherstation [2023/05/28 23:22] (current)
sorana_elena.ion [Concluzii]
Line 49: Line 49:
   * **LCD Display**: An LCD screen that displays the weather data.   * **LCD Display**: An LCD screen that displays the weather data.
   * **Wi-Fi Connection**:​ Provides a wireless connection to the internet via Wi-Fi.   * **Wi-Fi Connection**:​ Provides a wireless connection to the internet via Wi-Fi.
-  * **MySQL Database**: Stores the weather data received from the NodeMCU with ESP8266 for display ​on a web page.+  * **MySQL Database**: Stores the weather data received from the NodeMCU with ESP8266
 +  * **Django Admin**: The administrative interface provided by Django web framework ​for managing and displaying the weather data stored in the MySQL Database. It allows administrators to access and manipulate the data, perform CRUD operations, and customize the display ​of weather information.
  
 The NodeMCU with ESP8266 retrieves data from the Weather Click Sensor, which includes temperature,​ humidity, and pressure readings. This data is then displayed on the LCD Display. The NodeMCU with ESP8266 connects to the internet via Wi-Fi, allowing it to send the weather data to the MySQL Database for storage. The stored weather data can then be accessed and displayed on a web page. The NodeMCU with ESP8266 retrieves data from the Weather Click Sensor, which includes temperature,​ humidity, and pressure readings. This data is then displayed on the LCD Display. The NodeMCU with ESP8266 connects to the internet via Wi-Fi, allowing it to send the weather data to the MySQL Database for storage. The stored weather data can then be accessed and displayed on a web page.
Line 69: Line 70:
  
   * The "​heart"​ of this device is the NodeMCU v.1 board with an ESP8266 microprocessor from the RISC family based on the Tensilica Xtensa 32-bit design. It "​beats"​ at a frequency between 80MHz and 160MHz (we can compare it to 8MHz-16MHz for the 8-bit Arduino UNO) and offers much more RAM (32KB instruction,​ 32KB instruction cache, 80KB user-data, 16 KB ETS system-data) and Flash (4MB). For comparison, the Arduino UNO has 2KB RAM and 32KB Flash. For my application,​ the most important feature is that this board has wireless connectivity at 2.4GHz on IEEE 802.11 b/g/n Wi-Fi standards. Programming this board can also be done wirelessly (OTA - over the air) without requiring direct connection to a PC, but a power source of 3V-5V (battery) will be required to provide power to it.   * The "​heart"​ of this device is the NodeMCU v.1 board with an ESP8266 microprocessor from the RISC family based on the Tensilica Xtensa 32-bit design. It "​beats"​ at a frequency between 80MHz and 160MHz (we can compare it to 8MHz-16MHz for the 8-bit Arduino UNO) and offers much more RAM (32KB instruction,​ 32KB instruction cache, 80KB user-data, 16 KB ETS system-data) and Flash (4MB). For comparison, the Arduino UNO has 2KB RAM and 32KB Flash. For my application,​ the most important feature is that this board has wireless connectivity at 2.4GHz on IEEE 802.11 b/g/n Wi-Fi standards. Programming this board can also be done wirelessly (OTA - over the air) without requiring direct connection to a PC, but a power source of 3V-5V (battery) will be required to provide power to it.
 +
 ===== Software Design ===== ===== Software Design =====
 +=== Description of the Application Firmware ===
 +The application firmware is developed using the Arduino IDE, which provides support for ESP8266 microcontrollers. It leverages various third-party libraries to enable specific functionalities and streamline the development process.
  
  
-<note tip> +=== Development Environment ===
-Descrierea codului aplicaţiei (firmware):​ +
-  * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) +
-  * librării şi surse 3rd-party (e.g. Procyon AVRlib) +
-  * algoritmi şi structuri pe care plănuiţi să le implementaţi +
-  * (etapa 3) surse şi funcţii implementate +
-</​note>​+
  
-===== Rezultate Obţinute =====+The code is developed using the Arduino IDE, which supports ESP8266 microcontrollers.
  
-<note tip> +=== Third-Party Libraries ===
-Care au fost rezultatele obţinute în urma realizării proiectului vostru. +
-</​note>​+
  
-===== Concluzii =====+  * ESP8266WiFi:​ This library provides the necessary functions to connect to a Wi-Fi network. 
 +  * ESP8266HTTPClient:​ It allows making HTTP requests to send data to the server. 
 +  * WiFiClient: Provides the functionality to establish a Wi-Fi client connection. 
 +  * Wire: This library is used for I2C communication between the NodeMCU and the BME280 sensor and LCD display. 
 +  * Adafruit_BME280:​ Library for interacting with the BME280 sensor to read temperature,​ humidity, and pressure. 
 +  * LiquidCrystal_I2C:​ Library for controlling the LCD display using the I2C protocol.
  
 +=== Algorithms and Structures ===
 +
 +The firmware code implements various algorithms and data structures to ensure efficient data processing and handling.
 +
 +**Sensor Data Reading**:
 +  * The firmware utilizes algorithms provided by the Adafruit_BME280 library to read temperature,​ humidity, and pressure values from the BME280 sensor.
 +  * These algorithms employ specific calculations and calibration techniques to obtain accurate sensor readings.
 +**Data Transmission**:​
 +  * To send the collected sensor data to the server, the firmware implements an algorithm using the ESP8266HTTPClient library.
 +  * This algorithm establishes an HTTP connection and crafts the necessary POST request to transmit the data.
 +  * It ensures that the data is properly formatted and sent to the server for further processing.
 +**Communication Protocols**:​
 +  * The firmware uses the Wire library to facilitate I2C communication between the NodeMCU and the BME280 sensor and LCD display.
 +  * I2C (Inter-Integrated Circuit) is a widely used protocol for communication between integrated circuits.
 +  * The code leverages the I2C protocol to exchange data and commands between the microcontroller and these peripheral devices.
 +**Database Integration**:​
 +  * Although the specifics of the database implementation (MySQL) are handled outside the firmware code, certain data structuring and organization are considered.
 +  * The firmware structures the data received from the sensor into suitable data structures (e.g., arrays, objects) to ensure efficient storage and retrieval in the database.
 +  * Algorithms may be implemented to handle data formatting, conversion, and encoding as required by the database.
 +=== Integration with Django and MySQL ===
 +
 +In addition to the firmware code, the project also involves integration with MySQL and Django for data storage and web application development,​ respectively.
 +
 +**MySQL**:
 +The firmware code is designed to send sensor data to a MySQL database. To achieve this, the firmware code includes functionality to establish a connection with the MySQL server and send the collected sensor data using an HTTP POST request. The server-side script, written in PHP, receives the data and stores it in a MySQL database table.
 +
 +**Django**:
 +On the web application side, Django is used to develop a user interface for accessing and visualizing the stored sensor data. Django is a high-level Python web framework that follows the Model-View-Controller (MVC) architectural pattern. It provides a robust set of tools and features for rapid web application development.
 +
 +In the Django code, models are defined to represent the structure of the MySQL database table where the sensor data is stored. Views are implemented to handle user requests and retrieve data from the database. ​
 +
 +The integration between the firmware code, MySQL, and Django allows for real-time data collection from the sensor device and seamless storage and presentation of the data through a web application.
 +
 +By combining the firmware code with Django and MySQL, I could create a comprehensive system that collects, stores, and presents sensor data, providing valuable insights and facilitating further analysis.
 +
 +
 + ===== Results Achieved =====
 +
 +1. Sensor Data Acquisition:​
 +
 +'''​Result:'''​ Successful acquisition of temperature,​ humidity, pressure, and altitude data.
 +
 +'''​Description''':​ The weather station project successfully acquired data from the BME280 sensor, including temperature,​ humidity, pressure, and altitude. These readings provide valuable information for weather monitoring and analysis.
 +
 +2. Display Integration:​
 +
 +'''​Result:'''​ Successful integration of the LCD display to visualize sensor data.
 +
 +'''​Description:'''​ The project integrated an LCD display to visualize the acquired sensor data. The display effectively presented the temperature,​ humidity, pressure, and altitude readings, allowing users to easily view the current weather conditions.
 +
 +3. Wi-Fi Connectivity:​
 +
 +'''​Result:'''​ Successful establishment of a Wi-Fi connection for data transmission.
 +
 +'''​Description:'''​ The weather station project established a Wi-Fi connection, enabling the transmission of sensor data to a remote server. This connectivity allowed for real-time monitoring and remote access to weather information.
 +
 +4. Server Communication:​
 +
 +
 +'''​Result:'''​ Successful communication with the server to send sensor data.
 +
 +'''​Description:'''​ The project implemented functionality to send the acquired sensor data to a server. Through HTTP POST requests, the weather station transmitted the temperature,​ humidity, pressure, and altitude readings to the server for further processing and storage.
 +
 +5. Data Logging and Analysis:
 +
 +'''​Result:'''​ Successful logging and analysis of weather data.
 +
 +'''​Description:'''​ The weather station project implemented a server-side component, likely using Django, to receive and store the transmitted sensor data. 
 +
 +
 +{{ :​pm:​prj2023:​avaduva:​poza3.jpeg?​600 |}}{{ :​pm:​prj2023:​avaduva:​poza1.jpeg?​600 |}}{{ :​pm:​prj2023:​avaduva:​poza2.jpeg?​600 |}}{{ :​pm:​prj2023:​avaduva:​poza6.jpeg?​600 |}}{{ :​pm:​prj2023:​avaduva:​poza5.jpeg?​600 |}}{{ :​pm:​prj2023:​avaduva:​picture0.png?​600 |}}{{ :​pm:​prj2023:​avaduva:​poza4.jpeg?​600 |}}
 +===== Conclusion =====
 +In conclusion, the weather station project successfully utilized the NodeMCU ESP8266 microcontroller along with various components such as the BME280 sensor, LCD display, and Wi-Fi module to create a functional and efficient weather monitoring system.
 +
 +The NodeMCU acted as the central control unit, collecting temperature,​ humidity, pressure, and altitude data from the BME280 sensor. The acquired data was then displayed on the LCD screen, providing real-time weather information to users.
 +
 +With the integration of the Wi-Fi module, the weather station enabled remote access and data transmission capabilities. Users could remotely monitor the weather conditions by accessing the data through a server or a connected mobile device.
 +
 +Furthermore,​ the project demonstrated successful communication with the server, allowing for data logging and analysis. This feature facilitated the storage and retrieval of weather data, enabling users to track weather patterns and generate insights for further analysis.
 +
 +The weather station project showcased the power of combining hardware components and software programming to create a robust and user-friendly weather monitoring system. It provided a solid foundation for future enhancements,​ such as integrating additional sensors or expanding the system'​s capabilities through the use of advanced technologies like NFC or remote control via a Wi-Fi module.
 +
 +Overall, this weather station project offered a practical solution for monitoring and analyzing weather conditions, with potential applications in various settings such as personal weather tracking, agriculture,​ or environmental monitoring.
 ===== Download ===== ===== Download =====
 +In addition to the comprehensive description of the weather station project, I have prepared a zip file that contains all the necessary resources for a better understanding of the project. The zip file includes:
  
-<note warning>​ +**Code**The complete Arduino code that was used to program the NodeMCU ESP8266 microcontroller and control the weather station functionality.
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectuluisurse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-).+
  
-Fişierele se încarcă pe wiki folosind facilitatea ​**Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:pm:​prj20??:​c?​** sau **:​pm:​prj20??:​c?:​nume_student** (dacă este cazul)**Exemplu:​** Dumitru Alin331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. +**Printscreens**: A collection of printscreens showcasing the working weather stationThese images provide a visual representation of the projectincluding the LCD display showing real-time weather data and other relevant information.
-</​note>​+
  
-===== Jurnal =====+**Demo**: A demonstration video that highlights the functionality and features of the weather station. This video serves as a practical demonstration of the project in action, allowing you to see how the weather data is collected, displayed, and accessed remotely. 
 +<note important>​
  
-<note tip> +{{:​pm:​prj2023:​avaduva:​weatherstation_project_ion_sorana_elena_1222a_fils.zip|}}
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului.+
 </​note>​ </​note>​
  
-===== Bibliografie/Resurse ​=====+ 
 +===== Resources/References ​=====
  
 <​note>​ <​note>​
-Listă cu documente, datasheet-uriresurse Internet folositeeventual grupate pe **Resurse Software** şi **Resurse Hardware**.+Adafruit BME280 Library ​Official documentation and examples for interacting with the BME280 sensor using the Adafruit library. Available at: https://​github.com/​adafruit/​Adafruit_BME280_Library 
 + 
 +Arduino Official Website - The official website of Arduinoproviding documentationtutorials, and forums for Arduino programming and projectsAvailable at: https://​www.arduino.cc/​ 
 + 
 +ESP8266 Arduino Core - Documentation and resources for programming ESP8266 microcontrollers using the Arduino IDE. Available at: https://​github.com/​esp8266/​Arduino 
 + 
 +DHT Library - Library for reading temperature and humidity values from DHT sensors. Available at: https://​github.com/​adafruit/​DHT-sensor-library 
 + 
 +LiquidCrystal_I2C Library - Library for controlling LCD displays using the I2C protocol. Available at: https://​github.com/​johnrickman/​LiquidCrystal_I2C 
 + 
 +Arduino Project Hub - A project tutorial on creating an Arduino weather station. Available at: https://​projecthub.arduino.cc/​woutvdr/​arduino-weather-station-9dd87f 
 + 
 +YouTube Video Tutorial - A YouTube video tutorial demonstrating the construction and operation of an Arduino weather station. Available at: https://​www.youtube.com/​watch?​v=RLLH5Flbm1M&​t=224s 
 + 
 +Medium Article - A Medium article providing guidance on integrating Django with an existing MySQL database. Available at: https://​medium.com/​@kivaimuinde/​how-to-use-django-with-an-existing-database-mysql-8ff0e8446c2f 
 + 
 +GitHub Repository - A GitHub repository containing code for connecting an ESP8266 with OpenWeatherMap (OWM) API and displaying data on an I2C LCD. Available at: https://​github.com/​Wunderwaffez/​esp8266-owm-i2c 
 + 
 +YouTube Video Tutorial - A YouTube video tutorial demonstrating the implementation of a weather station using Arduino and NodeMCU. Available at: https://​www.youtube.com/​watch?​v=4b_yrbPLiLo&​ab_channel=CreativeStuff 
 + 
 +Instructables Tutorial - A detailed tutorial on how to make an Arduino weather station. Available at: https://​www.instructables.com/​How-to-Make-an-Arduino-Weather-Station/​ 
 + 
 +Hackster.io Tutorial - A tutorial on creating a weather station using Arduino and NodeMCU. Available at: https://​www.hackster.io/​tarantula3/​weather-station-using-arduino-and-nodemcu-d2b9d3 
 </​note>​ </​note>​
  
pm/prj2023/avaduva/weatherstation.1685298935.txt.gz · Last modified: 2023/05/28 21:35 by sorana_elena.ion
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