AI-Based Smart Shopping Trolley with Automatic Billing and Recommendations

AI-Based Smart Shopping Trolley with Automatic Billing & Recommendations ESP32 + RFID + Load Cell + AI Agent + n8n Automation + Telegram Voice Alerts + Google Sheets + ThingSpeak
AI Smart Shopping Trolley Project

AI-Based Smart Shopping Trolley

ESP32 + RFID + AI Agent + n8n Automation + Telegram Voice Alerts + Google Sheets + ThingSpeak

1. Project Overview

This project creates an intelligent shopping trolley that automatically scans products, calculates billing, sends cloud notifications, stores data in Google Sheets, and generates AI-based recommendations.

2. Main Features

  • Automatic Billing System
  • RFID Product Detection
  • ESP32 IoT Connectivity
  • AI Recommendation Engine
  • Google Sheets Cloud Logging
  • Telegram Notification Alerts
  • Telegram Voice Notifications
  • ThingSpeak Dashboard Monitoring
  • Power Consumption Prediction

3. Components List

Component Quantity
ESP32 Dev Board1
RFID RC522 Module1
RFID TagsMultiple
16x2 LCD Display1
HX711 Load Cell1
Load Cell Sensor1
Buzzer1
LEDs2
Battery/Power Bank1

4. System Architecture

RFID Products
      |
      V
+----------------+
| ESP32 Controller|
+----------------+
      |
 WiFi / HTTP
      |
      V
+----------------+
| n8n Automation |
+----------------+
   |      |     |
   V      V     V
Telegram Sheets ThingSpeak

5. Circuit Connections

RFID RC522 to ESP32

RFID ESP32
SDAGPIO5
SCKGPIO18
MOSIGPIO23
MISOGPIO19
RSTGPIO22
3.3V3.3V
GNDGND

6. Project Flowchart

START
   |
Initialize ESP32
   |
Connect WiFi
   |
Scan RFID Product
   |
Validate Product
   |
Add to Cart
   |
Update LCD Bill
   |
Send Data to n8n
   |
Store in Google Sheets
   |
Send Telegram Alert
   |
Update ThingSpeak
   |
END

7. ESP32 Source Code

#include <WiFi.h>
#include <HTTPClient.h>
#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 5
#define RST_PIN 22

MFRC522 rfid(SS_PIN, RST_PIN);

const char* ssid = "YOUR_WIFI";
const char* password = "YOUR_PASSWORD";

String webhook =
"https://your-n8n-webhook-url";

void setup() {

  Serial.begin(115200);

  SPI.begin();
  rfid.PCD_Init();

  WiFi.begin(ssid, password);

  while(WiFi.status() != WL_CONNECTED){
      delay(1000);
      Serial.println("Connecting...");
  }

  Serial.println("WiFi Connected");
}

void loop() {

  if (!rfid.PICC_IsNewCardPresent())
      return;

  if (!rfid.PICC_ReadCardSerial())
      return;

  String uid = "";

  for (byte i = 0; i < rfid.uid.size; i++) {
      uid += String(rfid.uid.uidByte[i], HEX);
  }

  HTTPClient http;

  http.begin(webhook);
  http.addHeader("Content-Type",
  "application/json");

  String json =
  "{\"uid\":\""+uid+"\"}";

  int code = http.POST(json);

  Serial.println(code);

  http.end();

  delay(2000);
}

8. n8n Workflow

Webhook
   |
Function Node
   |
Google Sheets
   |
AI Recommendation
   |
Telegram Alerts
   |
ThingSpeak Dashboard

9. Telegram Bot Setup

  1. Open Telegram
  2. Search BotFather
  3. Create new bot using /newbot
  4. Copy BOT TOKEN
  5. Add token inside n8n Telegram node

10. Google Sheets Integration

Time Product Price Total
10:30 AM Milk 50 150

11. ThingSpeak Cloud Setup

  1. Create ThingSpeak Account
  2. Create New Channel
  3. Add Fields:
    • Total Bill
    • Product Count
    • Power Usage
  4. Copy API Key
  5. Send ESP32 data using HTTP API
https://api.thingspeak.com/update?
api_key=XXXX&field1=100

12. AI Recommendation Logic

IF Product = Bread
THEN Recommend = Butter, Jam

IF Product = Tea
THEN Recommend = Biscuits

13. Power Consumption Formula

Power = Voltage × Current

P = V × I

Example:

Voltage = 5V
Current = 0.2A

Power = 5 × 0.2
Power = 1 Watt

14. Future Enhancements

  • UPI Payment Integration
  • Mobile App Development
  • Computer Vision Product Detection
  • Face Recognition Login
  • Voice Assistant Support
  • AI Demand Prediction

15. Applications

  • Supermarkets
  • Shopping Malls
  • Retail Stores
  • Automated Billing Systems
  • Smart Warehouses

16. Advantages

  • Reduces Billing Time
  • Improves Customer Experience
  • Provides Real-Time Monitoring
  • Supports AI-Based Recommendations
  • Improves Retail Automation

17. Final Conclusion

The AI-Based Smart Shopping Trolley combines IoT, AI automation, cloud analytics, and smart retail technologies into a single intelligent system.

This project is ideal for:

  • Final Year Engineering Projects
  • IoT Research Projects
  • AI + Automation Demonstrations
  • Smart Retail Applications

AI Smart Shopping Trolley Project Documentation

ESP32 + RFID + AI + n8n + Telegram + Google Sheets + ThingSpeak

Comments