Design of a Smart Donation Box Based on IoT

This research, entitled "IoT-based Intelligent Charity Box Design", aims to develop a charity box system that utilizes the Internet of Things (IoT) technology to enhance public participation in charity. In this context, the charity box serves as a container for storing donations and is also equipped with features that can automatically monitor and calculate the amount of money inserted. The system uses the Wemos D1 Mini as a microcontroller connected to the Internet, allowing users to access data in real time through a website. In addition, this smart charity box is equipped with a PIR sensor that detects motion and triggers sound on the DFPlayer and a TCS3200 color sensor that counts the paper money entered. Thus, the research offers technological solutions and seeks to remind the public of the importance of charity more interactively and efficiently. The results of this research are expected to benefit the management of charity funds and raise social awareness in the community.


INTRODUCTION
The charity box is a charity container managed by the charity.According to the Indonesian dictionary (KBBI, 2019), the word box has the meaning of a small box where jewelry, small items, and so on.While the word charity has a meaning of deeds (good or bad), so a charity box can be meant a place in the shape of a box used as a place to store something intended for charity.A charity box must have a security system like a door lock.
A good deed is a deed.A man is honored for good, not for his position or his wealth.Good deeds are rewarding, good deeds to the poor, or good works to help others.We can donate, and raise funds to help victims of natural disasters, disabled people, widows, orphans, and so on.
If we come to public places where there's a charity box in front of it, it's certain that the proceeds of the charity will be directed to charity or can be given directly to the above characteristics.But a lot of people don't realize that the charity box exists or can even pretend not to know.Because most of those people, if they do charity, should be reminded first, then they will.It is not a fourth, three, fifth, and so forth, but a gift for a good day.Self-righteousness is the deed of a servant who will be asked later on to help us.
Therefore, to ensure that people are always reminded and motivated to do charity, it is important to develop or operate charity boxes with systems or devices that make it easier for them to continue charity.
This smart charity box system is built using the Wemos D1 Mini, the selection of the microcontroller is based on the features of the NodeMCU microcontrollers that already provide WI-FI connectivity, so the system can be connected to the internet.Wemos D1 Mini can be programmed using the Arduino IDE, which is a popular and easy-to-use programming platform.This makes it easy for developers who are already familiar with the Arduino ecosystem to start using Wemos IDE without having to learn a new platform.
In this study, an interface created as a website that serves to display sensor measurement data.A website is a set of pages containing a variety of information, such as data, voices, images, numbers, and videos, which can make it easier for someone to view or process the information or data they want.(Ismai, 2018) By using the website, users can access information in real time and perform data analysis more efficiently.In addition, an interactive and easy-to-use visual display can improve user understanding of Deni Setiawan, Tholib Hariono Design of a Smart Donation Box Based on IoT the data displayed, thus enabling better decision-making based on accurate and relevant information.Another advantage is that websites can be accessed from a variety of devices connected to the Internet, providing flexibility and ease of access without geographical restrictions.
In addition to using the Wemos D1 Mini, this smart charity box system is designed to make a sound when the PIR sensor detects movement at a certain distance.Inside this charity box is also a TCS3200 color sensor that serves to calculate the amount of money put into the box.This charity box control system can be monitored through a website, which allows monitoring the number of people interacting with or participating in this smart charitable box, as well as the total deposit of paper money into the charities box.

METHOD
In this study, the system development method used is the waterfall model.Waterfall method is one of the most classic system development models and is widely used in software projects.This method uses a linear and sequential approach, in which each phase of development must be completed before the next phase begins.Here is a complete description and stages of the application of the Waterfall method for the project "IoT-based Smart Charity Boxes": • Necessity Analysis, At this stage, all system needs for IoT-based smart charity boxes are identified and documented.These needs cover the key functions that smart charities should have.• Design, After the needs are analyzed and determined, the design stage of the system is carried out.
Based on the collected needs, the developer team designs the system architecture, including the design of hardware and software.• Encoding, At this stage, the developer team begins to write code and build the system according to the design that has been made.• Testing and testing stages are carried out to ensure that all components work properly and by the specified specifications.

