AutoCash
Automated banknote and coin sorting & counting device
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.
Log
Week - May
Week - May
Week - May
Hardware
- 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.
- 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.
- 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.
- 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).
- 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.
- OLED 128x64 I2C Display
- Purpose: User interface
- Function: Displays detected value, total amount, and status messages for the user.
- RGB LEDs
- Purpose: Visual feedback
- Function: Light up with different colors to indicate successful detection, errors, or completion of sorting.
- Buzzer
- Purpose: Audio feedback
- Function: Emits short beeps for confirmation, alerts, or interaction prompts.
- Push Buttons (Start/Reset)
- Purpose: Manual control
- Function: Allow the user to begin or reset the sorting/counting process.
- 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
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | Main microcontroller responsible for controlling sensors, actuators, and display | 39,66 RON |
HX711 + Load Cell | Measures the weight of coins for value identification | 28 RON |
TCS3200 Color Sensor | Distinguishes coins with similar weight using color recognition | 38,99 RON |
Camera OV7670 | Captures images of banknotes for value recognition | 25 RON |
OLED 128x64 I2C Display | Displays feedback and detected values to the user | 30 RON |
MG90S Servo Motors | Rotates arms or compartments to sort coins and banknotes | 15,90 RON |
Breadboard + Wires | Rapid prototyping and safe connections between components | 15 RON |
RGB LEDs + Buzzer | Visual and audio feedback | 10 RON |
Push Buttons + 220Ω Resistors | Start/reset input and wiring | 5 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rp | RP2040 Peripherals | Used for accessing the Pico's hardware peripherals |
embedded-hal | Hardware abstraction layer | Common traits for working with GPIO, I2C, SPI, etc. |
ssd1306 | OLED Display Driver | For controlling the 128x64 OLED via I2C |
embedded-graphics | Draw graphics & text | Used to display formatted output on OLED |
heapless | Fixed-size collections | Used for storing values without dynamic allocation |
serde + serde_json | Serialization framework | Used to store/export history or detected values |
opencv | Image processing | Used for recognizing banknote images (host-side or pre-processing) |