Skip to content

Ajey95/TrolleyMakers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Trolley with Automated Billing System

Project Overview

This project implements a Low-Cost Smart Trolley with Automated Billing System using an STM32F401CCU6 microcontroller. The aim is to enhance the retail shopping experience by automating the checkout process, reducing customer waiting times, and mitigating issues related to manual billing, such as human errors and theft. The system integrates RFID technology for item identification, an LCD for user interaction, pushbuttons for control, and a buzzer for audio feedback.

Video Implementation

Demo

Features

  • RFID-Based Item Scanning: Quickly identifies items placed in the trolley using RFID tags, reducing manual barcode scanning.
  • Real-time Billing Display: Shows "item added" confirmation and updates the total cost on a 16x2 I2C LCD.
  • Intuitive User Interface:
    • Start Button (PB10): Initiates a new shopping session and clears the previous bill.
    • Checkout Button (PB12): Finalizes the shopping session and displays the bill summary.
    • (Optional) Tare Button (PB13): Re-tares the weight sensor.
  • Audible Feedback: A buzzer provides distinct audio cues for button presses, successful scans, and errors.
  • Embedded System Design: Optimized for low-cost, real-time operation suitable for small retail and grocery stores.
  • Offline Functionality: Capable of completing billing operations without continuous internet connectivity.

Motivation & Problem Statement

Retail checkout delays significantly impact both customer satisfaction and store efficiency. Existing smart trolleys are often costly and internet-dependent, limiting small store adoption. Manual billing systems are prone to human error and theft, leading to financial losses. This project addresses these challenges by offering an automated, secure, real-time, and affordable billing solution.

Research Objectives

  1. System Design: Develop an embedded system utilizing the STM32F401CCU6 microcontroller for item identification and billing.
  2. Automation and Security:
    • Integrate RFID-based item scanning with local database verification.
    • Implement a synchronized weighing mechanism to ensure secure placement and tamper prevention (though the weight sensor integration is pending, the framework is ready).
  3. Offline Functionality: Enable complete billing operations without continuous internet dependency, and store transaction data locally for easy retrieval.

Hardware Components

  • Microcontroller: STM32F401CCU6 (Black Pill board)
  • RFID Reader: RC522 Module
  • Display: 16x2 I2C LCD
  • User Input: Pushbuttons (PB10 for Start, PB12 for Checkout, PB13 for Tare)
  • Audio Feedback: Buzzer (Active Buzzer recommended)
  • Weight Sensor: HX711 Load Cell Amplifier with Load Cell (for future integration)
  • Actuator: Servo Motor (for future integration, e.g., locking mechanism)
  • Interconnections: Breadboard and Jumper Wires

Software & Tools

  • IDE: Keil uVision 5
  • Compiler: ARMCLANG V6.23
  • HAL Libraries: STM32CubeF4 HAL Drivers
  • Custom Drivers:
    • mfrc522.c / mfrc522.h (for RFID communication)
    • i2c-lcd.c / i2c-lcd.h (for LCD control)
    • hx711.c / hx711.h (for weight sensor interfacing)
    • servo.c / servo.h (for servo motor control)

Pinout Configuration (STM32F401CCU6 Black Pill)

Component Pin Function STM32 Pin
RFID RC522 SPI1_SCK PA5
SPI1_MISO PA6
SPI1_MOSI PA7
SPI1_CS (NSS) PA4
RST (Reset) PB0
I2C LCD I2C1_SCL PB6
I2C1_SDA PB7
Buzzer Output PB15
Start Button Input (Pull-Down) PB10
Checkout Button Input (Pull-Down) PB12
Tare Button Input (Pull-Down) PB13
HX711 (Weight Sensor) SCK (Clock) PA0
DOUT (Data) PA1
Servo PWM (TIM1_CH1) PA8
Onboard LED Debug/Status PC13

Project Structure

Smart_Trolley/

├── Core/

│ ├── Inc/ # Header files (.h)

│ │ ├── main.h # Main header generated by CubeMX

│ │ ├── stm32f4xx_hal_conf.h # HAL library configuration

