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.
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
-
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.
-
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.
-
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.
-
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.
-
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.
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico W | The microcontroller with Wi-Fi capability, used for managing sensors and network communication. | 35 RON |
DS18B20 Temperature Sensor | Digital temperature sensor for accurate room temperature measurements. | 3,32 RON |
1602 LCD Module | A simple LCD display for showing temperature readings locally. | 18 RON |
Common Cathode RGB LED | RGB LED to indicate temperature range through color changes. | 1 RON |
Breadboard | A platform for temporary prototyping and experimenting without soldering. | 9,98 RON |
Jumper Wires | Used 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 Kit | Various resistors for current limiting for the LED and pull-up resistor for the temperature sensor. | 14,99 RON |
DAC MCP4725 Module with I2C Interface | Integrated circuits designed to store relatively small amounts of data but allowing individual bytes to be electrically erased and reprogrammed. | .9,52 RON |
Software
Library | Description | Usage |
---|---|---|
rp2040-hal | Hardware Abstraction Layer for Raspberry Pi Pico | Provides access to the hardware features of the Raspberry Pi Pico W, simplifying tasks like GPIO management, ADC input, and PWM output. |
one-wire | Rust implementation of the OneWire protocol | Manages communication with the DS18B20 temperature sensor to retrieve accurate temperature measurements. |
warp | A web server framework for Rust | Serves the web application that displays real-time and historical temperature data, managing requests and routing in the backend. |
embassy-rs | Asynchronous runtime for embedded devices | Used to facilitate non-blocking, concurrent firmware development, handling all device peripherals and networking with ease and safety. |