Smart Piggy Bank
Smart Piggy Bank with Coin Detection and Display
Author: Stefan Madalina-Eliana
GitHub Project Link: https://github.com/UPB-FILS-MA/project-MadalinaEliana
Description
This project, the Smart Piggy Bank, is designed to modernize the traditional concept of a piggy bank by integrating digital technology to enhance user interaction and functionality. It utilizes a Raspberry Pi Pico microcontroller to orchestrate the core functions of coin detection, total amount calculation, and user interaction through visual and auditory feedback.
The primary feature of this Smart Piggy Bank is its ability to detect coins as they are inserted, using custom sensors tailored to recognize different coin sizes and values. Each detected coin's value is automatically calculated and added to a running total, which is displayed on an LCD screen. This allows users to easily track their savings without the need to manually count the contents.
An innovative addition to the traditional piggy bank model is the integration of a motion sensor. This sensor serves a dual purpose: conserving energy and enhancing user convenience. When the sensor detects motion near the piggy bank, it activates the LCD display, illuminating the current total amount saved. This feature ensures the display is only active when needed, making the device more energy-efficient.
The piggy bank also includes a buzzer that emits a sound every time a coin is inserted. This auditory feedback not only confirms the successful deposit of a coin but also adds an element of interactivity.
Motivation
I wanted to create the Smart Piggy Bank to merge traditional savings methods with the sophisticated capabilities of modern technology. My goal was to introduce an interactive element to the mundane task of saving coins, transforming it into an engaging and educational experience. By utilizing the Raspberry Pi Pico, I aim to use the power of these advanced tools to enhance the functionality of a simple device. This project provides a meaningful way to explore how everyday objects can be revitalized through innovation, making them more intuitive and impactful in our digital age.
Architecture

Log
Week 6 - 12 May
This week was focused on documenting the initial concept and design of the Smart Piggy Bank. Key tasks accomplished:
- Drafted a detailed project description outlining the purpose, functionality, and motivation behind the Smart Piggy Bank.
- Created initial architecture schematics and diagrams to visualize the hardware and software components.
- Compiled a bill of materials (BOM) listing all necessary hardware components with their respective prices and usage.
Week 7 - 19 May
During this week, the focus was on designing the KiCad schematic and assembling the hardware components. Achievements included:
- Created a detailed KiCad schematic to guide the assembly of the hardware components.
- Assembled the Raspberry Pi Pico with the necessary components, including the LCD screen, infrared sensors, motion sensor, and buzzer.
- Verified the proper connection of all components and ensured that they are correctly interfaced with the Raspberry Pi Pico.
Challenges faced included ensuring the accuracy of the KiCad schematic and troubleshooting initial connectivity issues during the assembly process.
Week 20 - 26 May
This week was dedicated to developing and testing the software components.
Hardware
-
Raspberry Pi Pico: Microcontroller board powered by the RP2040 chip, designed for high performance and flexible digital interfacing, ideal for embedded projects.
-
Infrared Pair Tube: This component includes an infrared emitter and receiver that detect the presence and type of coins by measuring the interruption of an infrared light beam. It's crucial for accurate coin detection and classification.
-
LCD Screen: These are liquid crystal displays that support I2C communication, which simplifies the wiring and control via the Raspberry Pi Pico. The 16x2 model displays two lines of 16 characters, providing clear and readable output for the amount of money saved.
-
Motion Sensor: A passive infrared (PIR) motion sensor used to detect movement in the environment. It's utilized here to activate the LCD screen when it senses motion nearby, making the device more energy-efficient and user-friendly by displaying information only when needed.
-
Buzzer: An electronic device that produces sound when voltage is applied; used here to emit a beep or tune each time a coin is detected, providing auditory confirmation of a successful deposit.
