Skip to main content
Version: FILS English

PicoDeliver

A robotic message and small item delivery system

info

Author: Sofiia Huzhan
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-demesup

Description​

PicoDeliver is a robotic system that delivers messages and small items within a local area. Messages can be entered either through the device's display interface or via a web interface. The robot wanders around. When the recipient, and when they signal their presence through the website, the robot stops to deliver its payload.

Motivation​

I built this because robots are cool. There’s something satisfying about making a machine move, react to sensors, and follow commands. It’s like bringing code to life, and that never gets old.

But beyond just fun, I wanted something more personal than another phone notification. Why text my roommate "Where’s the charger?" when a little robot could deliver the message instead? It’s playful, practical, and a great way to learn.

Architecture​

System Architecture Diagram

1. Raspberry Pi Pico (Pico #1)​

Role: Main microcontroller (brains of the operation)

Interfaces:

  • GPIO (Digital I/O)
  • SPI (for display)
  • WiFi (TCP communication)

Functions:

  • Reads inputs from sensors (IR, ultrasonic, buttons)
  • Controls motors through the motor driver
  • Displays data on the SPI screen
  • Communicates with a web application

Connections:

  • GPIO β†’ Motor Driver (control signals)
  • GPIO ← IR Proximity Sensors, Ultrasonic Sensor, Buttons
  • SPI β†’ Display
  • WiFi ↔ Web App (bidirectional)
  • Power Input ← Battery (5V via Power Supply Module)

2. Motor Driver (L298N or compatible)​

Role: Amplifies control signals to drive motors

Interface:

  • GPIO (from Pico)
  • Vin (12V power input)
  • Motor output channels

Functions:

  • Converts low-power signals into high-current motor commands
  • Controls motor direction and speed

Connections:

  • GPIO ← Pico (control pins)
  • Vin ← Battery (12V power input)
  • Output β†’ Left and Right Motors

3. IR Proximity Sensors (Left, Right and Rear)​

Role: Detects nearby objects for navigation or avoidance

Interface: GPIO

Functions:

  • Emits IR light and senses reflections
  • Provides distance indication

Connections:

  • Signal β†’ Pico GPIO
  • Power and Ground β†’ Power Supply

4. Ultrasonic Sensor (HC-SR04)​

Role: Measures distance to obstacles

Interface: GPIO (trigger and echo pins)

Functions:

  • Sends ultrasonic pulse and receives echo
  • Calculates distance based on echo time

Connections:

  • Trigger β†’ Pico GPIO
  • Echo ← Pico GPIO

5. Buttons (Red and Blue)​

Role: Manual input for control

Interface: GPIO (digital)

Functions:

  • Allows easier interction with the robot

Connections:

  • Signal β†’ Pico GPIO

6. Display (SPI)​

Role: Provides visual feedback

Interface: SPI (MOSI, SCK, CS)

Functions:

  • Displays sensor values, status indicators, menus, keyboard

Connections:

  • SPI Lines ← Pico

7. Web App​

Role: Enables remote control and monitoring

Interface: WiFi (TCP/IP)

Functions:

  • Sends control commands to Pico
  • Receives real-time sensor data

Connections:

  • WiFi ↔ Pico (TCP communication)

8. Power Supplies​

  • Pico: Powered by a battery via Power Supply Module
  • Motor Driver: Powered directly from 9V + 4Γ—1.5V batteries

Log​

Week 5 - 11 May​

After receiving the components, I tested their functionality and researched compatible software libraries for my hardware setup. Once verified, I proceeded with system design.

Week 12 - 18 May​

Focused on implementing the remote control functionality and integrating it with the display system. Developed the basic logic for the menu navigation and began working on the on-screen keyboard, including input handling and layout structuring.

Week 19 - 25 May​

Focused on putting everything together: updated all layouts, verified that TCP communication works correctly, and made sure async tasks run smoothly without issues. Focus was on ensuring the system behaves as expected during integration.

Hardware​

Component Details​

  • Raspberry Pi Pico 2W: The brain of the operation, running all control logic
  • DC Motors: 4 gearmotors providing wheel movement (2 per side)
  • L298N Driver: Powers and controls motor speed/direction
  • Infrared Sensors: Left/right/rear obstacle detection (reflectance sensors)
  • Ultrasonic Sensor: Front-facing distance measurement (2cm-400cm range)
  • TFT Display: 2.4" color screen with touch input for user interface
  • Buttons: Physical input for selection
  • Dupont Wires: Jumper cables for all electrical connections
  • Chassis: Frame holding all components
  • Power Supply Module: 9V battery to 5V regulator, powers up the components
  • Motor Power Supply: Direct 9V battery connection(with 4Γ—1.5V battery pack as boost power)

Schematics​

Here is the KiCad schematics. On the schematics Power Supply Module is denoted as +5V for simplicity

Bill of Materials​

DeviceUsagePrice
Raspberry Pi Pico 2W *2Microcontroller board39.66 RON each (79.32 RON total)
DC Motor (Γ—4)Wheel drive motors~7 RON each (28 RON total)
L298N Dual Motor Driver ModuleMotor control10.99 RON
Infrared Obstacle Sensor (Γ—3)Object detection3.49 RON each (10.47 RON total)
HC-SR04 Ultrasonic SensorDistance measurement6.49 RON
10cm Dupont Wires (40-pin)Short connections5.17 RON
20cm Dupont Wires (40-pin)Long connections5.99 RON
2.4" SPI TFT DisplayUser interface47.99 RON
Buttons(Γ—2)Option selection1.99 RON each (3.98 RON total)
ChasisBase for the robot30 RON
Power Supply ModulePower Supply4.69 RON

Software​

LibraryDescriptionUsage
embassy-rpRP2040 HAL and Embassy supportHardware abstraction, peripheral and SPI management, async runtime
embassy-embedded-halEmbedded HAL traits and utilitiesProvides hardware abstraction traits for Embassy
embassy-syncAsync synchronization primitivesMutexes, signals, and shared state between async tasks
embassy-executorAsync/await executor for embeddedRuns async tasks and manages concurrency
embassy-futuresUtilities for async/await and futuresUsed for select, join, and other async combinators
embassy-timeTimekeeping, delays, and timersDelays, timeouts, and scheduling
embassy-netEmbedded network stackHandles TCP/UDP networking and DHCP for WiFi
cyw43WiFi chip driverProvides WiFi connectivity for the RP2040
defmt, defmt-rttLogging and debug outputEfficient logging for embedded systems
cortex-m-rtCortex-M runtime supportStartup and interrupt vector table
panic-probePanic handler for probe-runHandles panics and outputs debug info
embedded-graphics2D graphics libraryDrawing UI elements on the display
display-interface-spiSPI interface for displaysSPI communication with the ILI9341 display
display-interfaceDisplay interface abstractionUsed by display drivers
heaplessFixed-capacity data structuresUsed for message buffers and queues
embedded-hal-1Embedded HAL traitsHardware abstraction for drivers
embedded-io-asyncAsync IO traitsAsync communication with peripherals
static_cellStatically allocated runtime-initialized cellUsed for safe static initialization of peripherals
embedded-storageTraits for non-volatile storageAccess to non-volatile storage
ili9341ILI9341 display driverControls the TFT display
xpt2046XPT2046 touchscreen driverHandles touchscreen input
embassy-lab-utilsProject-specific utilitiesShared helpers and abstractions for this project
  1. Inspiration: Delievery robots