Smart Shopping Trolley with RFID Auto-Billing

🛒 Build a Magic Shopping Cart! 🪄

An Arduino & RFID Adventure for Young Makers!

Hey little makers! 👋 Ever wished your toy shopping cart could recognize what you put inside and tell you the total price — just like a real store checkout? Today we're building exactly that using an Arduino UNO and a bit of RFID magic (think of it as a secret ID card for your toys)!

🧰 What You'll Need

  • 🟦 Arduino UNO
  • 📡 RFID Reader Module (RC522)
  • 🏷️ RFID Tags/Cards (one for each item)
  • 📺 16x2 LCD Display (with I2C module)
  • 🔌 Jumper Wires
  • 🧩 Breadboard
  • 🔋 9V Battery (optional)

✨ The Big Idea

Every toy or item gets its own special RFID sticker — like a fingerprint! 🖐️ When you tap the item near the RFID reader, the Arduino "recognizes" it, looks up its price, adds it to the total, and shows everything on a little screen. Just like magic! 🪄✨

🔌 Step 1: Connect the RFID Reader

Connect the RC522 RFID reader to your Arduino UNO like this:

RC522 PinArduino UNO Pin
SDAD10
SCKD13
MOSID11
MISOD12
RSTD9
3.3V3.3V
GNDGND

🖥️ Step 2: Connect the LCD Screen

Using the I2C version of the 16x2 LCD makes wiring super easy:

  • SDA → A4
  • SCL → A5
  • VCC → 5V
  • GND → GND

🧠 Step 3: How the Code Thinks

Here's the simple plan our Arduino brain follows:

  1. Wait for an RFID tag to be tapped 👉
  2. Read its special ID number (UID) 🔍
  3. Match the UID to a toy/item name and price 🏷️
  4. Add the price to the running total ➕
  5. Show the item name and total on the LCD screen 📺

💻 Step 4: The Code

#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal_I2C.h>

MFRC522 rfid(10, 9);
LiquidCrystal_I2C lcd(0x27, 16, 2);
float total = 0;

void setup() {
  SPI.begin();
  rfid.PCD_Init();
  lcd.init();
  lcd.backlight();
  lcd.print("Magic Cart Ready!");
}

void loop() {
  if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial()) {
    String uid = "";
    for (byte i = 0; i < rfid.uid.size; i++) {
      uid += String(rfid.uid.uidByte[i], HEX);
    }

    if (uid == "a1b2c3") {
      total += 10;
      lcd.clear();
      lcd.print("Apple +10");
    }
    else if (uid == "d4e5f6") {
      total += 20;
      lcd.clear();
      lcd.print("Choco +20");
    }

    lcd.setCursor(0, 1);
    lcd.print("Total: ");
    lcd.print(total);

    rfid.PICC_HaltA();
    delay(1000);
  }
}

🎮 Step 5: Let's Play "Shopping Time"!

Now for the fun part! 🎉 Give each kid a few toy items, each with its own RFID tag stuck on. Let them tap each toy near the reader — watch the LCD screen light up with the item name and the total price growing higher and higher, just like a real checkout counter!

🚀 Level Up Your Cart!

  • 🔊 Add a buzzer that goes "beep!" every time an item is scanned
  • 🟢🔴 Add LEDs: green light if total is under budget, red if it goes over
  • 🧾 Print a "receipt" message at the end showing everything bought

🏷️ Step 6: Set Up Your Toy Price List

Before the magic happens, scan each RFID tag once using a simple test sketch and write down its special ID number (called a UID). Then make a little list — like a toy store menu! 🍫🧴🖊️

Toy / ItemRFID Tag UIDPrice (Rs)
Tata SaltB3 23 E4 11100
Milk PowderA3 51 A0 0D50
Bournvita13 1F A3 0D20
Ball PenE3 68 DC 1210

Type these into the item_list[] part of the code — that's your cart's "toy dictionary"! 📖

🔘 Step 7: Add the Magic Buttons

Our Magic Cart has three super buttons to control shopping:

  • ADD button — switches to "putting items in" mode
  • REMOVE button — switches to "taking items out" mode (changed your mind? no problem!)
  • 🔄 RESET button — clears the bill and starts a brand-new shopping trip

Wire each button between its pin (D2, D3, D4) and GND. When pressed, the LCD shows a friendly message so you always know what mode you're in!

🔍 How the Magic Cart Thinks (Behind the Scenes)

Here's the secret journey of every scan, step by step:

  1. 🏷️ Tag Detected: The RC522 reader senses a tag within about 5cm and reads its UID using the SPI connection.
  2. 🔎 UID Lookup: The Arduino checks its item_list[] "toy dictionary" to find a match.
  3. 💰 Bill Updated: Found a match? The price is added (or removed) from the running total.
  4. 📺🔔 Feedback Time: The LCD shows the item and new total, and the buzzer beeps once to say "Got it!"

🖥️ Bonus: Try It Without Any Hardware!

Don't have the parts yet? No worries! You can test the whole Magic Cart online using Wokwi, a free browser-based simulator:

  1. Start a new Arduino UNO project on Wokwi
  2. Paste in the circuit setup (diagram.json)
  3. Paste in the Arduino code
  4. Press ▶️ Play
  5. Click the on-screen RFID cards to simulate scanning!

It's a great way to test your code before building the real thing! 💻

❓ Fun Questions Kids Often Ask

Q: Why can't I connect the RFID reader to the 5V pin?
A: The RC522 module is delicate and only likes 3.3V power. Giving it 5V is like giving your hamster a giant burger — too much, and it could break! Always use the 3.3V pin. ⚠️

Q: What if my buttons act weird or scan twice by accident?
A: That's called "noise"! Adding a small pull-down resistor (10kΩ) between the button and GND helps keep things calm and accurate. 🧘

Q: How do I find my LCD's address?
A: Run a tiny "I2C scanner" sketch — it will tell you if your screen's address is 0x27 or 0x3F. Update that number in your code. 🔢

🎉 Why This Project Rocks!

This project teaches kids about electronics, coding logic, and even budgeting — all while playing a fun shopping game! It's the perfect weekend STEM adventure for curious young minds. 🤖💡

Happy building, little engineers! 🔧✨

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course