Arduino-based Reverse Vending Machine Metal Medicine Packaging Exchange Reverse Vending Machine Pertukaran Kemasan Obat Berbahan Logam Berbasis Arduino

data


Preface
Technological developments have penetrated in the field of food or beverages that are often used, one example is in instant drinks that are widely consumed today. Instant drinks are often found in crowded places and tourist attractions. Vending machines themselves have been widely used to make it easier for consumers to buy food and especially soft drinks with a certain amount of money to choose into the machine and then it is able to be purchased [1].
By utilizing the opposite of the working principle of a vending machine, the writer was interested in exploring development with the reverse principle [2]. To make the buying and selling process easier, more practical, and less time-consuming, a reverse vending machine was built where drug packaging containing metal is the input.
The reason why the writer took medicine packaging contained metal because its waste is easily separated from landfills and is able to be recycled into materials of artistic value, melted back into the original material, as a cement mixture, and so on [3]. The usual price charged for aluminum foil wrapping that has been cleaned is around Rp. 3,000 per kilogram [4]. Based on this price, the machine is programmed to read the weight of 100 gram drug packaging waste is Rp. 300.
The potential for the increasing number of metal drug packaging waste along with the Covid-19 pandemic has made the writer make this as a problem topic in this research. Therefore, the writer aims to build a reverse vending machine.
The writer did several observations from related journals and e-books about reverse vending machines. This prototype accepts an object in the form of drug packaging as input which will generate money in the form of coins as output. This study intended as an effort to simplify the process of selling waste with the benefits offered in the form of coins to motivate users to dispose of waste in its place.
Arduino is hardware as well as software that allows anyone to make prototypes of microcontroller-based electronic circuits easily and quickly. The language used is simple and easy to learn, the cost is low, and the software and hardware are open source, making the programming process easier [5]. The writer used arduino uno as a microcontroller in the manufacture of reverse vending machines for metal detection in drug packaging.

Literature Review
The design of a reverse vending machine as a machine for converting banknotes into coins which aims to make it easier for mini markets and banks in the process of exchanging money. The end result is that the tool can function as a vending machine to exchange Rp. 5,000 with 5 coins Rp. 1,000 [6]. The use of the TCS3200 color sensor as a banknote reading. The use of this color sensor has a weakness, namely because the function of the sensor only reads RGB colors which results in all paper having the same color as Rp. 5,000 will read like real money.
Research on Reverse Vending Machine with plastic bottles as input and tickets as output for currency exchange. The purpose and benefit is that more and more people use this vending machine, the amount of plastic packaging bottle waste can be reduced and improve the quality of environmental hygiene in general [2]. The use of 3 IR sensors as plastic bottle readers can produce inaccurate results.
On the Design of a Rupiah Banknote Return System on an Arduino Uno-Based Vending Machine which discusses the banknote return system on a Vending machine using a color reading sensor from banknotes [1], using the TCS3200 sensor as a banknote reading.
Furthermore, the Reverse Vending Machine which aims to exchange bottled waste into writing tools is useful to attract students to throw garbage in its place and make it easier for students if they need stationery. The use of Arduino Mega2560 which works as a control center system of the tool. Arduino Mega2560 controls several important parts of this tool, namely infrared sensors, servo motors, and LCD [7].
Another research is about buying and selling machines that use money as input which is exchanged into the machine into drinks as output. Designing a vending machine that works based on the detection of money entered so that it is useful in helping facilitate the economy for the community in terms of buying and selling [8].

