Weather station project, which allows to measure basic weather conditions, like temperature, humidity and pressure. The project also includes handmade anemometer, based on rotary encoder. Read data is transmitted in real-time to LCD display.
The program for STM32F4 is written in C, built with GCC compiler and downloaded to the board via OpenOCD.
- STMicroelectronics STM32F407G-DISC1 board
- Waveshare LCD TFT 1,8'' 128x160px Display - 3,3V
- Waveshare BME280 - humidity, temperature and pressure I2C sensor - 3,3V
- Grove - mouse rotary encoder - 3,3V
- Base code for STM32F4 was generated by STM32CubeMX (version 4.27.0)
- JetBrains CLion IDE 2019.1 was used for programming
- Prusa 3D printer was used to print anemometer cups
To run the program you need to have all the modules connected to the STM32F4 board as stated below:
LCD_DIN | LCD_CLK | LCD_CS | LCD_DC | LCD_RST | SENSOR_SLC | SENSOR_SDA | ENC_SIGB | ENC_SIGA | |
---|---|---|---|---|---|---|---|---|---|
PIN | PA7 | PA5 | PB5 | PA8 | PA9 | PB6 | PB7 | PE11 | PE9 |
You can also see the whole pinout of the project by opening WeatherStation.ioc
file in STM32CubeMX.
Afterwards, you just have to compile the program and transfer it to the board.
To compile the program you need to clone this repository using either System Workbench for STM32 or CLion and build project.
In case of using CLion you have to have GNU Toolchain and OpenOCD installed and configured on your computer. For more info how to configure CLion and system click here.
- Bluetooth connection with smartphone using dedicated Android app to transmit data from sensors
- Use of higher quality encoder and bigger anemometer cups to ensure more reliable wind speed data
- STM32 HAL-based library for ST7735 displays by Afiskon: https://github.com/afiskon/stm32-st7735
- Driver for BMP280 and BME280 absolute barometric pressure sensors by sheinz: https://github.com/sheinz
The project is released under the MIT license.
Adrian Glapiński
Marta Tarka
The project was conducted during the Microprocessor Lab course held by the Institute of Control and Information Engineering, Poznan University of Technology.
Supervisor: Adam Bondyra