**1. Introduction**

The Internet of Things vision is becoming a reality, transforming the way we live and interact with the environment. Many conventional places are acquiring smart characteristics thanks to a multitude of small, low cost and connected computing devices able to sense, process and communicate data from the environment to cloud/Internet services. Smart Cities and Smart Buildings, to name a few, are all different realizations of such a vision and are nowadays of grea<sup>t</sup> interest to academic researchers as well as having grea<sup>t</sup> potential for the industrial world. Smart Campuses are of particular interest in this scenario, and they can be seen as the perfect place for initial steps towards the realization of large-scale projects targeting Smart Cities [1]. Indeed, university campuses mimic cities in many aspects: they generally extend on a vast urban area, they are composed of many buildings of different types (administrative buildings, research laboratories, classrooms, residences, bar/restaurants) and populated by different types of people (students, teachers, administrative and technical staff, etc.). At the same time, the managemen<sup>t</sup> is somehow more flexible than what is found in proper cities and municipalities since universities are by nature more open at accepting innovations and new technologies, even if still not completely mature. Several solutions have been recently proposed in association with the concept of Smart Campus [2]: smart parking systems [3,4], microgrids [5], smart libraries [6,7], systems for classroom monitoring and occupancy estimation [8,9] as well as sustainable solutions [10,11], are all examples of smart applications implemented in university campuses.

**Citation:** Longo, E.; Sahin, F.A.; Redondi, A.E.C.; Bolzan, P.; Bianchini, M.; Maffei, S. A 5G-Enabled Smart Waste Management System for University Campus. *Sensors* **2021**, *21*, 8278. https://doi.org/10.3390/ s21248278

Academic Editors: Claudio Palazzi, Ombretta Gaggi and Pietro Manzoni

Received: 8 November 2021 Accepted: 9 December 2021 Published: 10 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

One area that received particular attention in the last decade is the efficient management of university solid waste (USW) [12]. Recycling such waste is crucial from several points of view: from an economic perspective, turning solid waste into a resource is fundamental to the realization of a circular economy, where one industry's waste becomes another raw material. At the same time, efficient and sustainable managemen<sup>t</sup> of waste helps reduce health and environmental problems: recycling materials helps cut emissions from landfills and from new extraction/processing sites, and mitigates environmental issues such as water/air pollution and littering.

Several works in the literature have addressed the analysis of how much waste is produced in a university campus, with estimates ranging from 50 to 150 g/user/day (i.e., 20–50 Kg per user each year) [13–15]. Considering that, according to recent statistics [16], each person in Europe produce half a tonne of municipal waste per year, USW alone account for about 1 tenth of the total waste produced in cities.

Moreover, some studies [17,18] have analysed the composition of waste produced in university campuses, concluding that the majority of USW is composed of organic waste suitable for composting, followed by recyclable materials such as plastic, glass and paper. As different types of waste require different recycling processes, segregating and separating waste at its source is key to the effective managemen<sup>t</sup> of the recycling chain. While industrial waste is generally treated with large-scale segregators, the task of waste separation is much more challenging at the municipal or campus level, as it is solely based on the goodwill of people and the level of readiness of the recycling infrastructure available.

To facilitate the separate collection of waste starting from the beginning of the sorting chain, that is, from public waste bins, information technologies may come to help. In particular, embedding different types of sensors and actuators into such waste bins, connecting them to the Internet and driving them through intelligent algorithms (i.e., following the vision of the Internet of Things (IoT)) may give an incredible boost to the recycling performance.

Motivated by these reasons, this paper extends our previous paper [19] and describes the realization of a complete solution for the efficient managemen<sup>t</sup> of USW. The key building block of our proposal is a novel prototype of a Smart Waste Bin (SWB), a smart object able to automatically sort different types of trash directly at the place of generation using a multi-sensor approach, thus easing the managemen<sup>t</sup> of the entire trash cycle. Peculiar features characterize the system: the SWB adopts a hybrid scalar/visual sensor waste classification algorithm that allows for accurate waste recognition as well as an innovative dual-motor design for automatic waste segregation. Moreover, the SWB and the managemen<sup>t</sup> system designed around it are integrated with the recently introduced 5G networking architecture, particularly for what concerns the advantages of using a Multiaccess Edge Computing (MEC) server. Indeed, the intelligence driving the SWB resides at the edge of a 5G cellular network, rather than in a cloud server or locally on the object itself. This approach brings several benefits, such as reduced delay in waste recognition and reduced energy consumption, making the SWB more appealing to everyday use.

