# Smart Waste Collection System with Low Consumption LoRaWAN Nodes and Route Optimization
## 3 System Proposed
### Developed Device  
We decided to develop our own device instead of using other boards currently in the market, such as RN2483 LoRa Mote [72] or Waspmote (belonging to Libelium [73]) as the device base, because choosing each component separately--from microcontroller to each one of the sensors--allows the efficiency of the device to be increased, resulting in a greater battery life. Furthermore, this approach enables a solution to be provided which meets the specific requirements regarding the system's data acquisition using the most suitable sensors for each kind of data. The device is designed to obtain data from three environment variables: estimated filling volume of containers, weight of the waste inside them and their room temperatures. In contrast to other works [25] where only the estimated filling volume has been calculated, this study aimed to develop a device able to obtain useful data for optimizing routes, such as weight, and for future studies and applications, such as temperature. Figure 3 (right side) presents the device, which has several  
Figure 2: Main diagram of the system’s architecture. Wireless Sensors Network (WSN) of smart developed sensors (**a**) and the diagram of the information systems, communication and user applications (**b**). previously indicated function modules to obtain data (ultrasonic sensor, load cell, temperature sensor) as well as to manage battery consumption and control the device to obtain these data (microcontroller unit, MCU). Figure 3 (left side) describes the communication between the device and the network employing radio module. The proposed node uses the container frames as the supporting platform. Figure 4 shows the location of every module (previously mentioned) inside the container, and sensors and microcontrollers are employed on each module. The device frame with the MCU, the temperature sensor, and the radio module are located in the lower section, and load cells measuring waste weight are located in the container legs. The only element located in the upper section of the container is the ultrasonic sensor measuring the estimated volume of waste. The sensors employed for developing the device and how they operate are explained below. Figure 4: Node modules’ locations and dev board for prototyping. Figure 3: Modules of the developed node on the right side and its communication with the platform on the left side  
JSN-SR04T V2.0 is the selected ultrasonic sensor [74]. It is a waterproof ultrasonic transceiver with an activity range between 20 and 4 m, an accuracy of 3 mm and a measuring angle of 20\({}^{\circ}\). This measure is calculated by stimulating a pinger and measuring how long the stimulation takes to return to the receiver. When the signal is received, distance is calculated, as indicated in Equation (7):  
\[d=\frac{T*v_{s}}{2}, \tag{7}\]  
where \(d\) is the rough distance from the device to the first surface reached by the sent ultrasonic wave, \(T\) indicates the time elapsed since the release of the sound until the reception of its echo, and \(v_{s}\) is the speed of the sound. Container weight is calculated by using four load cells attached to the lower section and legs of the container. This kind of sensor is based on Wheatstone bridge operating principles. In Figure 5, we can see how a load cell works and its electrical circuit. When changing weight on the transducer, the resistance is modified due to its intrinsic features. Given that it is subject to a continuous voltage difference \((\mathrm{V}_{ext+}-\mathrm{V}_{\mathrm{ext-}})\), the generated voltage difference can be calculated with Equation (8):  
\[V_{\mathrm{out}}=V_{\mathrm{ext}}*\ \left(\frac{R_{3}}{R_{3}+R_{4}}-\frac{R_{2}}{R _{1}+R_{2}}\right). \tag{8}\]  
As these changes in measurements are really small, an analog-digital amplifier (24-bit resolution HX711 model) is employed to obtain enough accuracy and range (it is shown in Figure 4 along with the MCU and the radio module).