Skip to main content

House Thermometer

The House Thermometer project uses a Raspberry Pi Pico W to measure indoor temperatures, visually display data and enable remote monitoring and data analysis.

info

Author: Grec Carina-Gabriela
GitHub Project Link: https://github.com/UPB-FILS-MA/project-carinagrec

Description

House thermometer capable of displaying the current room temperature on an LCD display for immediate local access, as well as on a web application for remote monitoring. The system uses a digital temperature sensor for accurate measurements and features an RGB LED that changes color based on temperature ranges, enhancing visual feedback. Also, it has an external memory to keep track of the temperatures from the last hours and display the average value.

Motivation

I chose this project because it seems like a pretty practical idea in the day-to-day life that can be implemented. It's a mix from multiple topics that we studied and i can also implement extra knowledge such as the EEPROM

Architecture

Connectivity and Interactions

  1. Sensor Interface → Data Processing and Logic Unit:

    • The sensor interface reads temperature data.
    • This data is then sent to the data processing unit, where it is logged and processed for further actions.
  2. Data Processing and Logic Unit → Display Controller:

    • Processed data, including current temperatures and system statuses, is forwarded from the data processing unit to the display controller.
    • The display controller provides real-time visualization of the data.
  3. Data Processing and Logic Unit → LED Controller:

    • Based on the temperature data, the data processing unit issues commands to the LED controller.
    • The LED controller adjusts the LED's color and brightness according to the temperature conditions.
  4. Data Processing and Logic Unit ↔ Network Interface:

    • The network interface functions as a gateway, facilitating communication between the web server and the data processing unit.
    • It allows the data processing unit to send temperature data to the web server and receive commands from the web application.
  5. Network Interface ↔ Web Application:

    • The web application interacts with the network interface to transmit user commands and receive data for display.
    • This includes adjusting settings, monitoring real-time temperature updates, and accessing historical data logs.

Architecture

Log

Week 6 - 12 May

Week 7 - 19 May

Week 20 - 26 May

The main idea of the project was to create a house thermometer to read the room temperature. Throughout the development, ideas changed based on the difficulties that i had to overcome. For this, i had to use a DS18B20 sensor connected to the Raspberry Pi Pico WH by the wire and a resistor. In addition to this, i connected 3 leds, each with a different utility: a green one that always turns on when the Raspberry is working, a blue one tha turns on only when the temperature is lower than 20 degrees Celsius and a red one that only turns on when the temperature is greater than 20 degrees Celsius. In teh end i didn't manage to connect the volatile memory or the screen to display the temperature because i ended up creating a website that automatically displays the temperature, the state of the led and also updates. To buils and flash the code, i had to do the following steps: cargo build --target thumbv6m-none-eabi --release and elf2uf2-rs -d -s .\target\thumbv6m-none-eabi\release\house_thermometer

Hardware

  1. Raspberry Pi Pico W

    • A compact microcontroller board featuring the RP2040 chip and built-in Wi-Fi connectivity.
    • Manages data collection from the temperature sensor, drives the display, controls the RGB LED, and handles network communications.
  2. DS18B20 Temperature Sensor

    • A digital temperature sensor that provides 9-bit to 12-bit Celsius temperature measurements.
    • Known for its accuracy and ease of integration, it operates over a one-wire bus that requires only one data line (and ground) for communication with the Raspberry Pi Pico W.
  3. 1602 LCD Module

    • A 16x2 character LCD display that is simple and effective for displaying text and numerical data.
    • Interfaced via the I2C communication protocol, which simplifies the connection by using just two wires for data transmission.
  4. Common Cathode RGB LED

    • A small and efficient multi-color LED capable of displaying various colors by mixing red, green, and blue.
    • Each color component can be controlled independently using PWM signals to create different colors.
  5. Breadboard and Jumper Wires

    • Ideal for prototyping without soldering, useful for testing and adjusting the circuit layout during development.
    • Jumper wires facilitate connections between the components on the breadboard.
  6. Resistors

    • Used for current limiting and voltage division.
    • Crucial for protecting components like the RGB LED and ensuring correct signal levels are applied to inputs.

Schematics

KiCad Schematics1 Schematics2

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller with Wi-Fi capability, used for managing sensors and network communication.35 RON
DS18B20 Temperature SensorDigital temperature sensor for accurate room temperature measurements.3,32 RON
1602 LCD ModuleA simple LCD display for showing temperature readings locally.18 RON
Common Cathode RGB LEDRGB LED to indicate temperature range through color changes.1 RON
BreadboardA platform for temporary prototyping and experimenting without soldering.9,98 RON
Jumper WiresUsed to connect components on the breadboard.7,99 RON
Header de pini alb 2.54 mm (40p)This white single-row male 40 copper pin header can be broken into smaller strips with the use of a wire cutter, in order to fit your desired application. It is an ideal connector for integrated circuit and PCB boards.0,99 RON
Resistor KitVarious resistors for current limiting for the LED and pull-up resistor for the temperature sensor.14,99 RON
DAC MCP4725 Module with I2C InterfaceIntegrated circuits designed to store relatively small amounts of data but allowing individual bytes to be electrically erased and reprogrammed..9,52 RON

Software

LibraryDescriptionUsage
rp2040-halHardware Abstraction Layer for Raspberry Pi PicoProvides access to the hardware features of the Raspberry Pi Pico W, simplifying tasks like GPIO management, ADC input, and PWM output.
one-wireRust implementation of the OneWire protocolManages communication with the DS18B20 temperature sensor to retrieve accurate temperature measurements.
warpA web server framework for RustServes the web application that displays real-time and historical temperature data, managing requests and routing in the backend.
embassy-rsAsynchronous runtime for embedded devicesUsed to facilitate non-blocking, concurrent firmware development, handling all device peripherals and networking with ease and safety.
  1. Get the weather in real time
  2. Raspberry Pi Pico
  3. How to build a web project using Rust
  4. Temperature Sensor Tutorial
  5. OLED display for Raspberry Pi Pico