In detail, the contributions of this work are the following: first, we illustrate the design and implementation of the smart waste bin, detailing the steps made for its creation from the analysis of the requirements to the physical realization of its external and internal parts. Second, we give details on the algorithms governing the SWB, including the main functioning logic as well as the multi-sensorial artificial intelligence used for recognizing and sorting different types of trash. For the latter, we propose different ways of fusing information coming from the different sensors, evaluating the performance obtained. Third, we evaluate a fully working prototype of the SWB in different scenarios, showing through experiments on a real 5G network that moving the artificial intelligence on the MEC is beneficial under both latency and energy consumption perspectives. Finally, we showcase the potential of a managemen<sup>t</sup> system built around a multitude of (simulated) smart waste bins, allowing for, e.g., easy and optimized maintenance.

The remainder of this paper is structured as follows: Section 2 briefly reviews the main related works in the field of smart waste management. Section 3 details the physical realization of the proposed smart waste bin prototype, focusing on the main working logic and the offered functionalities. Section 4 provides a detailed description of the hybrid scalar/visual machine learning algorithm used to perform waste classification and evaluates the performance obtained when such intelligence is run locally on the SWB, in the Cloud or on a 5G MEC. Section 5 focuses on the managemen<sup>t</sup> backend server and the advanced features offered by the provided user application. Finally, Section 6 concludes the paper.

### **2. Related Work**

Facilitated by the wide commercial availability of low-cost sensors, microcontrollers and communication modules, several research works focusing on prototyping smart waste managemen<sup>t</sup> systems have appeared in the last few years.

A class of these works focus mainly on monitoring the amount of trash and the fill level of waste bins in order to send alerts and optimize the emptying procedures [20–22]. Generally, ultrasonic sensors are used to estimate the fill level by measuring the distance from the lid on top of the bin to the trash in the compartment. Sometimes a load cell sensor is incorporated at the bottom of the bin to measure the weight of the waste [23,24]. As an example, in [25] authors propose a system with ultrasonic sensors connected to a Microcontroller Unit (MCU) that sends an SMS message to the municipality if the waste level is above a certain threshold. Knowing the waste levels and the locations of the corresponding bins, the routing and scheduling of the garbage picking procedures can be optimized; as a result, authors claim that the service cost can be cut by 50%.

The second class of works focus on techniques for recognizing and sorting different types of trash, with several approaches. Some works use scalar sensors, such as electromagnetic sensors (capacitive or inductive sensors), which can be utilized for detection of nonferrous metal fractions based upon electrical conductivity of the sample [26,27]. Alternatively, photoelectric sensors (obtained coupling a Light Emitter Diode (LED) source and a photodiode as a receiver) can be used to recognize the type of material (especially in presence of transparent wrappings) [28]. Other works focus on Radio-frequency identification (RFID) technology to sort the different categories of waste, assuming that each piece of trash is equipped with a smart RFID tag containing the information on the particular type of material [29,30].

With the success and popularity of machine learning, and in particular of Convolutional Neural Networks (CNN) in the field of computer vision, a considerable amount of works tackle the problem of image-based waste recognition [31–34]. A common approach is to use already existing CNN models (pre-trained over very large image databases, such as ImageNet [35]), which are known to provide excellent results in terms of image classification (e.g., AlexNet [36] or VGG16 [37]), and fine tune their last layers of the neural network with datasets containing images of pieces of trash [38]. All these works report excellent performance in the task of trash classification, reporting accuracies generally above 90% when four target classes of glass, paper, metal and plastic are concerned.

Some works also propose prototypes not only to recognize different pieces of trash, but also to move them in proper compartments after recognition. The operation is typically performed through the use of Direct Current (DC) or stepper motors [39,40]. As an example, in [41] waste is placed on a conveyor belt and classified in different categories via imagebased recognition and a trained CNN. After classification, an automatic hand hammer is used to push the waste into a specifically labelled bucket.

For what concerns communication technologies, most of the aforementioned works contemplate the use of radio technology to communicate application data such as the bin fill levels or other information to a remote managemen<sup>t</sup> server. Often, a GSM module is used [23–25], although recent works explored the possibility of using other types of communication such as LoRa/LoRaWAN [42,43].

This paper proposes a complete solution for waste managemen<sup>t</sup> that comprises most of the features encountered in the recent literature. The proposed Smart Waste Bin offers accurate waste classification through a hybrid scalar/visual sensor system, as well as automatic waste segregation with an innovative dual-motor setup and waste level tracking. In addition, the entire system makes efficient use of 5G connectivity and the availability of MEC technology to increase recycling rates while providing reduced operation costs, response time and energy consumption.

### **3. Building the Smart Bin**

### *3.1. Requirement Analysis*