Research Methods
The writer conducted an analysis related to the types of drug packaging detected by sensors which are determined as variables of need. Sensors detect drug packaging containing only metals such as : a. Blister Packaging, Blister packaging material is the most common packaging material for solid preparations such as tablets and capsules. This packaging is made of plastic that can be molded by heat, also equipped with aluminum foil that is easy to tear by hand. b. Strip packaging, packaging consisting of two sheets of aluminum (example: Noza, generic drugs such as dextromethorphan) c. Aluminum Tube Packaging, Aluminum tube is the most popular primary packaging material in the form of metal. Besides that, there are cans too. d. Sachet Packaging, the drug sachet packaging that can be detected here is metalized aluminum foil packaging (packaging containing aluminum) The tools and materials needed include hardware and software. The software as a regulator of the running of the program and the hardware as the end result is the reverse vending machine itself. Here are the tools and materials used. a. Hardware The hardware used in this system was in accordance with the hardware requirements that would be built. Table 1. is a description of these needs. Software is able to be said as a translator or converter of high-level programming language instructions to a language understood by machine language. The following is a list of software used in this study, namely: 1) Microsoft Windows 10, operation system 2) Arduino IDE, Arduino application and programming language Data collection techniques can be obtained directly from the object of research and references that have been obtained, the ways that support to obtain data carried out during research are as follows: a. Observation Observation is an activity of collecting data needed for a research [9]. Observations were made by observing the surrounding conditions as well as the object being the topic, namely drug packaging containing metals such as any type of aluminum packaging that can be detected by sensors and recording the data that has been obtained from the observations. Based on observations, the data that can be used in this study are in the form of packages that can be detected by sensors, such as blister packs, strip packaging, sachet packaging, and aluminum tubes. b. Literature Review The literature study method is an activity to study, explore and quote theories or concepts from a number of literatures, both books, journals, magazines, newspapers or other written works that are relevant to the topic, focus or research variable [10]. At this stage the writer collected several electronic books (e-books) and research journals from other sources with titles that almost resemble research titles such as about reverse vending machines, Arduino, or other related materials as relevant reference sources for research proposals being carried out.. System requirements must be in accordance with the conditions and abilities of the user, therefore the writer who is also the maker who builds the program, participates in involving users in finding and analyzing system requirements that support the design process and build a Reverse Vending Machine for Metal Detection in Drug-Based Packaging Arduino. a. Data Analysis The writer collects data needs by observing drug packaging containing metal that can be detected by sensors such as blister packs, strips, aluminum tubes, and sachets so that they can be exchanged for money..

b. Process Analysis
The writer divides the steps in the reverse vending machine processing through three buttons, namely the metal detection button, the weigh button, and the coin button. The metal detection button functions so that the prototype goes into metal detection mode, the weigh button functions so that the packaging is weighed, and the coin button functions as a coin dispensing button. c. Weakness Analysis When analyzing, the writers found deficiencies in the processing and calculation of the money that will be output, namely in the process of calculating money, coins will be rounded up to the smallest hundreds so that they will experience a slight loss. And it takes time in the metal detection process and also the process of issuing coins. a. Process Design Flowchart is a technique to describe the logical sequence of a problem solving procedure. Flowchart is a problem solving step in the form of certain symbols [11]. The following is a flowchart of the Arduino-Based Reverse Vending Machine Metal Medicine Packaging Exchange presented in Figure 1. In Figure 1 it is explained that the initial process starts by pressing button 1 so that it enters metal detection mode. If it contains metal, the buzzer will sound and the entrance of the medicine package will open for a few seconds then close again and if it does not contain metal the buzzer will not sound and the entrance of the medicine package will not open. The next step is to press button 2 to weigh the weight of the drug package in the weighing room, which will then be displayed on the interface screen. After that, to issue the output by pressing button 3 and the servo will move to push the coins one by one.
The development of this tool uses a type of software development in the form of a prototype. the stages carried out by the prototype method are data collection, system design, and system testing. The first stage is the process of gathering requirements such as data related to research and the needs of the system being developed. At this stage, the writer collect data in the form of types of drug packaging that can be detected by sensors such as blister packaging, strip packaging, sachet packaging, and aluminum tube. The second stage is the design process and making the system prototype starting from the design of the prototype form design, source code, and the last stage is testing the system created and then evaluating [12] b. Hardware Design The following is a circuit design of the hardware Arduino-Based Reverse Vending Machine Metal Medicine Packaging Exchange. Figure 2 is a circuit design of the machine to be made. Arduino uno as a machine controller will be placed inside the tool along with the breadboard and servo motor. While the proximity sensor, buzzer, weight sensor and LCD will be placed outside as an identifier and interface. In making a prototype reverse vending machine for metal detection Arduino-based on drug packaging, the first thing the writer did was to complete the necessary tools and materials. After the tools and materials are available, the writer designs the prototype to be built. Starting from prototype 1 to 4 (final). 1) Prototype 1

