Skip to main content
Version: ACS CC

SafeDelivery

A smart package security system to monitor and verify package integrity during transport

info

Author: Sebastian Stefan Bahrin

GitHub Project Link: [link_to_github]

Description

SafeDelivery is an intelligent system for securing package transport, built with Raspberry Pi Pico 2W. The device monitors the physical conditions of a package during transport and detects opening attempts, rough handling, or abnormal positioning. The system logs all these events to a microSD card, allowing recipients to verify if the package was properly handled throughout delivery.

Motivation

The inspiration for this project came from my personal experiences with damaged deliveries and the frustrating uncertainty of not knowing whether valuable items were mishandled before they reached me. By creating an affordable, reliable monitoring system, SafeDelivery empowers both senders and recipients with irrefutable evidence of a package's treatment during transit.

Beyond individual consumers, this technology has significant implications for industries shipping sensitive, fragile, or high-value items such as medical supplies, electronics, or artwork. SafeDelivery represents not just a technical solution but a step toward greater accountability in global logistics chains.

Architecture

Main Components:

  1. Sensor Array - Multiple sensors that monitor different aspects of package integrity:

    • Light sensor (LDR) for detecting package opening
    • Vibration sensor (SW-420) for detecting rough handling
    • Reed switch with magnets for detecting seal breakage
    • IMU sensor (MPU6050) for detecting orientation and position changes
  2. Processing Unit - Raspberry Pi Pico 2W processes all sensor inputs and makes decisions

  3. Storage System - microSD card with SPI adapter for logging all events with timestamps

  4. Notification System:

    • OLED display showing package status
    • LED indicator (green = intact, red = tampered)
    • Active buzzer for audible alerts
  5. Power Management - Battery system for autonomous operation

Connection Diagram:

System Diagram

TBA

Log

Week 5 - 11 May

TBA

Week 12 - 18 May

TBA

Week 19 - 25 May

TBA

Hardware

The project uses the Raspberry Pi Pico 2W as its central microcontroller, which offers Wi-Fi connectivity, low power consumption, and sufficient GPIO pins for all sensors. The sensor array includes an LDR for light detection, SW-420 for vibration sensing, reed switches with magnets for tamper detection, and an MPU6050 IMU for orientation monitoring. Visual feedback is provided through an OLED display and status LEDs, while a buzzer provides audible alerts. All events are logged to a microSD card via SPI interface.

Schematics

TBA

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe main microcontroller that manages all sensors and logs events40 RON
Light Sensor (LDR)Detects if the package has been opened (light exposure)5 RON
Vibration Sensor (SW-420)Detects shocks, movements, or violent handling of the package5 RON
Reed Switch + MagnetsDetects if the package lid has been opened (magnetic seal broken)20 RON
IMU Sensor (MPU6500)Monitors orientation, detects abnormal tilting or positioning13 RON
LCD de 1.44''Displays package status (intact/tampered) and stores all recorded events for later verification with the SD card40 RON
GPS ModuleProvides real-time location tracking of the package, allowing you to monitor its journey and verify if it has deviated from the intended route60 RON
BatteryProvides autonomous power during transport20 RON
Case / BoxSimulates the sealed package in which sensors are mountedFound at home

Software

LibraryDescriptionUsage
embassyAsynchronous embedded framework for RustCore framework for running async tasks on the Raspberry Pi Pico 2W
embassy-rpEmbassy HAL for RP2040Hardware abstraction layer for the Raspberry Pi Pico 2W
embedded-halHardware Abstraction Layer (HAL) traitsProvides unified interfaces for hardware drivers
embedded-graphics2D graphics libraryUsed for drawing to the OLED display
ssd1306Rust driver for SSD1306 OLED displaysControls the 0.96" OLED display
mpu6050Rust driver for MPU6050Interfacing with the IMU sensor
shared-busBus sharing for embedded RustSharing I2C/SPI buses between multiple devices
embedded-sdmmcSD/MMC card accessManaging log files on the microSD card
defmtLogging framework for embedded devicesDebugging and development logging
chronoDate and time libraryCreating timestamps for event logging
  1. I2C
  2. WIFI