Envisioning IoT applications in a smart city to underpin an effective municipal strategy: The smartbin project

. Due to the Earth’s population rapid growth and the modern lifestyle, the urban waste creation rate constantly increases.Organic waste, which forms a signiﬁcant part of municipal solid waste, has caused increasing environmental concerns. Recycling is the only way to make a sustainable environment. According to estimations from the United States Environmental Protection Agency, around 24 percent of the total waste can be composted. Instead, most of it is land ﬁlled and incinerated. By composting organic waste,we can preserve resources and produce a valuable by-product that can be used as a locally produced fertilizer. In this paper, we propose a solution: a low-cost and e ﬀ ective Smart Compost Bin that utilizes modern technologies, such as environmental sensors and the LoRaWAN protocol to assist with the compost process.A centralized Information System collects measurements from smart bins that can be deployed anywhere and can further assist with the waste collection process. We have performed several experiments with our smart bin prototype, evaluated its e ﬃ ciency and concluded that it is a feasible solution.


Introduction
Due to the constant increase of the population and lack of possibility of developing available natural resources, the problem of food wastage started to be a significant issue affecting mankind. It represents significant nutritional, environmental and social issue. As the data indicates, globally, a third of the total food produced for human nutrition is wasted or lost [3]. This corresponds to 1.3 billion tons of food waste per year. Many countries in the European Union are making a progress regarding the traditional recycling of materials such as plastic, aluminum and glass [4]. However, recycling or composting food waste is not as popular.
The composting process, which can be defined as the process of biological decomposition and stabilization of wastes under aerobic conditions [6], can transform organic wastes into a stable final product that is not phytotoxic, that is free of pathogens, and that can be used as a substrate and nutrient source for plant growth or as a conditioner to improve soil properties [2]. Composting represents the most common option to recover material from the organic fraction of municipal solid waste due to the possibility to use compost as a fertilizer. This method appears as the proper procedure to solid waste management which reduces the organic waste effectively. In the European Union, composting is thought as a way forward to address both security of nutrients and organic matter supply thus improving soil conditions. The success of the composting process depends on 3 main parameters: temperature, moisture and oxygen content. Temperature characterizes the microorganisms' activity in the different stages, moisture is the factor which makes nutrients bioavailable and oxygen determines the aerobic condition. It is necessary to monitor these three parameters during the composting process in order to achieve compost rich in nutrients. However, this is not always easy since it usually requires expensive and large monitoring equipment. The process also produces bad odor which can discourage people from composting food at home.
Most modern cities utilize different waste bins for disposing materials (like paper and glass). Waste bins that collect and compost food are uncommon for the aforementioned reasons. This research work extends our previous paper [10]. A modernized smart bin; an Internet of Things (IoT) device that utilizes modern technologies like LoRaWAN and environment sensors to assist with the compost process and help citizens recycle food that would otherwise be wasted. For this project we also developed an Information System (IS) that can be used to view the state of the deployed smart bins in real time. People that need organic fertilizers can use the IS in order to find the smart bin closest to them. The smartbins presented in this paper can be placed in popular places within the city and assist with the recycling process. The smart bins can utilize cheap and less powerful hardware since the computational cost of this project is not high. This makes our project an affordable and feasible solution.
The rest of the paper is structured as follows. Section II presents the the related research of this paper is presented along with related work. Section III presents the proposed implementation of the hardware and software. In Section IV, the experimental results are presented. Finally, section V outlines the conclusions of this research.

