CABI Machine

CAsh From Botol Inovatif

Implementation of a Near Field Communication-Based Reverse Vending Machine for a Rice-Incentivized Recycling Program Using an MIT App Inventor Mobile Application.

CABI Machine poster
99%Bottle detection accuracy
100%Critical black-box tests passed
98.25SUS score (Excellent)
10 pts= 1 portion of rice

About Researcher

CABI Machine was developed by two students of SMA Negeri 1 Semarang, Central Java, Indonesia, and presented under Fakultas Teknik Universitas Brawijaya for IYSA and the World Youth Invention and Innovation Award (Indonesia).

CABI Machine research poster

Farra Fidela Andraya

Researcher · SMA Negeri 1 Semarang
farra.file@gmail.com
CABI Machine research poster

Damita Arindi Zalfa

Researcher · SMA Negeri 1 Semarang
damitazalfa9@gmail.com

Abstract

Low public participation in plastic-waste recycling is partly caused by limited direct incentives and inefficient collection systems. CABI is a Reverse Vending Machine (RVM) prototype that accepts PET bottles and awards points automatically. Points can be exchanged for rice through an integrated dispenser. The prototype uses an ESP8266, RC522 NFC reader, HC-SR04 ultrasonic sensor, OLED display, metal-gear servo, Firebase, and an MIT App Inventor application.

Keywords: Reverse Vending Machine, NFC, ESP8266, Internet of Things, Firebase, MIT App Inventor, recycling, rice incentive.

Introduction

Background

Plastic waste keeps growing with single-use packaging. PET beverage bottles pile up in landfills, pollute soil and water, and take very long to decompose. Collection programs exist, but participation stays low because people rarely receive a direct benefit, and manual record-keeping causes errors in counting waste and incentives.

A Reverse Vending Machine accepts used packaging and rewards the user, automating collection, counting, and incentives. Some RVMs still rely on coupons or records not linked to user identity and an online database. CABI addresses this: it reads user identity by NFC, detects bottles, calculates points, stores data in Firebase, and shows balances in a mobile app.

Each accepted bottle is one point (IDR 100). At 10 points (IDR 1,000) the user presses the exchange button and receives one preset portion of rice, a staple food that gives direct social and economic value.

Research Questions

  1. How to detect and count PET bottles automatically?
  2. How to use NFC to identify and verify users?
  3. How to integrate ESP8266, Firebase, and MIT App Inventor to record and display balances?
  4. How to automate exchanging 10 points for rice?
  5. What are the functional success rate and usability level?

Research Benefits

Academic: example of NFC, IoT, and cloud in waste management. Practical: faster, more transparent recording. Environmental: more bottle collection. Social: rice as a direct benefit. Technological: integrated microcontroller, sensors, cloud, and app.

Theoretical Foundation

Reverse Vending Machine

An electromechanical device that accepts used packaging and gives money, coupons, points, or goods. Parts: insertion slot, detection sensor, counting system, controller, storage, transaction record, and incentive unit. In CABI the incentive is points exchangeable for rice.

PET Plastic Bottles

PET is widely used for beverage bottles and can be recycled when properly collected. The ultrasonic sensor only detects and counts bottles; it does not analyze material, so inserted objects are assumed to be PET.

Near Field Communication

Short-range wireless at 13.56 MHz. Each card has a UID that identifies the user. The RC522 reads it and the ESP8266 compares it with Firebase. Unregistered cards show “UID Not Registered”.

ESP8266

Wi-Fi microcontroller that reads the UID and sensor, counts bottles, calculates points and balance, drives the OLED and rice dispenser, and syncs with Firebase.

HC-SR04 Ultrasonic Sensor

Measures distance from the time between emitted and reflected waves. A distance threshold and reading delay stop one bottle being counted twice.

Firebase

Cloud database storing UID, user name, bottle count, points, rupiah balance, deposit and redemption histories, and transaction time.

MIT App Inventor

Block-based app platform. The CABI app registers users, links names to UIDs, and displays bottle count, points, rupiah balance, transaction history, and redemption requirements.

Point & Rice-Redemption System

  • 1 accepted PET bottle = 1 point = IDR 100
  • 10 points = IDR 1,000 = one preset portion of rice
  • Redemption deducts 10 points, opens the gate, releases rice, then closes the gate. Point value is adjustable.

Research Methodology

Time and location: September–November 2025 and August–September 2026; design, assembly, and field tests in a residential environment in Semarang, Central Java. Application tested by 10 respondents using NFC cards with different UIDs.

Method: Research and Development with a prototyping approach.

  1. Problem identification and literature review
  2. System design and hardware assembly
  3. ESP8266, Firebase, and MIT App Inventor development
  4. Hardware–software integration
  5. Rice-dispenser mechanism
  6. Black-box and field testing
  7. SUS testing, data analysis, reporting

System architecture

