p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Prototype of A Smart Trash Bin for Trash Composting
Based on Load Cell HX711 and Ultrasonic Sensors
Joni Welman Simatupang1*, Abdul Aziz Ar-Rafif2
1,2
Electrical Engineering Study Program, President University, Cikarang - Jawa Barat, Indonesia
*Corresponding author:
[email protected]Accepted: November 20, 2024 Approved: Februari 1, 2024
Abstract
Waste management is one of serious problems in Indonesia. Based on data from the Ministry of
Environment of the Republic of Indonesia states that out of 156 cities/regencies, the amount of waste
produced is around 17 tons/year. In Bekasi Regency, in 2021 the amount of waste produced is 1,194 tons.
Also, burning and stockpiling in the final disposal site still dominating. This research aims to make a Smart
Trash Bin for composting process. We use Arduino Uno as a microcontroller with Ultrasonic Sensor HC-
SR04 to detect the distance. We also use the sensor Load Cell HX711 as a waste weighing, where the results
will be displayed on the LCD and compared with manual scale. For composting, we use POC EM4 which
is mixed with organic waste to speed up fertilizer production. Therefore, trash that goes into the smart trash
bin will be soaked in EM4 liquid and waiting for 20-30 days to get composting results. The accuracy of the
weighing average reached 90%, from 10 trials where only once the prototype failed to read it correctly. The
compost produced was good. As the current system has its limitations, expanding the capacity of the
prototype's scales would augment its waste-handling capabilities.
Keywords: trash bin, load cell HX711, ultrasonic sensor HC-SR04, organic waste, compost
Abstrak
Pengelolaan sampah merupakan salah satu masalah yang serius di Indonesia. Berdasarkan data
Kementerian Lingkungan Hidup Pemerintah Republik Indonesia menyatakan bahwa dari 156
kota/kabupaten, jumlah sampah yang dihasilkan sekitar 17 ton/tahun. Di Kabupaten Bekasi, pada tahun
2021 jumlah sampah yang dihasilkan sebanyak 1,194 ton dan belum terkelola dengan baik karena masih
didominasi dengan cara pembakaran dan penimbunan di tempat pembuangan akhir. Penelitian ini bertujuan
untuk membuat Smart Trash Bin yang dapat melakukan proses pengomposan. Penulis menggunakan
Arduino Uno sebagai mikrokontroler dan Sensor Ultrasonik HC-SR04 untuk mendeteksi jarak. Penulis juga
menggunakan sensor Load cell HX711 sebagai penimbangan sampah yang hasilnya akan ditampilkan pada
LCD dan dibandingkan dengan timbangan manual. Untuk pengomposan, kami menggunakan POC EM4
yang dicampur dengan sampah organik untuk mempercepat produksi pupuk. Jadi, sampah yang masuk ke
tempat sampah akan direndam dalam cairan EM4 dan ditunggu sekitar 20 - 30 hari untuk mendapatkan
hasilnya. Setelah dilakukan pengujian, akurasi rata-rata penimbangan mencapai 90%, dari 10 percobaan di
mana hanya sekali percobaan gagal membaca dengan benar. Dan kompos yang dihasilkan juga baik.
Sebagaimana sistem ini memiliki kekurangan, maka dengan memperluas skala kapasitas akan
meningkatkan kapasitas pengelolaannya.
Kata Kunci: tempat sampah, load cell HX711, sensor ultrasonik, sampah organik, kompos
1. Introduction
According to the World Health Organization (WHO), waste is not used, disliked, or thrown away
that comes from human activities and does not happen by itself. Waste Management Act No. 18 of 2008
states that waste is the residue of daily human activities and from natural processes in solid form. Garbage
is an item considered unused and discarded by the previous owner/user, but in the mind of some people, it
can still be used if it is managed correctly [1].
Garbage itself is a crucial problem that is increasing from year to year throughout the world. Garbage
dumped into the environment can cause various environmental problems, such as water, soil, and air
pollution. The World Bank predicts that waste generation will increase from 2.01 billion tons in 2016 to
3.40 billion tons in 2050. At least 33% of this waste is mismanaged globally to date, open dumping or
incineration [2]. In addition, garbage can also cause health problems for living things on Earth. Moreover,
organic waste is a severe problem in Indonesia today, as with leftovers from vegetables, meat, and fruits.
Data from the National Waste Management Information System belonging to the Ministry of Environment,
8289
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
the Government of the Republic of Indonesia, states that out of 156 cities/regencies in Indonesia, the total
amount of waste generated is around 17 tons/year.
Waste generation from households is the largest producer of waste compared to other sources of
waste, namely 36%, greater than a waste generation from traditional markets, which is only 24%, and from
the proportion of household waste, 57% is dominated by organic waste, which is dominated by food scraps,
wood, twigs, and leaves. in TPST (Landfill) Bantargebang, from 2017 to 2019, the average trash’s weight
increased by 17.37% from 6561 Ton/day to 7702 Ton/day, where it consists of food waste (43%), plastic
(28%), fabric (8%), papers (5%) [3]. In Bekasi Regency itself it is still a serious problem where waste is
the main problem where in 2021 the amount of waste produced is 1,194 tons and it has not been managed
properly, namely still by burning and stockpiling in the final disposal site in Burangkeng [4]. Furthermore,
driven by the habits of people who tend to care less about waste management creates a severe problem that
the government must face.
Lack of knowledge of the community in managing organic and inorganic waste produced by
households, even though there are many ways to manage organic waste into new things that can be utilized,
such as making compost [5]. However, the community's knowledge of element extraction when composting
still needs improvement, which causes the quality of the compost produced to be poor and coupled with the
inefficiency of labor time in composting. Some people are reluctant to process waste into compost, coupled
with poor quality compost. The current mechanism for trash bins in public places is still dominated by an
empty container system and can only be used by some people as a container for piling up waste which will
later be picked up by cleaners and end up in a final disposal site. Likewise, with the trash bins around the
residential area, they are still just containers for piling up trash.
The final project has a distinct purpose outlined in the following manner. Firstly, it aims to design a
sophisticated trash bin system that leverages weight and distance measurements for optimal functionality.
Secondly, it seeks to comprehensively evaluate the efficacy and performance of the proposed prototype that
has been developed through this research.
The specific objectives of the final project, derived from the preceding context, manifest in two core
challenges. The first pertains to the conceptualization of a smart trash bin system engineered to facilitate
compost production. The second centers on gauging the effectiveness and efficiency of the prototype
generated within the course of this study.
In delineating the scope and limitations of this culminating project, a thorough examination is
conducted, incorporating considerations of data, methodologies, parameters, and observations.
Consequently, the research is designed to encompass certain domains. These domains encompass the use
of organic waste, encompassing vegetable scraps and residual bones from poultry and fish. The organic
waste is prepared in diminutive fragments measuring approximately 5 cm to expedite the composting
process. The prototype for the Smart Trash bins exhibits a constraint, accommodating a maximum of 300
grams of waste. The focal point lies in meticulously assessing the operational performance of the Prototype
Mechanism. Furthermore, the ultrasonic sensor's functionality is delimited, with its object detection
capacity calibrated within the range of 3 to 5 cm.
However, it is noteworthy that certain aspects fall beyond the purview of this research's scope. These
encompass instances where the developed prototypes and designs lack the capability to detect objects
beyond predetermined parameters. Additionally, the discourse does not extend to matters of waste sorting
methodologies. Lastly, the research refrains from addressing the quality evaluation of the generated
compost.
2. Material and Methods
a. Hardware
Arduino Uno
Arduino Uno is a microcontroller combination of a microprocessor with memory and input
or output, as well as other devices, such as a timer on a microchip [6]. Arduino Uno has a flash
memory capacity of 32 Kb, 14 Digital Pins, 6 PWM Pins, and 6 Analog Pins. Fig. 1 shows the two-
dimensional look of Arduino Uno board.
8290
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Fig. 1: Arduino Uno board [7]
Ultrasonic Sensor HC-SR04
The HC-SR04 ultrasonic sensor uses sonar to measure the distance to an object. The sensor
measures from 2 cm to 400 cm (0.8 to 157 inches) with an accuracy of 0.3 cm (0.1 inch). This is
suitable for most hobby projects. Additionally, this particular module is equipped with an ultrasonic
transmitter and receiver module.
The HC-SR04 ultrasonic sensor works as follows. An ultrasonic transmitter (trigger pin)
emits a high frequency sound (40 kHz). And sound travels through the air. When the object is
found, it returns to this module at the end. An ultrasonic receiver (echo pen) records the reflected
sound (echoes) [8]. Fig. 2 shows the ultrasonic sensor HC-SR04 module.
Fig. 2: Ultrasonic sensor HC-SR04 module [9]
LCD I2C 16x2
An LCD is a layer of organic mixture between a transparent glass layer with transparent
indium oxide electrodes in the form of a 7-segment display and an electrode layer on the back of
the glass. Long cylindrical organic molecules align to the segmented electrodes when the electrodes
are activated by an electric field (voltage). The sandwich layer has a vertical polarizer on the front
and a horizontal polarizer on the back, followed by a reflective layer. Reflected light cannot
penetrate the aligned molecules, darkening the activated segments and forming features in the
displayed data. Fig. 3 shows the LCD I2C 16x2.
Fig. 3: LCD I2C 16x2 [10]
MG-995 Gear Servo Motor
A servo motor (or servo) is a self-contained electrical device that rotates or drives mechanical
parts with high precision. A servo moves a lever back and forth to control the rudder and adjust the
wing surface. A servo controls the resulting speed by rotating a shaft connected to the engine's
8291
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
throttle he valves. The heart of the servo is a small DC motor. The motor runs on battery power and
spins very fast (revolutions per minute) but produces very little torque. The transmission
configuration absorbs and slows down the engine's high rotational speeds while simultaneously
increasing torque. The gear design of the servo box translates power to a much slower speed, but
provides more torque (more power, less travel). The gears of the MG-995 servo motor are made of
metal for greater efficiency and strength when lifting loads [11]. Fig. 4 shows the MG-995 gear
servo motor.
Fig. 4: MG-995 gear servo motor
Load Cell
A load cell sensor is a type of load sensor commonly used to convert a load or force into a
change in voltage. The change in stress depends on the pressure generated by the load. A load cell
sensor contains a strain gauge, an electronic component that measures pressure. A strain gauge is
configured as a Wheatstone bridge circuit. A Wheatstone bridge consists of four resistors connected
in series and in parallel. Load cell sensors are made of various materials such as aluminum, steel,
stainless steel. The strain gauge is in the form of metal foil or metal wire which is insulative
(isolation) attached to the load cell sensor which can measure the pressure from the result of loading
[12]. Fig. 5 shows the load cell.
Fig. 5: Load cell [13]
b. Software
Arduino IDE
Arduino is an open-source physical computing platform. Arduino is more than just a
development tool, it is a combination of hardware, a programming language, and a sophisticated
integrated development environment (IDE). An IDE is a piece of software that writes a program,
compiles it into a binary, and downloads it to the microcontroller's memory.
c. System Design
Block Diagram
In this work, we use an ultrasonic sensor to measure the distance of objects as a reference or
input. The input will be stored as data by the sensor and then sent to the microcontroller. At the
8292
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
processing stage, data will be processed using Arduino UNO. Then this data will be used as the
basis for the MG-995 Servo and 12x6 LCD for each of them to work according to its function. The
data that the microcontroller has read will be displayed on the 12x6 LCD screen in real-time. At
the same time, the data sent by the Arduino UNO will then be processed by the MG-995 servo.
Fig. 6 shows the block diagram of the prototype design.
Fig. 6: Block diagram of the prototype design.
System Flowchart
Fig. 7 shows the flowchart of the system prototype.
Schematic Diagram
Fig. 8 shows the schematic diagram of the prototype.
Fig. 8: Schematic diagram of the prototype.
8293
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Fig. 7: Flowchart of system prototype.
3. Results and Discussion
Full Prototype
By combining hardware design with design software, implementation of prototype designs of
transmitter units and sensor units can be seen in Fig. 9. The prototype was then evaluated with a set of
testing for several parameters to get the results according to the aim of this study.
(a) (b)
8294
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
(c) (d)
Fig. 9: Prototype appearance; (a) Top view, (b) Back view, (c) Inside view, (d) Side View
Fig. 10 shows the real layout of the schematic diagram which is put inside the Arduino box.
Fig. 10: Layout of Arduino box.
Prototype Testing
From the measurement results of 10 objects using a prototype compared to using a standard scale, it
was found that the test was 100% successful. Suppose the carrot weighs 45 grams on the scale and the
prototype scale weighs 45 grams. Also, the information displayed on the LCD matches the results of the
scale as shown in Table 1. Even with over 100 grams of waste, the servo motors move very quickly due to
the resistance. However, the LCD and dial are still easy to read. Also, an ultrasonic sensor previously set
as an input to drive a servo motor. In the tests carried out, the author achieved good results, the mean of
which was consistent with the previously described code, then was less than 5 cm. Also, if the object is
larger than 5 cm, the ultrasonic sensor will read nothing. Fig. 11 shows a chart that compares the
measurement of an object's weight using the prototype and using scales.
8295
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Table 1. Garbage Weight Measurement Using Prototype vs Using Scale
Testing Trash Using scale (gram) Using Protoype (gram)
1 Mustard
2 Orange peel
3 Banana
8296
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
4 Cabbage
5 Beans
6 Carrot
7 Corn
8297
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
8 Pineapple
9 Snakefruit
10 Spinach
Fig. 11: Measurement result using prototype vs using scales.
The ultrasonic sensor reads a certain distance and gives the command to the MG-995 servo to open
the top door of the trash bin. All the experiments have been carried out according to the design that had
been made. The results can be seen in Table 2.
8298
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Table 2. Testing result for Sensor Ultrasonic
Testing Distance Status
1 5 Cm The Door is Open
2 10 Cm The Door is Open
3 20 Cm The Door is Open
4 40 Cm The Door is Open
5 80 Cm The Door is Open
6 120 Cm The Door is Open
7 140 Cm The Door is Open
8 160 Cm The Door is Open
In addition to testing the prototype, the authors also tested organic fertilizers. As previously said, the
method used in making these diapers is by reducing organic waste with an EM 4 liquid for approximately
20 - 30 days [14]. This EM 4 liquid assists in the decomposition of manure to be used in the composting
process. Fig. 12 shows the EM 4 liquid product.
Fig. 12: EM4 Liquid [15].
After mixing it with EM 4 liquid, the writer stirs the garbage so that the nutrients are more evenly
distributed. Because the mixing process is still manual, not using automatic tools. Before starting to go, the
writer uses gloves to avoid irritation. And the compost has already been used, like shown by Fig. 13.
Fig. 13: Composting results.
5. Conclusion
In conclusion, the comprehensive testing of the prototype yielded successful outcomes for the entire
works. This section encapsulates our research achievements as follows:
Firstly, the study involved the successful development of a prototype for a Smart Trash Bin designed
for composting, incorporating Load Cell HX711 sensor and also ultrasonic sensor. The prototype's creation
was executed with precision, aligning with the intended design.
Secondly, the prototype underwent rigorous testing, revealing noteworthy results. The load cell's
accuracy reached an impressive 90%, with the data derived from 10 testing instances, only a single test
diverging from the scale's results. Notably, the organic waste subjected to EM 4 liquid displayed promising
visual results. After approximately 30 days of soaking, the organic waste transformed into robust compost.
8299
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
Equally noteworthy, the ultrasonic sensor functioned as designed, accurately triggering the door's opening
when objects exceeded the 5 cm threshold.
Moving forward, recommendations for the enhancement of this nascent system are prudent. As the
current system has its limitations, expanding the capacity of the prototype's scales would augment its waste-
handling capabilities. Furthermore, conducting comprehensive laboratory tests on the compost produced
through the composting process is advised. This step would facilitate determination of whether the fertilizer
content aligns with established standards, ensuring the system's overall effectiveness and compliance.
5. Acknowledgment
Authors thank Hadimas Gumelar Putra, Raihan Mufid Suhadi, and Raja Al Ghifary for their fruitful
discussion and help in many ways. We also thank Research Institute and Community Service (RICS) of
President University who supports us by providing incentive for research publication.
6. Abbreviations
DC Direct Current
EM4 Effective Microorganisms 4
I2C Inter-Integrated Circuit
IDE Integrated Development Environment
LCD Liquid Crystal Display
POC Liquid Organic Fertilizer
PWM Pulse Width Modulation Pins on Arduino
TPST Integrated Waste Processing Site of Bantar Gebang
7. References
[1] World Health Organization, World Health Organization, 8 February 2018. [Online]. Available:
https://www.who.int/news-room/fact-sheets/detail/health-care-waste. [Diakses 21 January 2022].
[2] A. Shafy dan M. Hussein., “"Solid waste issue: Sources, composition, disposal, recycling, and
valorization,",” Egyptian Journal of Petroleum, vol. 27, no. 4, pp. 1275-1290, 2018.
[3] M. R. Syahida, M. Iksan, R. M. Putra, J. W. Simatupang, S. Mau, dan E. R. Kaburuan, “Waste-to-
Energy Potential Using Municipal Solid Waste as One Implementation of Jakarta Smart City,”
Serambi Engineering, vol. VI, no. 4, p. 2383, 2021.
[4] K. Bekasi, “Data Timbulan Sampah di Kabupaten Bekasi Tahun 2020 - 2021,” 21 February 2022.
[Online]. Available: http://open1data.bekasikab.go.id/?q=node/1259. [Diakses 23 May 2023].
[5] Ayilara dan O. S. M. Stella, “"Waste Management through Composting: Challenges and Potentials,",”
MDPI, vol. 12, no. 11, p. 4456, 2020.
[6] Dinambar, Arduino UNO is Microcontroler, Politeknik Negeri Sriwijaya (POLSRI), 2017.
[7] M. S. Rosyidi, M. I. Ashari dan I. K. Somawirata, “Rancang Bangun Alat Pembersih dan Penyortir
Ukuran” Jurnal Skripsi, 2018.
[8] D. Darlis, “Modul Ultrasonik HC-SR04,” Telkom University Blog, [Online]. Available:
https://dennydarlis.staff.telkomuniversity.ac.id/empat-point-nol/limapointdua/4-2-2-sensor/4-2-2-2-
modul-ultrasonik-hcsr04/]. [Diakses 2 May 2023].
[9] Onsemi, “Step-Down Switching,” Semiconductor Components Industries, LLC, 2022.
[10] S. Hamdi, “Introduction to Arduino Projects for Beginners,” 16 March 2022. [Online]. Available:
https://full-skills.com/arduino-uno-projects/introduction-to-arduino-projects-for-beginners/.
[Diakses 18 June 2023].
[11] M. H. A. Khairi, “Motor Servo: Pengertian, Cara Kerja, Kelebihan, Kekurangan dan Aplikasinya,”
Mahir Elektro, 2 January 2023. [Online]. Available:
https://www.mahirelektro.com/2021/01/pengertian-dan-cara-kontrol-motor-servo-arduino.html.
[Diakses 18 June 2023].
[12] E. Rite, “Load Cells: Types, How It Works, Applications, & Advantages,” 9 Desember 2020.
[Online]. Available: https://www.encardio.com/blog/load-cells-types-how-it-works-applications-
advantages. [Diakses 27 February 2023].
8300
p-ISSN : 2528-3561
Volume IX, No.1, Januari 2024 Hal 8289 - 8301
e-ISSN : 2541-1934
[13] Nicholas, “hackster. io,” 23 July 2017. [Online]. Available:
https://www.hackster.io/Nicholas_N/distance-measurement-with-an-ultrasonic-sensor-hy-srf05-
64554e. [Diakses 18 June 2023].
[14] R. T. Purnamasari dan S. H. Pratiwi, “Pengaruh Lama Pengomposan Serbuk Gergaji Kayu Jati dan
Dosis EM4 Terhadap Pertumbuhan dan Hasil Tanaman Kubis Bunga” Buana Sains, vol. II, no. 2, p.
140, 2018.
[15] A. M. Al-Hadi dan Y. I. Masjud, “The Study of Tong Composter in Produced Liquid,” Journal of
Environmental Engineering and Waste Management, vol. 6, no. 2, pp. 71-89, 2021.
8301