Weather Forecast Station
A weather station is a device or system used to measure and collect data about various atmospheric conditions and environmental factors. It includes sensors that monitor parameters such as temperature, humidity, air pressure, wind speed, rainfall, and solar radiation. By gathering this data, weather stations provide valuable information for weather analysis, forecasting, and climate monitoring.
Weather stations can be used in various settings, such as homes, schools, farms, research facilities, and meteorological organizations. They serve different purposes, such as personal weather monitoring, agricultural management, scientific research, and weather prediction.
Modern weather stations often employ advanced technology and wireless connectivity, allowing for real-time data transmission. This enables remote monitoring and access to weather information from anywhere with an internet connection. Some weather stations are integrated with online platforms and mobile apps, providing user-friendly interfaces to access and analyze the data.
Let’s Start doing the project:
The project utilizes components such as the
- STM32F103 Blue Pill board
- DHT11 temperature and humidity sensor
- soil moisture sensor
- 16×2 LCD
- ESP8266 Wi-Fi module, and other necessary components.
To power the STM32 board, a 5V battery or DC adapter can be used, while the ESP8266 module requires a voltage of 3.3V to 3.6V. A potential divider circuit is employed to convert the 5V to 3.6V using two silicon diodes (D3 and D4) and a 1k resistor connected in series. The voltage drop across the diodes (0.7V each) and the resistor results in a 1.4V drop, allowing for a 3.6V output.
The DHT11 sensor is used to measure temperature and humidity. It features an in-built NTC thermistor for temperature measurement and an 8-bit microcontroller that communicates the temperature and humidity values using a one-wire protocol. The sensor has a single data pin, minimizing the number of pins required on the microcontroller side. It comes factory calibrated and easily interfaces with a microcontroller.
To upload the weather data to the ThingSpeak IoT platform, the following steps are required:
- Create a ThingSpeak.com account and log in / sign in.
- Click on “Get Started” to proceed.
- Go to the Channels menu and select “New Channel.”
- Fill in the form with the desired Name, Description, and information for Fields 1, 2, and 3 (Temperature, Humidity, and Soil Level). Check the boxes next to each field.
- Enable the “Make Public” option to allow public access to the channel data.
- Save the channel.
- Navigate to the API Keys tab and copy the Write API key, which needs to be inserted into the code as
char *api_key
. - Under the sharing options, select “Share channel view with everyone” to configure the channel in public mode, enabling global access to the weather station’s data.
The weather station data, including temperature, humidity, and soil moisture, will be displayed on the ThingSpeak dashboard.
Additionally, the Thingview Android app, available on the Google Play store, allows for viewing the data on an Android mobile phone. You can download the app using the following link: https://play.google.com/store/apps/.
For programming the STM32 board, the Arduino IDE is recommended due to its user-friendly interface and extensive library support. Since the STM32 Blue Pill development board lacks an Arduino IDE-compatible bootloader, it needs to be programmed via the micro USB port. The bootloader can be flashed onto the STM32 board, enabling direct uploading through the micro USB port.
To set up the Arduino IDE for the STM32 (Blue Pill) board, follow these steps:
- Download and install the Arduino IDE, ensuring you select the appropriate version for your operating system.
- Open the Arduino IDE and go to File -> Preferences.
- In the Preferences dialog box, paste the following link into the “Additional Boards Manager URLs” field: http://dan.drown.org/stm32duino/.
- Click OK to save the changes.
- Open the Boards Manager by going to Tools -> Boards -> Board Manager.
- Search for “STM32F103C” in the Boards Manager dialog box and install the corresponding package.
- After installation, go to Tools -> Board and select “Generic STM32F103C series.” Ensure that the variant is “64k Flash” and
Leave a Reply