Smart Shopping Trolley Using Arduino UNO & RFID | Automatic Billing System

Smart Shopping Trolley Using Arduino UNO & RFID | Automatic Billing System – MakeMindz
Arduino UNO RFID RC522 IoT Project Beginner Friendly

Smart Shopping Trolley with RFID Auto-Billing

Eliminate checkout queues with a supermarket trolley that scans RFID-tagged products, calculates your bill in real-time, and displays it on a 16×2 LCD.

9Components
~2 hrsBuild Time
SPIProtocol
I²CLCD Interface
1

Project Overview & Features

The Smart Shopping Trolley uses RFID technology to scan products automatically when placed near the trolley's RC522 reader. Each product has an RFID tag. When scanned, Arduino looks up the product name and price from a local database, updates the running total, and displays everything on the 16×2 LCD. A buzzer beeps to confirm each scan.

📡
Auto RFID ScanningHands-free product detection using the RC522 reader
💰
Real-time BillingBill updates instantly on every scan
🖥️
16×2 LCD DisplayShows item name, price, and running total via I²C
🔔
Buzzer AlertAudio confirmation on each successful scan
🔘
Push ButtonsAdd, Remove, and Reset controls built-in
Queue-Free CheckoutNo cashier needed — pay directly at exit
2

Components Required

# Component Specification Qty
1Arduino UNOATmega328P, 5V×1
2RFID Reader ModuleRC522, SPI, 3.3V×1
3RFID Tags / CardsMifare 1K (13.56 MHz)×4+
4LCD Display16×2 with I²C backpack (0x27)×1
5BuzzerActive Buzzer, 5V×1
6Push Buttons6×6mm tactile switch×3
7Breadboard830-point or mini×1
8Jumper WiresMale-Male, various lengths×20
9Power SupplyUSB 5V or 9V DC barrel×1
ℹ️ The RC522 RFID module operates at 3.3V — never connect its VCC to the Arduino's 5V pin, as this will damage the module.
3

Circuit Diagram

Full System Schematic
ARDUINO UNO R3 ATmega 328P D2 D3 D4 D5 D9 D10 D11 D12 D13 SDA/SCL RC522 RFID READER SDA→D10 SCK→D13 MOSI→D11 MISO→D12 RST→D9 3.3V / GND Smart Trolley Total: 180 Rs I²C SDA→A4 SCL→A5 VCC: 5V 16×2 LCD (I²C) BUZZER +→ D5 −→ GND PUSH BUTTONS REMOVE D2 ADD D3 RESET D4 RFID TAG Connections: SPI (RFID) I²C (LCD) Buzzer Buttons makemindz.com
4

Pin Wiring Guide

RC522 RFID → Arduino UNO (SPI)
RC522 PinArduino PinNotes
SDAD10Slave Select (SS)
SCKD13SPI Clock
MOSID11Master Out Slave In
MISOD12Master In Slave Out
RSTD9Reset pin
3.3V3.3V⚠️ Use 3.3V only!
GNDGND
16×2 LCD (I²C backpack, addr 0x27) → Arduino UNO
LCD PinArduino PinNotes
SDAA4I²C Data
SCLA5I²C Clock
VCC5VPower
GNDGND
Buzzer & Buttons → Arduino UNO
ComponentPinArduino Pin
Buzzer (+)PositiveD5
Buzzer (−)GNDGND
Remove ButtonOne legD2
Add ButtonOne legD3
Reset ButtonOne legD4
All ButtonsOther legGND
⚠️ If your buttons read noisy values, add 10kΩ pull-down resistors from each button data pin to GND, or enable internal pull-ups and invert the logic in code.
5

Step-by-Step Assembly

1

Install Required Libraries

Open Arduino IDE → Sketch → Include Library → Manage Libraries. Search and install: MFRC522 by GithubCommunity, LiquidCrystal_I2C by Frank de Brabander.

2

Find Your LCD I²C Address

Upload an I²C scanner sketch to find your LCD's address. It's usually 0x27 or 0x3F. Update the address in the code: LiquidCrystal_I2C lcd(0x27, 16, 2);

3

Wire the RC522 RFID Module

Connect SDA→D10, SCK→D13, MOSI→D11, MISO→D12, RST→D9. Connect VCC to the 3.3V pin (not 5V) and GND to GND.

4

Wire the LCD (I²C)

Connect SDA→A4, SCL→A5, VCC→5V, GND→GND on the Arduino.

5

Connect Buzzer & Buttons

Buzzer (+) → D5, (−) → GND. Each button: one leg to D2/D3/D4, other leg to GND.

6

Scan Your RFID Tag UIDs

Upload the MFRC522 DumpInfo example sketch and scan each RFID tag. Note the UID printed on the Serial Monitor (e.g., B3 23 E4 11). You'll need these for the product database.

7

Update the Item Database in Code

Replace the UIDs and product details in the item_list[] array with your scanned UIDs, product names, and prices.

8

Upload & Test

Upload the code, open Serial Monitor at 9600 baud. Scan a tag — the LCD should show the product name and price, and the buzzer should beep once. Test all three buttons.

💡 Pro Tip: Attach RFID tags to product boxes using double-sided tape. Position the RC522 reader at the trolley's entrance opening so tags are scanned automatically when items are dropped in.
6