Before designing the system, we conducted an analysis to understand (i) how people interact with the traditional waste bins currently available in the campus premises and (ii) what is the composition of the waste produced, two pieces of information that are key for building an effective ye<sup>t</sup> user-friendly prototype. The analysis was conducted in the Bovisa Campus of Politecnico di Milano university, which hosts departments and classrooms for both the Engineering and Design schools and hosts roughly 10,000 people considering students, faculty and administrative staff. For one week, we filmed the behaviour of people during the lunchtime break (12:30–13:30), collecting statistics on the type of trash produced as well as studying the behaviour of each person when handling the trash in front of the existing waste bins. The area analysed is an area generally used by students for consuming lunch. Two trash collecting points are present in the area, both equipped with four coloured bins collecting different types of trash according to the regulation of the municipality of Milan (paper, plastic/aluminium, glass, unsorted trash) (Figure 1). We observed that the most recurring behavior of a person after lunch is to collect all pieces of trash, move to one of the waste collecting points and then manually sorting all pieces of trash in the correct bins, one at a time. Another observed behavior consists of throwing all the different pieces of trash in the unsorted bin. Although such a latter behavior happens less frequently, it is detrimental for recycling purposes. In total, we analysed about 400 interactions between humans and trash bins: the average amount of time spent by the first group of users, the ones sorting the trash in the correct bins, is 5.3 s. The composition of the waste produced is observed as it follows: 24% plastic/aluminium, 22% paper, 2% paper and 52% residual waste (unsorted). Such percentages are in line with other studies conducted in university campuses [18]. Based on such observations, we designed a Smart Waste Bin able to (i) accurately classify and segregate trash while requiring minimal effort to the users and (ii) keep the required interaction time below the average observed during the requirement analysis. The realized bin is the central element of a more general Smart Waste Management System, illustrated in Figure 2, and detailed in the following Sections.

(**a**) Correct waste disposal

(**b**) Incorrect waste disposal

**Figure 1.** Two frames of the recordings used for analysing the student's behaviour. The average interaction time is estimated from the video.

**Figure 2.** Overview of the Smart Waste Management System: the Smart Waste Bin leverages 5G MEC architecture to accurately classify trash in order to automatically segregate it. Usage data from the smart waste bin is also transmitted to a central backend server, which allows the university administration to provide optimized waste management.

### *3.2. Prototype Design*

The proposed Smart Waste Bin (SWB) is composed of a unique solid body measuring 90 cm in height, with a diameter of 62 cm. The external body is digitally fabricated with a large size FDM (Fused Deposition Modeling) 3D printer, using a thermoplastic material. A washable protective varnish is applied on the whole exterior prior to the final colouring process. Figure 3 shows a digital render of the prototype, while Figure 4 shows the final realized version. The 3D-printed body hides an aluminium structure, which gives solidity to the entire prototype and is used for supporting all the hardware and the electronics needed, as well as the Garbage Unit (GU). The GU contains four circular aluminium structures, used for holding four standard 110 L bags for collecting glass, paper, plastic/metal and residual waste. We opted to maintain the same type of garbage bags already used for traditional bins in the campus for all type of waste, although the requirement analysis clearly showed different usages among the four different type of waste, in order not to modify the supplying operations of the waste managemen<sup>t</sup> service of the campus and facilitate a transition between already existing bins and smart bins. To ease the tasks of garbage bag replacement, cleaning and other maintenance activities, the entire GU can be easily opened through sliding guides placed at the bottom of the SWB (as shown in Figure 2, right).

A convenient flap door is placed on the front side of the Smart Bin, easily accessible through a metal handle mounted on its top. The door embeds a LED matrix, covered with a laser-cut semi-transparent plastic material, which is used to signal if the SWB is correctly functioning (with a green arrow) or not (with a red cross). In the latter case, an automatic lock avoids opening the door. In normal conditions, opening the door reveals the Waste Disposal Unit (WDU), where objects to be thrown away are deposited and eventually recognized, one at a time. The user deposits a piece of waste in the WDU, which contains a rotating circular shelf with an aperture surrounded by a semicircular structure connected to a couple of servo motors (Figure 5). This area is used for taking measurements from the piece of trash using a hybrid scalar/visual sensor system, which are subsequently fed to a waste classification algorithm (detailed in Section 4). After the waste is recognized in one of the four trash classes, it is automatically moved in the proper bag, thanks to the servo motors.

**Figure 3.** Three-dimensional (3D) render of the Smart Waste Bin: (**a**) on top, the lid of Waste Disposal Unit with LED feedbacks, (**b**) on the bottom, the garbage unit in its open position, showing the internal bin bags.

(**a**) Front view

(**b**) Top view