Related Work
Many research papers about smart bins can be found in literature. However, most of them focus on waste separation, waste classification and waste management in general. Smart bins that aim to assist with the compost process is not a topic that many researchers have worked on. Therefore, the literature review is not focused only on smart compost bins but in smart bin implementations in general.
In their research paper, Yang et al. [8] presented an interesting approach. They used CV techniques for waste classification and waste processing. The core idea of their research is to capture photos of each item and categorize it in one of few categories (glass, paper, metal, plastic, cardboard, and trash). The proposed models utilized support vector images (SVM) with scale-invariant feature transform (SIFT) and a convolutional neural network (CNN). The experimental results indicate that the SVM had superior performance compared to CNN. The problem with their implementation though was that they were not capable to train the CNN because of troubles finding the optimal hyper parameters.
Zhu et al. [9] proposed a smart bin prototype that was able to send notifications, when it is full. They utilized a smart sensor capable of identifying the fullness of the bin. The sensor takes measurements as the lid of the bin closes. Their software is also able to determine the amount of waste that the been collected every time it is opened, by comparing two sequential measurements. Even though the work they present is very good, the features of the proposed smart bin architecture were limited, especially in terms of connectivity and remote management.
The authors of [7] used advanced computer vision and image processing techniques for their implementation. A method of bin level detection has been implemented using a GW filter GLCM and BGLAM as a feature extractor with artificial neural network (ANN) and Knearest neighbor (KNN) as classifiers to provide a robust solution for solid waste automated bin level detection, collection and management.
The key point that differentiates our work from the aforementioned ones that we focus on assisting with the compost process and food recycling. The embedded system installed on the Smart-Bins is only used for taking sensor measurements and uploading them to the IS. Therefore, the processing requirements of the proposed system are lower than other implementations and this allows us to use an inexpensive embedded system on the smart-bins and keep the manufacturing cost as low as possible.

Implementation
The main parts of our smart bin project are: A Raspberry Pi Single Board Computer (SBC) embedded system, a LoRa device and a camera module. The embedded system that we decided to use is ideal for our project, mainly because of its low cost, which is essential for the use cases of the project. Another reason is the low power consumption (200 mA during operation) and its small size (6.5cm x 3cm x 5cm). The Raspberry Pi Zero W includes a single core ARM Central Processing Unit (CPU) and has integrated Wi-Fi and Bluetooth. The processing capabilities of the Pi are enough for the needs of our project, since the main processing unit of our project is the server which hosts the IS (Information System). The other main component of our smart bin prototype is a camera sensor which features an ultra high quality 8 megapixel Sony IMX219 image sensor (up from 5 megapixel on the version 1 camera board), and a fixed focus camera lens. The version 2.1 camera module is capable of capturing pixel static images up to 3280 x 2464 resolution and also supports video capturing in three configurations, 1080p at 30 Frames Per Second (FPS), 720p at 60 FPS and 480p at 90 FPS.
Food waste can enter into the bin (Fig. 3) from the top. Every few minutes, the camera module captures and image and the installed sensors (temperature and pressure) take measurements. The Raspberry Pi Zero W compresses and encrypts the data and then it transmits the captured image to the IS by using the LoRa protocol. After the cloud based IS has received the captured image and measurements, the data is being saved and the Smart-Bins delete the data. As the data are being processed by the IS, if any dangerous conditions are detected (such as high temperature or signs of fire), the IS immediately enables the alarm system of the Smart-Bin devices in order to discourage and dissalow people from using the bins.  Through the IS that we have developed for this project, it is also possible to automatically notify the appropriate authorities to investigate the situation. An ultrasonic sensor is located at the top of the Smart-Bin, near the entrance point. This ultrasonic sensor is being used to assist with the fullness percentage identification of the container. When the fullness percentage of the container reaches the maximum allowed point, using the electromagnetically controlled seal, Smart-Bins lock and disallow people from using the devices.

Connectivity
Another big improvement compared to other implementations is the connection between Smart-Bins and the Information System (IS). In this project, we decided to use LoRa. LoRa is a proprietary spread spectrum modulation technique by Semtech and can be used with any MAC layer. LoRaWAN is the proposed MAC which operates a network in a simple star topology. The LoRa system consists of the following components: LoRa End-devices: sensors/actuatorsconnected via the LoRa radio interface to one or more LoRa Gateway, LoRa Gateways: concentrators that bridge end-devices to the LoRa Net-Server, which is the central element of the network architecture and LoRa NetServer: the network server that controls the whole network (radio resource management,admission control, security, etc.). The innovation consists insuring the phase continuity between different chirp symbols in the preamble part of the physical layer packet, which enables a simpler and more accurate timing and frequency synchronisation, without requiring expensive components for generating a stable local clock in the LoRa node. Furthermore, the technology supports variable data rate, thus giving the possibility to trade throughput for coverage range, or robustness, or energy consumption, while keeping a constant bandwidth. The transfer speeds of the LoRa protocol range from 0.3 kilobits per second to 11 kilobits per second. It is important to keep in mind though that the total capacity of the system is larger because the receiver can have multiple simultaneous connections from different nodes by exploiting the orthogonality of the spreading sequences used by LoRa. The main advantages of the LoRa network are the long distance between the LoRa gateway and the end devices that it can support, the minimal power consumption of the nodes and the very low cost for installing the whole network. This is the optimal solution for our project needs. Compared to WiFi, it supports a larger area. Also, Due to the long possible distance between two bins, mesh techniques could not be used. The running cost of the GSM network makes it an impractical protocol for our needs. The captured photos and measurements of the sensors are saved temporarily to the flash storage of the Raspberry Pi Zero W until they are encrypted, compressed and finally transmitted to the Information System via LoRa. After the IS has collected each measurement, it is deleted from the Raspberry Pi Fig.  4.