RESULT AND DISCUSSION
1. Needs analysis At this stage, all system requirements for IoT-based smart charity boxes are identified and documented.These requirements cover the key functions that smart charities should have.a.The hardware requirements for IoT-based smart charity boxes include some key components needed to ensure system functionality and performance.First, a microcontroller like the Wemos D1 Mini is used as the brain of the system, controlling the entire operation and data communication.PIR sensors are needed to detect movements around the charity box and trigger certain actions, such as making voices or sending notifications.The TCS3200 color sensor is used to calculate the amount of money put into the charity box with accuracy.In addition, an integrated WiFi module is essential for connecting the system to the Internet network, enabling the delivery of measurement data to the server or website in real-time.All of this hardware must be carefully selected to ensure compatibility and effectiveness in supporting the smart charity box function.Some hardware required are as follows: Wemos D1 Mini, DFPlayer Mini, Pir Sensor, Color Sensor TCS3200, LCD I2C 16x2, Speaker.b.Software needs for IoT-based smart charity boxes cover several key components.First, microcontroller software, programmed using the PHP programming language, is required to manage sensors and WiFi communications.Second, server software or backend with PHP is used to receive, store, and process data from charity boxes.Third, a web-based user interface developed using PHP to build web pages that display data in real-time.PHP will process the data from the server and generate HTML content and provide interactive dashboards.Some software required are as follows: Arduino IDE, Website, Sublime text, XAMPP, PHP.

Design
After the needs are analyzed and determined, the design stage of the system is carried out.Based on the collected needs, the developer team designs the system architecture, including the design of hardware and software.
a. Database Planning Design tool for an IoT-based smart charity box involves several key steps to ensure functionality and effective integration between hardware and software components.The tool aims to design and build a smart charitable box system that can remind people to do charity and calculate the amount of money that goes into the box automatically and can be monitored through a website.
The product was developed using the Wemos D1 Mini, the PIR sensor and the DFPlayer Mini.The selection of the microcontrollers for the IoT-based smart box charity project is based on the fact that one of the main features of the Wimos D1 mini is the presence of a built-in WiFi module.(Nisa et al., 2024) This allows the charity box to connect directly to the Internet network without the need for additional devices, making it easy to send the measurement data to a server or website.Although small, the Wemos D1 Mini provides enough GPIO (General Purpose Input/Output) pins to connect a variety of sensors and additional components needed in the project.Meanwhile, the PIR sensor is configured to activate the DFPlayer when movement is detected and the speaker will make a sound.
The website integration for IoT-based smart charity boxes aims to provide a user interface that enables real-time monitoring and management of donation data.Uses PHP as a backend server that can receive data from the Wemos D1 Mini microcontroller.This server will handle data requests from the microcontrollers and store them in the database.A database to store information received from the charity box, such as inputs, donation amounts, and sensor data.This website can be monitored by anyone, at any time, using any device connected to the Internet.
The primary objective of the IoT-based smart charity box design is to improve efficiency and effectiveness in the management and monitoring of charity donations.By integrating IoT technology, the system is designed to simplify the paper counting process automatically and provide notifications when movement is detected, thereby encouraging greater public participation.In addition, by leveraging internet connectivity, the data of the measurements can be monitored in real-time through the website, enabling the administrator to obtain accurate and up-to-date information about the activities of the charity.This aim not only increases transparency and accountability, but also makes the charity process more attractive and interactive, encouraging more people to contribute and participate in charitable activities.

Encoding
At this stage, the developer team begins to write code and build the system according to the design that has been made.

• Web design
In the web design phase, a system workflow is organized that functions to read data from the tcs3200 sensor and send it to the database.To support the web design of these servers, various software such as Visual Studio Code and Xampp are used.The generated sensor data is then stored using phpMyAdmin that is integrated into Xempp, with the MySQL database as its primary repository.This process ensures that data from the sensor can be accessed and managed efficiently through a well-designed web interface.o Hardware Network • Tool Network Planning The suite of tools for IoT-based smart charity boxes consists of several key components that work together to effectively monitor and report data.PIR sensors are used to detect the presence or movement around charity boxes.The sensor TCS3200 used to read the nominal amount of the banknotes entered.The I2C LCD displays information such as the donation amount or system status in real-time.The DFPlayer Mini module and speaker allow playback of voice messages as feedback to the user.All of these components are connected to a microcontroller connected to the internet network, allowing the data to be sent to a server for further monitoring and analysis.The system integrates various technologies to improve the functionality and interactivity of the charity box.• User Interface Design The user interface (UI) on a website is the elements that allow users to interact with the content and features offered by the site.The web UI includes visual components such as menu navigation, buttons, forms, icons, and other interactive elements designed to make it easier for users to navigate and use the site.Here is the user interface that has been designed: In Figure 8 above, the display of the tool is shown.This tool will be tested to calculate the nominal amount of money using several banknotes, using a TCS3200 sensor connected to a microcontroller.This image shows the tool, which displays a number that shows the nominal amount of money that has come in and the total amount of nominal that has been entered.

