Skip to main content

Command Palette

Search for a command to run...

ESP32-CAM Indian Currency Recognition Using TinyML Edge AI

Build a real-time Indian currency recognition system using ESP32-CAM and Edge Impulse with LEDs, TinyML & Arduino — no internet needed.

Published
4 min read
ESP32-CAM Indian Currency Recognition Using TinyML Edge AI

Introduction

Imagine turning a low-cost ESP32-CAM module into an intelligent device that can see and recognise Indian currency notes in real time — without sending data to the cloud. Thanks to Edge Impulse, a powerful TinyML platform, this is not just possible — it’s accessible and practical for makers, students, and embedded developers alike. In this comprehensive project, we’ll guide you through building an ESP32-CAM currency recognition system that captures note images, trains a machine learning model, and performs on-device classification with instant visual feedback.

What Is ESP32-CAM Currency Recognition?

ESP32-CAM currency recognition combines machine learning and edge computing to classify Indian rupee notes like ₹10, ₹20, ₹50 and ₹500 using a tiny embedded system. Instead of relying on remote servers, the system runs an AI model directly on the ESP32-CAM module, delivering fast responses and enhanced privacy. This is enabled by training the model with Edge Impulse, which simplifies data collection, labelling, training, and deployment workflows.

Why AI at the Edge Matters

Traditional AI applications depend on cloud computing — sending data, waiting for processing, and receiving results. With AI at the edge, inference happens right on the device. This means:

✔ Faster real-time response

✔ Lower power consumption

✔ No internet or cloud dependency during operation

✔ Better data security

Running neural networks locally on a microcontroller like the ESP32 opens up powerful use cases in embedded systems and IoT environments.

Wiring and Circuit Setup

Since the ESP32-CAM doesn’t include a USB port, you’ll use a USB-to-Serial adapter for programming. Four LEDs connected to GPIO pins act as visual outputs — each assigned to a specific currency denomination. Resistors limit current to protect the LEDs.

Connections rundown:

  • FTDI TX → ESP32-CAM RX

  • FTDI RX → ESP32-CAM TX

  • FTDI 5V → ESP32-CAM 5V

  • FTDI GND → ESP32-CAM GND

  • GPIO0 → GND (for programming mode)

  • LED anodes → GPIO pins (via 100 Ω resistors)

  • LED cathodes → GND

Step-by-Step Workflow

1. Collecting Image Data

The first step in any vision-based ML project is gathering data. Capture at least 50+ images per denomination under varied lighting and angles to enhance model accuracy. A plain background (e.g., white sheet) improves dataset quality significantly. You can also download existing datasets from sources like Kaggle or Google Dataset Search, but manually collected data usually yields higher precision.

2. Training the Model with Edge Impulse

Edge Impulse provides a visual interface to manage your dataset, label images, and build the ML model:

  1. Create a new project and upload images for each label.

  2. Draw bounding boxes around the currency in each image.

  3. Configure the impulse with image preprocessing (e.g., 96×96 px) and object detection learning blocks.

  4. Train the model and evaluate performance metrics like F1 score.

  5. Download the trained model as an Arduino library.

3. Deploying to ESP32-CAM

After training, deploy the model directly onto the ESP32-CAM:

  1. Extract the generated Arduino library.

  2. Add it to your Arduino IDE libraries folder.

  3. Load the provided example sketch.

  4. Update camera settings (e.g., #define CAMERA_MODEL_AI_THINKER).

  5. Select the appropriate board and port, then upload.

Testing and Results

Once deployed and powered up, the ESP32-CAM captures real-time images and predicts the denomination. The corresponding LED lights up according to the recognized currency — giving you instant feedback. Additionally, the serial monitor displays textual predictions for debugging and logging.

Use Cases and Benefits

This edge-based currency recognition system extends beyond being a cool DIY project:

  • 💡 Assistive Tech – Helps visually impaired users identify cash denominations.

  • 🛍 Retail Automation – Speeds up transactions with automated note verification.

  • 🏦 Financial Devices – Integrates into counting or sorting machines.

  • 🤖 Vending Machines – Validates notes before product dispensing.

Future Enhancements

Here are ideas to expand capabilities:

  • Add support for more denominations and coins.

  • Integrate auditory feedback for accessibility.

  • Include an LCD/OLED display for clearer UI.

  • Train to detect counterfeit notes.

Conclusion

This project demonstrates how a budget microcontroller like the ESP32-CAM can perform advanced AI tasks through edge computing and TinyML — no cloud dependency, no complex hardware. Whether you’re a hobbyist or an embedded systems engineer, this tutorial empowers you to build a real-world object recognition system using affordable tools and modern ML workflows. To explore more real-world examples and inspiration for your next microcontroller build, check out the extensive collection of ESP32 projects.