Software
The main feature of the proposed smart-bin is that it is capable of being managed remotely. Photos and measurements that are being captured are sent to the Information System (IS) on a specific and user-configurable interval. It is important that the transmitted data is compressed and encrypted before the connection is established, in order to prevent third parties from accessing them and to decrease the transmission time. Images can be compressed using lossless formats, like WebP or PNG, or lossy formats like JPEG. In order to encrypt the transmitted data, we decided to implement an asymmetric algorithm using public and private RSA keys [5,1].
The proposed Information System (IS) consists of the following components: (a) the front end, which gives the administrator the ability to view the current status of the deployed smart bins and also manage and reconfigure them if needed, and (b) the back end, which is primarily developed using free and open source software and programming languages, like PHP, Python and MariaDB. Smart bins are identified in the system using a unique serial number.

Experimental Results
The evaluation process of the proposed smart bin took place in Kozani, a city located in northern Greece. The experiments were performed from 15th of February to 15th of July 2020. Fig. 5 presents the different places in which we deployed the proposed smart bin prototype.
The embedded system that we decided to use in our project was equipped with a single Central Processing Unit (CPU) core. Our experiments showed that it did not create a bottleneck and that the processing power was more than enough for our project needs. Every processor-intensive operation that was required, (like encryption or compression) was performed in a timely manner. Residents of the city of Kozani were not reluctant to use with the deployment of the Smart-Bin devices and they were positive that these devices could further assist with the recycling process. Since Smart-Bins regularly upload measurements and captured images, remote management proved to be very easy and efficient. Since the devices do not perform any heavy processing, the power consumption of the Smart-Bins was very low. The conducted experiments indicate that the presented architecture, that utilizes secure remote management from the cloud is a realistic solution for both small and large cities.
During the testing process, the administrator of the project remotely managed the deployed Smart-Bins and their measurements. The temperature and pressure of the Smart-Bins never exceeded the recommended composting levels. In case of an emergency, we were prepared to remotely enable the alert system of the Smart-Bins and discourage people from using them.

Conclusions
In this paper we propose a secure cloud based Smart-Bin for composting. The proposed IoT device allows residents of the city to use the Smart-Bin in order to recycle food that would have otherwise been wasted. It takes measurements and captures images of the waste that has been thrown into the Smart-Bin and notifies users when it is full. By using the cloud, it offers and easy way for the authorities to remotely monitor and managed the deployed devices. We conducted multiple experiments in the city of Kozani, Greece to determine the efficiency of the proposed system. During the experimental period, residents of the city of Kozani were pleased with the usability and ease of use of the devices. The administrators could remotely manage the Smart-Bins and they were also very positive about the project. Because we decided to use a small and inexpensive Single Board Computer (SBC), our approach proved to be cost-efficient and have high enough performance to meet our project needs. In the future, this project could be further improved by using custom designed PCB and microcontrollers instead of the Raspberry Pi Zero W. We could also use more sensors to detect specific dangerous chemicals that are common in the compost process and automate the alarm system of the smart bins to discourage or disallow people from using the Smart-Bins in case of emergency. Finally, our future work includes the further enhancement of the software modules implemented in this project, like using computation offloading to the cloud to further analyze the captured measurements and photos in order to identify user behaviour and recycling patterns.