c. Testing
The testing stage is carried out to ensure that all components work correctly and according to the specified specifications.
• Hardware Testing • Testing of Mini PIR Sensor HC-SR501 Pear sensors are passive infrared sensors used to detect motion.These sensors work by detecting changes in infrared radiation emitted by moving objects, such as humans or animals.(Juliansyah et al., 2021) So the wiring or wiring of this pir m sensor-sr501 to Wemos d1 mini is as follows: • The sensor OUT pin is connected to the D3 pin of the Wemos d1 mini • The sensor VCC pin is connected to the 5V pin of the Wemos d1 mini • The sensor's GND pin is connected to the G-pin of the Wemos d1 mini In this test, researchers placed charity boxes in front of the mosque's entrance to detect the movement of people entering using PIR sensors.• DFPlayer Mini Testing DFPlayer Mini is a small audio player module designed to play audio files from an SD or USB card.The module has a serial interface that makes it easy to integrate with microcontrollers such as the Wemos D1 Mini, allowing simple programming to play audio files in MP3 or WAV format.(Nisa et al., 2024) DFPlayer Mini can be set to control volume, select tracks, and manage playback modes directly via serial commands.With these capabilities, the DFPlayer Mini is ideal for applications such as voice notification systems, audio-based DIY projects, and interactive devices that require sound output.
DFPlayer testing that is active when the PIR sensor detects motion involves the integration between the motion sensor and the sound player module.PIR (Passive Infrared) sensors are used to detect the presence of motion in a specific area by monitoring changes in infrared radiation emitted by hot objects, such as humans.When the PIR sensor detects Motion in a maximum response of 7 meters, it will transmit a digital signal to the microcontroller or control system.In this test, the signal was used to activate DFPlayer, an MP3 player module that can play audio files from a microSD memory card.Figure 12 illustrates that when motion is detected, the PIR sensor will send a signal to the DFPlayer.Next, DFPlayer will send a signal to Wemos, and Wemos will forward the signal to the speaker, so that the sound corresponding to the file on the DFPlayer memory card will come out.

Figure 12. PIR Sensor Display Detects Motion
Figure 14 illustrates that when motion is detected, the PIR sensor will send a signal to the DFPlayer.Next, DFPlayer will send a signal to Wemos, and Wemos will forward the signal to the speaker, so that the sound corresponding to the file on the DFPlayer memory card will come out.
• TCS3200 Color Sensor Testing TCS3200 Color Sensor is a sensor that is capable of detecting and measuring the color of an object.(Singgih & Kandungan, n.d.)So the wiring or wiring from the PIR mini sensor HC-SR501 to the WEMOS D1 mini is as follows: o The sensor OUT pin is connected to the D7 pin of the wemos d1 mini o The sensor S2 pin is connected to the D6 pin of the wemos d1 mini o The sensor S3 pin is connected to the D5 pin of the wemos d1 mini o The sensor VCC pin is connected to the 5V wemos d1 mini pin o The sensor's GND pin is connected to the Wemos d1 mini G pin This sensor is only intended to count the number of banknotes that go into the charity box.In the testing process, banknotes of all types except nominal Rp.75,000 were used.Testing the tcs3200 color sensor was tested 10 times for each banknote.This is made because of minor mistakes that often occur when putting money into the comma.• I2C LCD Testing LCD I2C is a display module that combines an LCD screen with an I2C (Inter-Integrated Circuit) interface to facilitate data communication between the microcontroller and the display.Using an I2C interface, the module requires only two communication pins-SDA (Serial Data Line) and SCL (Serial Clock Line)-to function, which simplifies the connection and reduces the number of wires required compared to traditional parallel interfaces.(Suryantoro, 2019) I2C LCD testing is carried out by displaying data from TCS3200 color sensors obtained through serial monitors, namely displaying incoming balances and balance amounts.

CONCLUSIONS
The conclusion that can be drawn from the design of the Komapin prototype is that it utilizes a Photoelectric Sensor system based on Fuzzy Control to generate data that can be transferred to the relevant software.There is efficiency when Komapin is implemented regularly, as it can directly detect the process of filling a donation box.

Figure 4 .
Figure 4. Install Board Figure 6.Tool Range Figure 7. User Interface Display

Figure 11 .
Figure 11.Display When DFPlayer Starts the Program or is on

Table 1 .
Total Database Planning Table

Table 2 .
PIR sensor Test

Table 3 .
TCS3200 Sensor Percentage Test With Banknotes