**Figure 4.** Smart waste bin: realized prototype

The top part of the SWB is composed of a plastic surface that protects four circular LEDs indicators and a LED string, which are used as visual feedback for the user. The surface is fabricated starting from an anti-scratch piece of semi-transparent rigid plastic, which is later processed with a laser cutting machine and then engraved to make the LEDs visible. The four circular LEDs on the top are used to indicate the fill levels of each bag, respectively, in white from 0% to 99% and in red when the 100% is reached. The LED string contouring the top part is again used to signal the operational status of the bin with the same colour code of the front LED matrix: static green indicating that the SWB is ready for

collecting a piece of trash, blinking green for the trash processing phase, and red in case of malfunctioning or if the bin bags are full.

**Figure 5.** Waste disposal unit. (1) A piece of trash is inserted into the SWB and recognized. (2a) The semicircular structure acts as a mechanical arm and moves the trash towards the correct bin. Concurrently (2b), the shelf moves to let the trash fall into the correct bin in the garbage unit (3).

### *3.3. Sensors and Actuators*

The Smart Waste Bin exploits heterogeneous sensors and actuators for recognizing and sorting the trash, respectively. Such sensors and actuators, as well as the logic of the system, are controlled by a Raspberry Pi 3 Model B+, which is attached to the internal aluminium structure of the SWB and directly connected to a power socket. For communication with external services, the Raspberry Pi is connected through the internal WiFi interface to a Huawei 5G CPE router provided by Vodafone Italia S.p.A, as explained in Section 4.3.

### 3.3.1. Waste Sensing Module

The waste classification algorithm, explained in Section 4, is based on a hybrid scalar/visual Waste Sensing Module (WSM) which exploits different types of sensors. The main tasks of the WSM are (i) detecting when an object has been inserted into the WDU of the bin and (ii) acquiring measurements from the piece of waste for subsequent analysis and recognition. For what concerns the waste detection task, the WDU is equipped with a pair of Time-of-Flight (ToF) VL53L0X distance sensors, which are able to accurately detect whether or not an object is in the area and, subsequently, trigger the sensing process. Upon detection of a new object, the WSM leverages the following sensor for gathering measurements:


The data acquired by such sensors is then passed to the waste classification algorithm, which is detailed in Section 4.

### 3.3.2. Automatic Waste Segregation

Trash segregation is obtained through a pair of servo motors, which allow for precision control of the movement and rotors position. The two motors are located in the central spindle of the bin, one on top of the other and allow to move a piece of trash in the proper bag. One motor controls the plastic shelf rotation in the WDU, while the second is attached to the semicircular structure. Disposal of a piece of waste happens in two steps: first, the shelf and the semicircular structure rotate in the same direction so that the piece of trash is located on top of the right bin. Then, the shelf rotates in the opposite direction so that its aperture let the piece of trash fall into the bin (Figure 5). Both motors are wired to the Raspberry Pi and controlled through the GPIO pins. In order to ensure the correct positioning of the two motors, they are automatic calibrated during every boot of the SWB thanks to specific magnets located on the motors' hardware.

### 3.3.3. Fill Levels Engine

Each bag in the garbage unit is equipped with a Time-of-Flight (ToF) VL53L0X distance sensor, similar to the one used in the Waste Sensing module. Thanks to a laser, the sensors can accurately measure the distance between the top of the GU (Figure 6 and the garbage inside the correspondent bin bag, providing the estimated fill level of each trash bag. Then, the fill level is used as user feedback displaying the percentage level on the upper surface of the smart waste bin through LED strips, and transmitted to a remote server for advanced functionalities and managemen<sup>t</sup> purposes.

**Figure 6.** SWB vertical section and internal details.

### *3.4. Standard Operating Procedure*

Figure 7 illustrates the functional flow diagram of the smart waste bin. Upon activation, the smart waste bin performs the following operations:

**Figure 7.** Functional flow diagram of the smart waste bin.


When all the operations above are completed, the smart waste bin enters the idle state and the LEDs on the top (as in Figure 4a) become green, indicating it is ready to accept recycling items. The operations are as follows:

4. *Waste insertion*: when the SWB is active, a user willing to throw a piece of trash can open the lid of the waste disposal unit, insert an object on the shelf as in Figure 5(1) and, finally, close the lid to activate the classification process.


### **4. Waste Classification Algorithm**

The smart waste bin implements a hybrid waste classification algorithm that leverages data from both the scalar sensors and the camera installed in the WDU to distinguish the specific type of waste inserted. We train the algorithm to distinguish among four different classes according to the rules of the municipality of Milan: glass, paper, plastic/metal, and unsorted.
