The Design and Implementation of Smart Trash Bin
The Design and Implementation of Smart Trash Bin
The Design and Implementation of Smart Trash Bin
College of Engineering, Department of Computer and Communication, Nawroz University, Duhok, Kurdistan
Region Iraq
ABSTRACT
This paper presents a cost-effective design of an intelligent waste container for small-scale cases. This system is based
on Arduino Nano board and an ultrasonic sensor to monitor the fullness level of the container and give SMS alerts
using a GSM module. The system is powered by lithium battery power bank supported by solar cell panel. The system
provides an option of charging external portable devices using the power bank. Moreover, the system will store usage
events, recorded by PIR sensor, and fullness events on a memory card, which is also used to play audio message
using a speaker, when the bin is being used. Finally, the system is implemented successfully with an acceptable
overall cost for the intended application. The system performance was found satisfactory according to the obtained
test results.
KEYWORDS: Smart Device, Trash Bin, Waste Container, Microcontroller, GSM, Ultrasonic Sensor.
fullness status of the smart bin and send the sensors data to offers IoT sensor that uses a camera to detect the fullness
a web page over Wi-Fi network to a mobile phone. The status of large industrial trash containers. Most of these IoT
microcontroller board used in this paper was ARM sensors and smart bins integrate temperature, tilt and
LPC2148. acceleration sensors to detect vandalism, fire, trash
A report was done by students of California Polytechnic collecting and usage events. All these solutions make use of
State University[8], thoroughly exploited the economic and cellular networks to send data from the IoT sensors and
power consumption aspects of converting a conventional bins to their cloud hosted web-application portal over the
outdoor trash bin into a smart one. According to the internet. These web-applications monitor fullness level,
literature, the project is based on u-blox C027-U20 energy usage, fire alerts, and give real-time readings and
microcontroller board, which has built-in GPS module and historical reports in addition to schedules and routes for
cellular module. The board is used to control HC-SR04 optimized trash collection. Finally, contrary to the
ultrasonic sensor, that measures the bins fullness-level, mentioned solutions, this paper aims to reduce cost by
and a temperature sensor for monitoring weather sending fullness alert without the need for internet
conditions and fire alerts. The setup is contained by 246 connection and web-applications.
plastic box and powered by a 12V rechargeable lead-acid 3. Methodology and Methods
battery. The report mentioned that the system generates an This work will put a design for the smart trash bin, then
HTTP POST request using the data from the sensors and explain the used hardware parts and how it is connected
send it to a web application, which is built using Python together. The software is then explained and illustrated as
and Flask framework on top of an SQLite database. The a flowchart. Figure 1 shows the basic operation of the
web application receives the HTTP request and check if the system. The fullness status of the bin is determined by
bin is full then send SMS message using Twilio service. calculating the distance between the lid of the bin and the
Moreover, Leaflet JavaScript library is used to virtualize the trash by using a sensor. A distance threshold will be set
collected data on a map. In summary, most of the papers according to the bin dimensions. When the distance
above did not focus on covering the overall cost and power measuring sensor indicates that the bin is full, then a
consumption of the system, which are the main issues microcontroller board will control a GSM module to send
tackled by this paper. SMS alert, that contains bin ID and alert message, to a
2.2 Commercial and Industrial Solutions predefined phone number. The location of the bin is
There are several companies offer smart trash bins predefined by a sanitary worker who will identify the filled
managed by a web-based application. ECUBE labs[9] and bin by its ID, which received by the SMS alert. The system
Bigbelly[10] offer smart trash compactor bins, which will return to default operation when the bin is emptied by
powered by solar cell panel and battery. Clean CUBE bin the sanitary worker. An LED will keep blinking until the
uses ultrasonic sensor and Bigbelly smart trash bin uses bin emptied from trash. A memory card will register all the
laser sensor to measure fullness status[9][10]. Moreover, usage and fullness alerts for later analyses. Moreover, a
most companies offer IoT sensors, which can be easily motion sensor will be used to detect the usage event to play
installed on available trash bins. ECUBE labs[9], a thanking audio message stored on the memory card using
ENEVO[11] and SMARTBIN[12] offer battery powered a speaker to encourage the bin user. A block diagram of the
versions of these ultrasonic IoT sensors. Moreover, CUBE system is shown in Figure 2.
labs offer solar powered one. However, COMPOLOGY[13]
Fig 3: The design of smart trash bin, before (right) and after (left) the metal work
3.2 Hardware integrated 5V voltage regulator and can provide serial
The system structure relies on Arduino Nano board. communication over USB with a computer for
According to the datasheet, it is based on ATmega328 programming. It also has 14 digital I/O pins; 6 of them can
microcontroller which has a 16MHz clock speed, 32 KB provide PWM output and 2 external interrupt pins. This
flash memory, 2KB SRAM and 1KB EEPROM. microcontroller supports SPI and I2C communications.
Arduino Nano is a microcontroller breadboard with Moreover, it also has 8 analog I/O pins. All these pins can
deliver or accept a maximum of 40 mA and has an internal Nano, and the Tx pin of the module is connected to A4 pin
pull-up resistor 20-50 k. All the above comes in a small of the Arduino board. A3 and A4 pins will be turned into
package of 18 x 45 mm and weighs 4g. This Tx/Rx pins using a software library, because of the GSM
microcontroller breadboard was chosen for its size, module relies on serial communication and Arduino Nano
weight, functionality and its programming flexibility. has no extra serial port. An LED, with a 1k resistor, is
Figure 4 and Figure 5 shows the system schematic of the used to give a visual alert when the bin is full. Moreover,
circuit board and how the following electronic parts are a PIR motion detector (HC-SR501) is used to sense when
connected inside the electric junction box. Ultrasonic the trash bin is being used. According to the datasheet, this
ranging module sensor (HC-SR04) is used to detect the sensor has a sensing range of 120 degrees within 7 meters.
fullness level of the trash bin. According to the datasheet, Therefore, the sensor is installed to the side of the plastic
this sensor can detect a 0.5m2 object from a range of 20- box and partially covered to sense only user hand entering
400cm with a 15-degree measuring angle. Moreover, it can the bin. The usage event is triggered by the PIR sensor.
detect liquid and solid objects, and also immune to almost This sensor will interrupt the microcontroller work using
any outdoor interference sources. This sensor returns pin 3 to play a WAV file stored on a MicroSD card, which
Time of Flight (ToF) which is the time interval that is connected to the setup by an adapter from Waveshare.
ultrasonic wave takes to cross back and forward between The audio message is played over 3W/4 speaker driven
the wave source and the material boundary[14]. by an HXJ8002 audio amplifier. The MicroSD card is also
used to log the fullness and usage events inside CSV files
=
2 for further analyses. Finally, the setup of the system is
The system depends on GSM module (sim900a mini powered by off-the-shelf 12000mAh power bank, which
v3.8.2) to send SMS fullness alerts. according to the will also be used to charge any electronic device provided
datasheet, the module can be controlled by sending AT by bin user. The power bank is backed up by 13W/5V
commands over its 5V serial port. The Rx pin of GSM solar cell panel which can supply current up to 2.6A.
module is connected to analog pin A3 on the Arduino
to almost any type of trash bin. If the PIR sensor and small-scale location, due to the no need for internet
speaker were considered as an accessory, the bare connectivity and computer to track the status of the bins.
minimum cost for the system will be $160. However, keeping aware of the bins locations according
Finally, the solution provided by this system can be to their IDs, which are sent by the fullness SMS message,
effective in managing large numbers of trash bins over a is required for a successful trash collection.
Table 1: Overall cost of the system
Ultrasonic sensor $8
PIR sensor $6
MicroSD card module $5
Other parts and soldering $10
GSM network credit 5000IQD $4
Total $168
5. Conclusion and Future Work automatic shutdown of the power bank. This will also
Most of the past work on this subject focused on utilizing reduce the cost of the system by $20. The option of
cellular network to connect to the internet for sending the charging any electronic device for the bin user can be
sensors data to a server. On the contrary, this paper omitted to reduce cost and receive a better performance
considered using the cellular network to send fullness from the power bank. Moreover, can make use of the
SMS alert directly to the user. Therefore, the work in this concept of gateway or control station that mentioned in [5]
paper can be considered as a smart device, not as IoT and [6] to further reduce the overall cost. However, a
solution. This system does not offer all the facilities that number of bins connected to a single control station and
provided by the web applications of IoT products and range limitation of the Wi-Fi module must be taken into
papers mentioned above. However, the reduction in cost consideration.
offered by this paper is noticeable, if compared with the
In terms of security, the author considers it is unpractical
cost of commercial products and the work in [8] due to
to add accelerometer sensor to send an alert in case of
opting out the presence of an online server. The results of
vandalizing and GPS module to track the bin location in
the indoor test indicate that the setup worked perfectly
case of theft. Accelerometer sensor cannot differentiate
under normal conditions. Moreover, the outdoor tests
between an animal, a person or extreme weather shaking
showed that solar cell panel performed adequately in
the bin. Moreover, the first thing a thief would do is
charging the power bank and keeping the system running.
disconnecting the power from the system, thus the GPS
In terms of mobile network subscription expiration
module will be useless in tracking the bin location.
period, the system can make use of postpaid plan to
However, a temperature or smoke sensor can be added to
overcome this issue. Moreover, a custom-built power
the system to send an alert in case of fire. The advantages
bank is recommended, with the use of USB DC-DC step-
and disadvantages of this work are illustrated in the table
up module, Li-Ion battery charging module and 3.7V Li-
below
Ion rechargeable batteries, to overcome the issue of the
Advantages Disadvantages
Low building cost. Requires manual recharging of mobile network
subscription.
Low operating cost. Requires pre-knowledge of the bins locations.
Can work outdoors and indoors. Security measures depend on build quality and
fixed installation of the bin.
Can run for a long time. Dont send an alert in case of fire.
Low maintenance requirements.
User-friendly design.
It has an AUX USB port to charge external electronic
devices.