Arduino Code

Arduino / C++
// Smart Shopping Trolley — makemindz.com // RFID RC522 + 16x2 I2C LCD + Buzzer + 3 Push Buttons #include <SPI.h> #include <MFRC522.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); const int remove_button = 2; const int add_button = 3; const int reset_button = 4; const int buzzer_Pin = 5; #define SS_PIN 10 #define RST_PIN 9 MFRC522 mfrc522(SS_PIN, RST_PIN); struct item { String item_name; String item_number; int item_price; }; const int number_of_item = 4; const item item_list[number_of_item] = { // Name RFID UID Price (Rs) {"Tata salt", "B3 23 E4 11", 100}, {"Milk Powder","A3 51 A0 0D", 50}, {"Bournvita", "13 1F A3 0D", 20}, {"Ball_Pen", "E3 68 DC 12", 10}, }; int bill_amount = 0; int add_item_flag = 1; int remove_item_flag = 0; void setup() { pinMode(remove_button, INPUT); pinMode(reset_button, INPUT); pinMode(add_button, INPUT); pinMode(buzzer_Pin, OUTPUT); Serial.begin(9600); SPI.begin(); mfrc522.PCD_Init(); digitalWrite(buzzer_Pin, LOW); lcd.init(); lcd.backlight(); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Smart Trolley"); lcd.setCursor(0, 1); lcd.print("Billing System"); delay(2000); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Start purchasing"); lcd.setCursor(0, 1); lcd.print("your item"); } void loop() { int remove_buttonState = digitalRead(remove_button); int add_buttonState = digitalRead(add_button); int reset_buttonState = digitalRead(reset_button); if (remove_buttonState) { add_item_flag = 0; remove_item_flag = 1; lcd.clear(); lcd.setCursor(0, 0); lcd.print("You Can now"); lcd.setCursor(0, 1); lcd.print("Remove your item"); delay(2000); } else if (add_buttonState) { add_item_flag = 1; remove_item_flag = 0; lcd.clear(); lcd.setCursor(0, 0); lcd.print("You Can now"); lcd.setCursor(0, 1); lcd.print("add your item"); delay(2000); } else if (reset_buttonState) { lcd.clear(); lcd.setCursor(0, 0); lcd.print("Resetting"); lcd.setCursor(0, 1); lcd.print("Trolley data"); delay(2000); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Start Purchasing"); lcd.setCursor(0, 1); lcd.print("Your item"); bill_amount = 0; } if (!mfrc522.PICC_IsNewCardPresent()) return; if (!mfrc522.PICC_ReadCardSerial()) return; String content = ""; for (byte i = 0; i < mfrc522.uid.size; i++) { content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); content.concat(String(mfrc522.uid.uidByte[i], HEX)); } content.toUpperCase(); for (int i = 0; i < number_of_item; i++) { if (content.substring(1) == item_list[i].item_number) { if (add_item_flag == 1) { bill_amount += item_list[i].item_price; digitalWrite(buzzer_Pin, HIGH); delay(500); digitalWrite(buzzer_Pin, LOW); lcd.clear(); lcd.setCursor(0, 0); lcd.print(item_list[i].item_name); lcd.setCursor(0, 1); lcd.print(String(item_list[i].item_price) + " Rs"); delay(2000); } else if (remove_item_flag == 1) { if (bill_amount > 0) { bill_amount -= item_list[i].item_price; digitalWrite(buzzer_Pin, HIGH); delay(500); digitalWrite(buzzer_Pin, LOW); lcd.clear(); lcd.setCursor(0, 0); lcd.print(item_list[i].item_name); lcd.setCursor(0, 1); lcd.print("removed"); delay(2000); } else { lcd.clear(); lcd.setCursor(0, 0); lcd.print("Your trolley is"); lcd.setCursor(0, 1); lcd.print("empty now"); delay(2000); } } } } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Total Billing"); lcd.setCursor(0, 1); lcd.print(String(bill_amount) + " Rs"); delay(2000); }
8

Run the Simulation

🖥️

Try it on Wokwi — No Hardware Needed

Simulate the entire Smart Trolley project in your browser. Click RFID cards to scan products and watch the LCD update in real time.

💡 Wokwi Instructions: (1) Create new Arduino UNO project → (2) Paste diagram.json → (3) Paste sketch code → (4) Press Play → (5) Click RFID cards on-screen to simulate scanning!
9

How It Works

The system follows a simple but powerful flow. Each product has an RFID tag with a unique UID. When the tag enters the RC522 reader's electromagnetic field, the reader communicates via the SPI protocol to pass the UID to the Arduino. The Arduino then compares the UID against its local item_list[] database. If matched, it updates the bill, triggers the buzzer, and refreshes the LCD.

RFID Tag Detected

RC522 reader detects a tag in its ~5cm range and reads the UID via SPI bus.

UID Lookup

Arduino searches the item_list[] array for a UID match to retrieve product name and price.

Bill Updated

Depending on the mode (add/remove), the price is added or subtracted from the running bill_amount.

LCD + Buzzer Feedback

The 16×2 LCD shows the product name and price, followed by the updated total. Buzzer beeps once to confirm.

© 2026 MakeMindz · Arduino, IoT & Electronics Projects · All rights reserved

Comments

try for free