Skip to main content
Version: FILS English

Smart Pantry Bin (Inventory & Precision Measurement System)

An Intelligent Storage Container for dry ingredients featuring dynamic weighing, custom quality monitoring, and Bluetooth connectivity.

info

Author: Banu Alexandru Cristian
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-banul27

Description

The Smart Pantry Bin is an active kitchen tool designed to manage and preserve dry ingredients like coffee, sugar, or flour. Unlike a passive container, this system uses a load cell to function as a real-time kitchen scale, detecting exact amounts removed, and continuously monitors inventory levels. It also tracks environmental humidity to ensure ingredient quality, sending all data and alerts to a mobile application via Bluetooth.

Motivation

I chose to build the Smart Pantry Bin because food waste and inefficient kitchen organization are common household problems. Often, we forget about basic ingredients (like flour, sugar, or rice) until we run out or they expire.

By integrating a weighing system and environmental sensors, this project aim to:

  • Automate Inventory: Monitor the exact amount of remaining stock without manual checks.
  • Ensure Food Safety: Track humidity and temperature levels to prevent spoilage.
  • Smart Integration: Provide real-time data via Bluetooth, turning a simple storage container into an intelligent kitchen assistant.

Architecture

The system consists of four main functional blocks:

  • Precision Sensing Engine: Interfaces with the HX711 24-bit ADC to process raw signals from the load cell into stable weight measurements, calculating deltas for "Kitchen Scale Mode".

  • Environmental Monitor: Reads data from the AHT21 sensor via I2C and compares current humidity against product-specific thresholds.

  • Communication Hub: Serializes weight, humidity, and alert status into data packets sent via UART to the HC-05 Bluetooth module for mobile synchronization.

  • Local Interface: Manages the 0.96" OLED display using the ssd1306 crate to provide immediate visual feedback without needing a phone.

System Architecture Diagram

Log

Week 3-4

Researched various project ideas focused on smart home automation. After deciding on a Smart Pantry Bin, I began researching the precision requirements for load cells and the low-power capabilities of the STM32U5 series. I finalized the list of components, ensuring compatibility between the 3.3V logic of the Nucleo board and the sensors (HX711, AHT21, HC-05).

Week 6

The components arrived. I started individual hardware validation by testing the STM32U575RE-Q Nucleo board and ensuring the Rust toolchain (probe-rs) correctly identifies the target. I performed a basic continuity test on the breadboard and verified the 0.96" OLED display using a simple I2C scanner script to confirm the address.

Week 8-9

Started the core software implementation. I initialized the Embassy async runtime on the STM32U5 and set up the I2C and UART peripherals. I began implementing the driver logic for the HX711 to convert raw differential signals into weight data. Additionally, I designed the initial hardware layout on the breadboard, focusing on minimizing signal noise for the load cell to ensure accurate measurements.

Hardware

The project is based on the STM32U575RE-Q (Nucleo-64), an ultra-low-power ARM Cortex-M33 microcontroller. It uses a 5kg Load Cell with an HX711 amplifier for precision weighing, and an AHT21 sensor for humidity/temperature monitoring. Connectivity is handled by an HC-05 Bluetooth module. The system is powered by a 6xAA battery holder via the DC Jack for portability.

Schematics

TODO

Bill of Materials

DeviceUsagePrice
STM32U575RE-Q (Nucleo-64)Main MicrocontrollerBorrowed (University)
HX711 Weight Sensor ModuleLoad cell amplifier / ADC7.00 RON
AHT21 Humidity & Temp SensorEnvironmental monitoring7.00 RON
5kg Load CellWeight sensing10.00 RON
HC-05 Bluetooth ModuleWireless data transmission30.00 RON
0.96" OLED I2C DisplayLocal UI feedback22.00 RON
6xAA Battery HolderPortable power supply6.00 RON
Breadboard + Jumper WiresPrototyping25.00 RON

Software

LibraryDescriptionUsage
stm32u5xx-halHardware Abstraction LayerGPIO, I2C, UART and Power management
hx71124-bit ADC DriverReading weight data from the load cell
aht20AHT20/21 Sensor DriverReading humidity and temperature data
ssd1306OLED Display DriverRendering text and graphics to the I2C display
embedded-graphics2D graphics libraryDrawing icons and status bars on the OLED
nbNon-blocking I/OManaging asynchronous UART for Bluetooth
  1. STM32U5 Series Reference Manual
  2. Rust Embedded Book
  3. HX711 Arduino/Embedded Tutorial & Calibration Logic
  4. Tutorial: Building a Digital Scale with Load Cells
  5. STM32U5 Ultra-Low Power Introduction