Skip to main content

Kalman Temperature Alert System

Temperature alert system using the Kalman Filter for perfect accuracy

info

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

Architecture diagram

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.

Picture Picture

Schematic

Schematic

Bill of Materials

DeviceUsagePrice
Rapspberry Pi PicoThe microcontroller39 RON
BreadboardMain board0 RON(Already had this)
LCD 1602 with I2C InterfaceDisplay16,34 RON
Pressure sensor Barometric BMP280 GYPressure Sensor8,49 RON
BuzzerBuzzer0 RON (Already had this)
4 Mother-Father wires 30 cmConnectors0 RON(Already had this)
6 Father-Father wiresConnectors0 RON(Already had this)
Cooler 80mmCooler10,83 RON

Software

LibraryDescriptionUsage
embassy-rpEmbassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 microcontrollerUsed for initializing hardware devices such as the Display, Buzzer, Fan and Sensor.
embassy-embedded-halCollection 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-timeInstant and Duration for embedded no-std systems, with async timer supportStops code execution for a predefined time period
embassy-executorasync/await executor designed for embedded usageUsed for spawning/tasking asynchronous functions like main and tasking functions like logger-task
lcd1602-driverAn embedded-hal based driver for the LCD1602 displayUsed for defining and customizing display's traits and features
heaplessstatic friendly data structures that don't require dynamic memory allocationUsed for defining vectors and for variables unsigned to String conversion
  1. LED Matrix
  2. Obtain Temperature Data from Raspberry Pi Pico
  3. Controlling an I2C Display with Arduino
  4. Heat Activated Cooling Fan
  5. Kalman Filter