← Back to Projects
IoT & Embedded

Smart Shopping Cart

RFID-based intelligent shopping cart with real-time inventory tracking and seamless Bluetooth checkout via PyQt desktop application

STM32 RFID Bluetooth Python PyQt5 Embedded C

Project Overview

The Smart Shopping Cart revolutionizes the retail shopping experience by integrating RFID technology with modern IoT connectivity. Built around the STM32 microcontroller, this system enables automatic product detection, real-time price calculation, and wireless checkout, eliminating traditional checkout queues.

The project demonstrates seamless integration between embedded hardware, wireless communication, and desktop application development, creating a complete end-to-end retail automation solution.

Key Features

📡

RFID Detection

Automatic product identification using RFID tags with instant cart updates

💰

Real-time Billing

Continuous price calculation and running total display on LCD screen

📱

Bluetooth Link

Wireless data transmission to desktop checkout application via HC-05 module

🖥️

Desktop Interface

Professional PyQt5 application for checkout management and receipt generation

System Architecture

Hardware Components

  • Microcontroller: STM32F103C8T6 (ARM Cortex-M3)
  • RFID Module: RC522 (13.56 MHz) for product detection
  • Display: 16x2 I2C LCD for cart summary
  • Bluetooth: HC-05 module for wireless communication
  • Power Supply: 12V rechargeable battery pack
  • Additional: Buzzer for feedback, LEDs for status indication

Software Stack

  • Firmware: STM32 HAL library with custom drivers
  • Desktop App: Python with PyQt5 for GUI
  • Database: SQLite for product inventory management
  • Communication Protocol: Custom UART-based data packets

Technical Implementation

Embedded Firmware

  • SPI communication with RC522 RFID reader
  • Product database stored in internal flash memory
  • I2C protocol for LCD display updates
  • UART interrupt-driven Bluetooth data transmission
  • Add/remove item logic with cart state management
  • Low-power sleep modes for battery conservation

Desktop Application

  • Serial port management for Bluetooth connectivity
  • Real-time cart synchronization with embedded system
  • Product catalog management interface
  • Receipt generation and printing functionality
  • Transaction history and analytics dashboard
  • Multi-threaded architecture for responsive UI

Data Flow

  • RFID tag scanned → Product ID extracted
  • STM32 looks up product in local database
  • Price and name displayed on LCD
  • Cart data serialized and sent via Bluetooth
  • Desktop app receives and displays full cart
  • Checkout triggers final transaction processing

Performance Metrics

<200ms
Detection Time
99.5%
RFID Accuracy
10m
Bluetooth Range

Challenges & Solutions

RFID Collision

Multiple tags detected simultaneously caused reading errors. Implemented anti-collision algorithms and proper tag timing to ensure sequential, reliable reads.

Power Management

Continuous RFID scanning drained battery quickly. Added intelligent sleep modes and wake-on-motion detection using accelerometer to extend battery life by 3x.

Data Synchronization

Bluetooth packet loss caused cart mismatch. Developed robust error checking with acknowledgment protocol and automatic retry mechanism.

User Experience Flow

  1. Product Selection: Customer places RFID-tagged items in cart
  2. Automatic Detection: Cart instantly recognizes items and updates display
  3. Running Total: LCD shows current total price and item count
  4. Wireless Checkout: Cart connects to nearby checkout station via Bluetooth
  5. Payment Processing: Desktop app displays final bill and processes payment
  6. Receipt Generation: Digital or printed receipt issued immediately

Future Enhancements

  • Integration with store inventory management system
  • Mobile app companion for iOS and Android
  • QR code support for products without RFID tags
  • Weight sensors for verification and bulk items
  • Navigation assistance with store map integration
  • Personalized recommendations based on shopping history
  • Cloud connectivity for real-time analytics