Kalman Temperature Alert System
Temperature alert system using the Kalman Filter for perfect accuracy
Author: Fotescu Maria-Irina, Economu Teo-Antonio
GitHub Project Link: https://github.com/UPB-FILS-MA/project-economuteo
Description
We are looking to have a clock that presents the current time and the temperature on a LCD 1602 which has an I2C interface. We will set a certain threshold on the sensor. If the temperature surpases this limit, the buzzer will start ringing and the cooler will try to cool down the sensor in order to bring the temperature back to optimal levels. In order for us to be informed about the temperature increase, the display will show a warning message and the buzzer will start ringing once the threshold is reached. For a very accurate measurement, we are going to use the Kalman Filter.
Motivation
We are both loving mathematics, so the idea of combining complex mathematics with the Rust language and all the hardware part really drives us and keeps us going forward in pursuing an amazing project.
Architecture
Log
Week 6 - 12 May
This week, we focused on finalizing the hardware setup for our Rust project. We faced several challenges, particularly in aligning the components correctly and ensuring stable connections. Despite these obstacles, we successfully completed the hardware assembly and we made sure that each component functions properly. The temperature sensor and fan were tested individually to ensure they responded as expected. By the end of the week, we had a fully assembled hardware setup ready for integration with the software phase.
Week 7 - 19 May
So far, we managed to do everything related to the hardware part and almost finding a way to fix the display on the 3D print. On the journey to finish this milestone we've faced some difficulties when it came to realizing a perfect scheme in Thinkercad, but in the end we managed to do it not just on point, but also with the fan perfectly centered above the temperature sensor so the cooling part it's made as efficient as possible.
Week 20 - 26 May
This week, we transitioned from the hardware phase to the software phase for our Rust project. Our main focus was on setting up the development environment and beginning to write the initial codebase. We encountered some initial challenges in configuring the software to interact with the hardware components, particularly with the temperature sensor and the fan. After some troubleshooting and debugging, we made significant progress. By the end of the week, we had a basic version of the software running, which successfully reads data from the temperature sensor and controls the fan speed accordingly. Our next steps will involve refining the software, adding more features, and test everything to ensure it works seamlessly.
Hardware
Short description
The hardware utilized includes a Raspberry Pi Pico microcontroller, a breadboard as the main board, an LCD 1602 with I2C Interface for display, a Barometric BMP280 GY pressure sensor, a buzzer, and various connectors along with an 80mm cooler.
Gallery
Schematic
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico | The microcontroller | 39 RON |
Breadboard | Main board | 0 RON(Already had this) |
LCD 1602 with I2C Interface | Display | 16,34 RON |
Pressure sensor Barometric BMP280 GY | Pressure Sensor | 8,49 RON |
Buzzer | Buzzer | 0 RON (Already had this) |
4 Mother-Father wires 30 cm | Connectors | 0 RON(Already had this) |
6 Father-Father wires | Connectors | 0 RON(Already had this) |
Cooler 80mm | Cooler | 10,83 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rp | Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 microcontroller | Used for initializing hardware devices such as the Display, Buzzer, Fan and Sensor. |
embassy-embedded-hal | Collection of utilities to use embedded-hal and embedded-storage traits with Embassy. | Dependency of embassy-rp used for adding embedded-hal traits to embassy |
embassy-time | Instant and Duration for embedded no-std systems, with async timer support | Stops code execution for a predefined time period |
embassy-executor | async/await executor designed for embedded usage | Used for spawning/tasking asynchronous functions like main and tasking functions like logger-task |
lcd1602-driver | An embedded-hal based driver for the LCD1602 display | Used for defining and customizing display's traits and features |
heapless | static friendly data structures that don't require dynamic memory allocation | Used for defining vectors and for variables unsigned to String conversion |