Figure 2. Hardware Design of Reverse Vending Machine
In the initial design, the writer made a prototype in the form of 1 large box. All hardware is in a box as in the following picture.

Figure 3. Design of Prototype 1
In Figure 3 the prototype is built in 1 box so that all hardware is placed in the box. Starting from the sensors as well as the coins that are output. This causes limited space as a place for Arduino and connecting cables so that it will cause difficulties if there are problems with the wiring or Arduino connection to other hardware.
In this prototype there is still no button on the processing core. The placement of the LCD as an interface has not yet been determined. In the weighing section, a bulkhead has not been made as a barrier to form a weighing room so that the waste does not fall directly to the bottom or the lever as a pusher for garbage so that the scales are clean.
After testing, the placement of the load cell sensor as shown in Figure 3 causes the balance calibration to be disturbed because the sensor is placed hanging. Load cell is a sensor that can convert the amount of force or load into electrical quantities. This sensor is used to measure the resistance generated by a model ship or object, measure the interaction force between floating objects, can measure the force required to produce water waves on a wave generator, and if it is conditioned waterproof can be used to measure water pressure at the bottom of the pool at one point [13]. The hanging position causes the sensor to be unstable, that is, it will move downward if there is a heavy enough load on it.
2) Prototype 2 Based on the weaknesses of the test results on prototype 1, the writer divides the box into 3 according to their respective functions as in  In prototype 2 design, the box is divided into 3 parts which solve the problem of limited space for the Arduino. Connecting cables become more organized and flexible. However, this prototype design still has weaknesses.
In the coin case, the coin is pushed by a servo so that the coin can be pushed into the sloping bulkhead with the aim of sliding out of the box. Servo motor is one type of actuator or drive [14]. However, this has the disadvantage that when sliding, some coins will get stuck so they can't get out of the coin box.
Detection of drug packaging using a metal sensor (proximity sensor). Proximity sensor is a device that detects the presence and proximity of objects in the form of metal or non-metal [15]. In the drug packaging box, after detecting the drug with a metal sensor, the servo will immediately open and lead to the weighing sensor. The weighing sensor placement is no longer hanging so it doesn't interfere with the calibration process. However, the weighing room system has not yet been implemented, causing the fallen packages to be scattered or not falling on the weighing sensor.
The placement of the processing box, namely the arduino box that separates, is considered appropriate. In this prototype design, the button system has not been used as the processing core and the LCD placement has not been determined.

3) Prototype 3
In prototype 3, the writer focuses on developing drug packaging boxes. The use of bulkheads in the form of inclined planes, placement of load cell sensors with pedestals, and packaging dumps as shown in Figure 5.  The use of a bulkhead in the form of an inclined plane turned out to be very ineffective, namely that there were several drug packages that could not slide into the load cell sensor which caused the packaging to get stuck. The load cell sensor is placed hanging but is given a pedestal with the aim of being able to adjust the calibration, but the results are still the same, namely the calibration is still unstable.
Above the load cell sensor, a lever is made which is used as a pusher for the drug packaging after weighing to clean the load cell sensor. At the bottom there is a door as the exit of drug packaging which is also considered appropriate.
The Arduino box is still the same as prototype 2, that is, there are still 3 buttons as the processing core and the LCD as an interface. In the coin box, there is a coin tube for storing coins. In the coin box, there have been no significant changes.

4) Prototype 4
This prototype is the final prototype used for this final project. In this design, 4 buttons have been used as the processing core and the LCD screen as the interface as shown in Figure 6. The coin box does not use an inclined plane as a coin carrier but uses a flat plane and is driven by a servo attached to a DVD or cassette. Use of tube-shaped coin holder as coin storage.
In the Arduino box there is an LCD as an interface and 3 buttons as the core of the processing. Button 1 as metal detection button, button 2 as weighing button, and button 3 as coin button.
In the drug packaging box, a weighing room system is made, namely a bulkhead with hinges that can function as a holder for drug packaging in the weighing room when the weighing room lock is installed and as an exit door for drug packaging from the weighing room when the weighing room lock is removed. The place for inserting drug packaging is narrowed so that the packaging can go directly into the weighing room. The placement of the load cell sensor is made not to hang like the picture so that the calibration process is not disturbed.