
Smart Packaging
IoT-enabled smart packaging system built on an STM32 Nucleo-64 microcontroller. Integrates environmental sensors over SPI/I²C, transmits telemetry wirelessly, and runs a bare-metal firmware stack optimized for low-power operation. 3rd-place winner at the national STMicroelectronics "Costruisci il Futuro con STM32ODE" contest.

Smart Packaging adds an embedded intelligence layer to physical product packaging. The system is built around an STM32 Nucleo-64 (F401RE) microcontroller running bare-metal firmware written in Embedded C. An array of sensors — temperature, humidity, and shock/tilt — is acquired over SPI and I²C buses, processed on-device, and transmitted wirelessly to a receiver node. The firmware implements a lightweight state machine that governs sensor polling intervals, threshold-based alert generation, and radio duty-cycling to minimize average current draw. All sensor data is time-stamped and encoded in a compact binary frame before transmission, making the payload suitable for low-bandwidth radio protocols.

Fitting a fully functional embedded system — microcontroller, sensors, radio module, and power regulation — into the physical footprint of standard packaging was the central hardware constraint. Every component choice had to balance power budget, form factor, and BOM cost simultaneously. On the firmware side, the bare-metal environment meant implementing all peripheral drivers from scratch: custom SPI and I²C HAL routines, interrupt-driven UART for debug output, and a low-power sleep/wake scheduling loop using the STM32 RTC peripheral. Achieving reliable wireless transmission within the RF-unfriendly environment of a dense packaging material required antenna placement experimentation and careful RF signal budget analysis.
The project earned 3rd place at the national STMicroelectronics "Costruisci il Futuro con STM32ODE" contest, competing against teams from across Italy. The final prototype demonstrated stable multi-sensor acquisition at configurable polling rates, reliable wireless telemetry, and sustained battery operation well within the competition's runtime requirement — all packaged into a compact enclosure that fit inside a standard product box.