Hardware (ESP8266, RC522, HC-SR04, OLED, servo, storage, rice dispenser) → Firebase database → MIT App Inventor app.
Data flow: NFC Card → RC522 → ESP8266 → Firebase → Mobile App.
Reward flow: Bottle → Sensor → Point Added → Exchange → Point Verification → Rice Dispensed.

PeriodActivity
Sep 2025Literature review, system design, hardware development
Oct 2025Mobile app, Firebase, integration, black-box testing
Nov 2025Field testing and data analysis
Aug 2026Add-on design and rice-redemption development
Sep 2026System testing, user evaluation, data analysis

1. Authentication

Standby, scan NFC card, RC522 reads UID, ESP8266 checks Firebase. Registered users see name, bottles, points, balance.

2. Bottle insertion

HC-SR04 detects, delay prevents double count, then +1 bottle, +1 point, +IDR 100 shown on OLED.

3. Rice redemption

Exchange button checks 10 points. Fewer shows “Insufficient Bottles” with no deduction. Otherwise deduct, dispense, record.

4. Data update

After 10 seconds of inactivity the session ends and the ESP8266 uploads data to Firebase for the app.

Testing techniques

System Usability Scale: 10 respondents completed the 10-item questionnaire after using the app. Black-box test: NFC scanning (registered and unregistered), bottle detection, point calculation, insufficient-point rejection, point deduction, dispenser activation, Firebase updates, and app display.

CABI-RVM operational flowchart

Figure 1. Complete CABI-RVM operational flowchart.

Results and Discussion

Tools and materials

ESP8266 (processing and Wi-Fi), RC522 NFC module (authentication), HC-SR04 (bottle detection), 0.96-inch I2C OLED (status display), metal-gear servo (rice gate), PlatformIO/Arduino IDE/VS Code, MIT App Inventor, Firebase, NFC card ISO 14443 Type A/B, and standard PET bottles.

Development

The firmware is state-based: wait for card, verify UID, display balance, count bottles, check exchange, validate points, dispense rice, update Firebase, reset. Points are deducted before the dispenser runs, so rice is never released without a recorded transaction.

Black-box test results

#Test scenarioActual resultStatus
1System powered onOLED showed scan instructionPassed
2Registered NFC cardUser data matched FirebasePassed
3Unregistered NFC cardWarning message appearedPassed
4–5One PET bottle inserted and acceptedDetected; +1 point and IDR 100Passed
6Several bottles insertedTen bottles = 10 points / IDR 1,000Passed
7Exchange with fewer than 10 pointsRejected, balance unchangedPassed
8–9Exchange with at least 10 pointsRedemption started; balance reduced correctlyPassed
10–11Dispenser activation and cycle endRice released in one cycle; gate closedPassed
12No activity for 10 secondsLatest data stored in FirebasePassed
13App reads registered UIDData matched FirebasePassed
14New user sessionNext user's data loaded correctlyPassed

All critical functions operated as designed: black-box success rate 100%.

Bottle detection: 99%

Errors may occur when a bottle is inserted too fast, sits outside sensor range, or several objects pass at once. The sensor detects presence only; verifying PET would need extra sensors or Computer Vision.

Firebase updates

Uploads after 10 seconds without activity, grouping bottles into one session: bottle count, points, balance, time history, redemptions, balance after redemption. The OLED still updates instantly.

SUS score: 98.25

10 respondents; rated Excellent, Acceptable, with very high user acceptance. The app was easy to understand and users felt confident.

Discussion

NFC ties every transaction to the right user and is more efficient and less error-prone than manual records. The ESP8266 connects directly over Wi-Fi without extra modules. One bottle equals one point equals IDR 100, so the value is easy to grasp, and rice gives a tangible staple-food benefit that may raise motivation.

Limitations

Conclusions and Recommendations

Conclusions

  1. An RVM prototype that accepts and counts PET bottles was produced.
  2. The RC522 read NFC UIDs and linked transactions to user data.
  3. The ESP8266 controlled the sensor, OLED, exchange command, dispenser, and Firebase.
  4. Each bottle became one point (IDR 100).
  5. Users with at least 10 points could exchange them for one portion of rice; insufficient balances were rejected.
  6. After redemption the system deducted 10 points, ran the dispenser, and recorded the balance.
  7. Data uploaded to Firebase after 10 seconds without activity.
  8. Bottle detection reached 99%, black-box tests 100%, and SUS 98.25 (Excellent).
  9. CABI integrates environmental, technological, and social benefits in a rice-incentivized recycling system.

Recommendations

  1. Add Computer Vision to identify packaging shape, type, brand, and condition.
  2. Add a load cell for accurate rice portions.
  3. Add level sensors for rice and bottle storage.
  4. Add a bottle-compression mechanism.
  5. Add local storage for internet outages.
  6. Add alerts when rice is low or storage is full.
  7. Improve card and transaction security against unauthorized UID use.
  8. Test longer with more users.
  9. Add more rewards while keeping rice as the primary incentive.
  10. Accept other packaging such as aluminum cans.

Poster