Real-Time Currency Detection Using ESP32-CAM and YOLO (AI + Computer Vision Project)
by priyanshu9569999 in Circuits > Cameras
21 Views, 1 Favorites, 0 Comments
Real-Time Currency Detection Using ESP32-CAM and YOLO (AI + Computer Vision Project)
This project demonstrates a real-time currency detection system using an ESP32-CAM and a YOLO-based Python server. The ESP32-CAM captures images of currency notes and sends them over Wi-Fi to a Python server, where a trained YOLO model processes the image and identifies the denomination.
The detected currency value is then displayed on an OLED screen connected to the ESP32. This system combines embedded systems and artificial intelligence to create a fast, efficient, and practical solution for currency recognition.
The architecture splits tasks efficiently — the ESP32 handles image capture and communication, while the server performs heavy AI processing — resulting in fast detection within 1–2 seconds.
Supplies
- ESP32-CAM
- SSD1306 OLED Display (128×64, I2C)
- CH340G USB to Serial Module
- Breadboard
- Connecting wires
- Micro-USB cable
- 2.4 GHz Wi-Fi network
- PC/Laptop (for running Python server)
Understanding the Project
In this project:
- ESP32-CAM captures an image
- Image is sent to a Python server
- YOLO model detects the currency
- Result is sent back
- OLED displays the value
This setup allows real-time AI processing using low-cost hardware.
Understanding YOLO
YOLO (You Only Look Once) is an object detection algorithm that can identify objects in images.
In this project, it:
- Detects currency notes
- Identifies denomination (₹10, ₹20, ₹50, ₹100, ₹500, etc.)
- Works in real time with good accuracy
Training the YOLO Model
- Use Google Colab
- Train using a custom dataset of currency notes
- Export the trained model (best.pt)
Why training is important:
- YOLO does not recognize objects by default
- It learns patterns like numbers, colors, and note designs
Source Code - https://drive.google.com/file/d/1gjP65UpY9R44sf0-AnlSSFVIQjYIc2Xb/view
Circuit Connections
OLED → ESP32-CAM
- SDA → GPIO 13
- SCL → GPIO 14
- VCC → 3.3V / 5V
- GND → GND
Flash LED
- Controlled using onboard GPIO
Upload Code to ESP32-CAM
- Add your Wi-Fi credentials (ssid, password)
- Set your server endpoint:
What the code does:
- Connects to Wi-Fi
- Captures image
- Sends it to server
- Displays detected value on OLED
- Handles reconnection automatically
Source Code - https://drive.google.com/file/d/1gjP65UpY9R44sf0-AnlSSFVIQjYIc2Xb/view
Setup Python Server
Install dependencies:
Run the server:
Check server:
How the Server Works
- Receives image from ESP32
- Decodes using OpenCV
- Runs YOLO detection
- Selects highest-confidence result
- Sends label back
It also:
- Tracks FPS
- Optimizes CPU usage
- Preloads model for faster response
Performance Optimization
Uses small image size (QQVGA)
Optimized JPEG compression
Fast Wi-Fi transfer
Detection time: ~1–2 seconds
Testing the System
The system successfully captures, processes, and identifies currency notes in real time. The combination of ESP32-CAM and YOLO provides a fast, reliable, and cost-effective AI-based solution
Applications
Currency identification system
Assistive tool for visually impaired
Smart vending machines
Retail automation
AI learning projects
Reference Video