│ │ ├── stm32f4xx_it.h # Interrupt handlers header

│ │ ├── hx711.h # Custom HX711 driver header

│ │ ├── i2c-lcd.h # Custom LCD driver header

│ │ ├── mfrc522.h # Custom RFID driver header

│ │ └── servo.h # Custom Servo driver header

│ │

│ └── Src/ # Source files (.c)

│ ├── main.c # Main application logic

│ ├── stm32f4xx_it.c # Interrupt handlers source

│ ├── stm32f4xx_hal_msp.c # MCU Support Package (peripheral inits)

│ ├── system_stm32f4xx.c # System clock and memory setup

│ ├── hx711.c # Custom HX711 driver source

│ ├── i2c-lcd.c # Custom LCD driver source

│ ├── mfrc522.c # Custom RFID driver source

│ └── servo.c # Custom Servo driver source

├── Drivers/ # STM32 hardware abstraction libraries

│ ├── CMSIS/

│ └── STM32F4xx_HAL_Driver/

├── MDK-ARM/ # Keil project specific files

│ ├── Smart_Trolley.uvprojx # Keil project file

│ └── startup_stm32f401xc.s # Assembly startup file

└── Smart_Trolley.ioc # STM32CubeMX configuration file

How to Build and Run

  1. Open Project: Open Smart_Trolley.uvprojx in Keil uVision 5.
  2. Hardware Setup: Wire up all components according to the pinout table above. Ensure reliable connections, especially for SPI (RFID) and I2C (LCD).
  3. Compile: Click "Rebuild" (F7) to compile the project.
  4. Flash: Connect your STM32F401CCU6 board via ST-Link. Click "Download" to flash the firmware.
  5. Run: Power the board. The LCD should display "Smart Trolley" and prompt for a "Start" button press.

Usage

  1. Initial State: The LCD displays "Smart Trolley" and prompts to "Press Start (PB10)".
  2. Start Shopping: Press PB10. The LCD will show "Scan RFID Tag" and "Total: $0.00". The load cell will be tared.
  3. Scan Items: Place an RFID tag on the RC522 reader.
    • If a known item (i1 or i2) is scanned, the LCD will display "[Item Name] added" (e.g., "i1 added") for 2 seconds, a short beep will sound, and the total cost will update.
    • If an unknown item is scanned, an "Unknown Item!" message will appear with a longer error beep.
    • (Future/Planned): The system will check the weight against the item's expected weight after scanning.
  4. Tare Scale (Optional): Press PB13 to re-tare the weight sensor at any time during scanning.
  5. Checkout: When you are done scanning items, press PB12.
    • A double beep will sound.
    • The LCD will display "--- BILL ---".
    • It will then cycle through each added item (e.g., "i1: $10.00") for a short period.
    • Finally, it will display the "TOTAL BILL" (e.g., "$30.00").
  6. New Session: To start a new shopping session, press PB10 again from the "TOTAL BILL" screen.

Future Enhancements

  • Weight Verification: Full integration and calibration of the HX711 module for real-time weight verification is a crucial next step to prevent item swapping.
  • Security Mechanism: Implement a servo-controlled locking mechanism to prevent items from being removed before checkout.
  • Extended Item Database: Support for more items (more complex item management system).
  • User Interface: Implement a scrollable menu for items, or a larger display.
  • Connectivity: Add Wi-Fi/Bluetooth for logging transactions, inventory management, and remote updates (as mentioned in the case study objectives).
  • Power Management: Optimize for lower power consumption.
  • Robustness: Enhance error handling and fault tolerance.

References

  • IEEE Papers on Embedded Smart Retail Systems (2020-2024)
  • ResearchGate: "Design and Implementation of Smart Shopping Cart Systems"

Team Members (Team 10)

  • Rohith Kumar D -- CB.SC.U4CSE23018
  • T Venkataramana -- CB.SC.U4CSE23055
  • VAB Jashwanth Reddy -- CB.SC.U4CSE23058
  • C Kalyan kumar reddy -- CB.SC.U4CSE23060

Made with ❤️ by TrolleyMakers


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages