Skip to main content
Version: ACS CC

AutoCash

Automated banknote and coin sorting & counting device

info

Author: Logofatu Gabriela-Patricia
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-Patrickgabr

Description

AutoCash is an automated device that detects, identifies, counts, and sorts banknotes and coins based on their value. The project combines weight sensors, image sensors, and control components to recognize the type of currency inserted and distribute it into the correct compartments. The system provides real-time feedback on an OLED display and can save the total sum or history of processed amounts. It is useful for cash handling in educational or commercial contexts.


Motivation

The project reflects my desire to integrate embedded Rust programming with practical electronic design. I chose this idea because it combines mechanical control, real-time sensor feedback, and user interaction in an engaging way. I believe AutoCash can be the foundation for future smart kiosk or cash-handling systems, and it allowed me to explore image recognition, precision electronics, and embedded system control simultaneously.


Architecture

The Raspberry Pi Pico 2W acts as the central processing unit, handling input from sensors and issuing commands to actuators and the OLED display. It is mounted on a breadboard for easy prototyping and wiring.

The OLED 128x64 I2C display is used to provide real-time feedback to the user, displaying detected values and the running total. It communicates with the Pico via I2C protocol.

The camera module captures an image of each inserted banknote. The data is sent to the Pico for value recognition using basic image processing.

The HX711 sensor, paired with a load cell, is responsible for detecting the weight of inserted coins and mapping them to predefined currency values.

The optional TCS3200 color sensor assists in further distinguishing coins of similar weight by analyzing their color.

The MG90S servo motors are responsible for physically sorting the identified coins and banknotes into designated compartments based on their values. They are more robust than SG90s and provide higher torque, improving precision in sorting.

The RGB LEDs provide visual feedback for different states of the system (detection, error, completion, etc.).

The buzzer gives audio confirmation or alerts depending on the system status.

The push buttons allow the user to manually start or reset the sorting/counting process.

All components are connected using the breadboard for modularity and ease of testing.

Diagram


Log

Week - May

Week - May

Week - May

Hardware

  1. Raspberry Pi Pico 2W
  • Purpose: Central controller of the system
  • Function: Manages data acquisition from sensors, controls the servomotors, handles user input and displays feedback on the OLED display.
  1. Camera Module
  • Purpose: Captures banknote image
  • Function: Takes a snapshot of the inserted banknote, which is processed to determine its value using basic image analysis.
  1. HX711 + Load Cell
  • Purpose: Detects the weight of coins
  • Function: Measures the weight of each inserted coin and compares it to known values to determine the coin's denomination.
  1. TCS3200 Color Sensor (optional)
  • Purpose: Differentiates similar coins
  • Function: Reads the color pattern of a coin to distinguish between coins of similar weight (e.g., 10 bani vs. 50 bani).
  1. MG90S Servomotors
  • Purpose: Physical sorting
  • Function: Rotate arms or compartments to direct banknotes and coins into the correct sorting bins based on their identified value.
  1. OLED 128x64 I2C Display
  • Purpose: User interface
  • Function: Displays detected value, total amount, and status messages for the user.
  1. RGB LEDs
  • Purpose: Visual feedback
  • Function: Light up with different colors to indicate successful detection, errors, or completion of sorting.
  1. Buzzer
  • Purpose: Audio feedback
  • Function: Emits short beeps for confirmation, alerts, or interaction prompts.
  1. Push Buttons (Start/Reset)
  • Purpose: Manual control
  • Function: Allow the user to begin or reset the sorting/counting process.
  1. Breadboard + Wires + Resistors
  • Purpose: Prototyping and wiring
  • Function: Enable modular and safe interconnection between all components without soldering.

Hardware Overview

  • The Raspberry Pi Pico 2W serves as the brain of the system, orchestrating all operations.
  • The camera module and load cell provide input data for recognizing money.
  • The OLED display keeps the user informed with live feedback.
  • The MG90S servos handle the mechanical sorting of cash.
  • LEDs and buzzer offer quick and intuitive feedback.
  • The entire circuit is assembled on a breadboard, allowing flexibility in testing and debugging.

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WMain microcontroller responsible for controlling sensors, actuators, and display39,66 RON
HX711 + Load CellMeasures the weight of coins for value identification28 RON
TCS3200 Color SensorDistinguishes coins with similar weight using color recognition38,99 RON
Camera OV7670Captures images of banknotes for value recognition25 RON
OLED 128x64 I2C DisplayDisplays feedback and detected values to the user30 RON
MG90S Servo MotorsRotates arms or compartments to sort coins and banknotes15,90 RON
Breadboard + WiresRapid prototyping and safe connections between components15 RON
RGB LEDs + BuzzerVisual and audio feedback10 RON
Push Buttons + 220Ω ResistorsStart/reset input and wiring5 RON

Software

LibraryDescriptionUsage
embassy-rpRP2040 PeripheralsUsed for accessing the Pico's hardware peripherals
embedded-halHardware abstraction layerCommon traits for working with GPIO, I2C, SPI, etc.
ssd1306OLED Display DriverFor controlling the 128x64 OLED via I2C
embedded-graphicsDraw graphics & textUsed to display formatted output on OLED
heaplessFixed-size collectionsUsed for storing values without dynamic allocation
serde + serde_jsonSerialization frameworkUsed to store/export history or detected values
opencvImage processingUsed for recognizing banknote images (host-side or pre-processing)

  1. Rust on the Raspberry Pi Pico