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 Board | 1 |
| RFID RC522 Module | 1 |
| RFID Tags | Multiple |
| 16x2 LCD Display | 1 |
| HX711 Load Cell | 1 |
| Load Cell Sensor | 1 |
| Buzzer | 1 |
| LEDs | 2 |
| Battery/Power Bank | 1 |
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 |
|---|---|
| SDA | GPIO5 |
| SCK | GPIO18 |
| MOSI | GPIO23 |
| MISO | GPIO19 |
| RST | GPIO22 |
| 3.3V | 3.3V |
| GND | GND |
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
- Open Telegram
- Search BotFather
- Create new bot using /newbot
- Copy BOT TOKEN
- Add token inside n8n Telegram node
10. Google Sheets Integration
| Time | Product | Price | Total |
|---|---|---|---|
| 10:30 AM | Milk | 50 | 150 |
11. ThingSpeak Cloud Setup
- Create ThingSpeak Account
- Create New Channel
- Add Fields:
- Total Bill
- Product Count
- Power Usage
- Copy API Key
- 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

Comments
Post a Comment