# Smart Waste Collection System with Low Consumption LoRaWAN Nodes and Route Optimization
## 4 Case Study: Region of Salamanca
### Measurements Results from Smart Sensors  
A decisive factor of the proposed system is the nodes' battery lives. One of the main purposes for this was to include the system without increasing the current maintenance requirements of containers, which must be revised between 1 and 4 times/year. This depends on the kind of waste and implies that the device battery must work for at least a year. The amount of battery life consumed by the node was evaluated by adding the power consumed by every built-in component and subsequently, the total consumption of the components together. Before creating the sensor, theoretical estimations of consumption were performed according to the datasheet of every component and the tools of their manufacture so that power consumption for each action could be calculated: sensor reading, information processing or sending through the network. Different batteries in the market express the value using two quantities: power and electrical load, measured in Ah. One ampere/hour (Ah) is the electrical load unit that represents a current of one ampere passing through a conductive element for an hour. This allows the power of batteries to be described and consequently, the load that the device will consume for working can be calculated--expressed in mAh by Equation (9):  
\[Q=\sum_{i}i_{i}\cdot t_{i}=\ t_{MCUIi}\cdot i_{MCUIi}+t_{radio}\cdot i_{radio}+t _{MCUla}\cdot i_{MCUla}+\sum_{j}t_{sensor}\cdot i_{sensorj}. \tag{9}\]  
Figure 7: Towns of the case study and routes performed by the permanent vehicle fleet. \(Q\) is the charge consumed in (mAh), \(i_{i}\) is the power consumed by the microcontroller in idle mode and \(i_{i}\) is the time. \(MCUa\) is the intensity of the microcontroller in active mode, and \(i_{radio}\) is the intensity consumed by the radio module to perform the shipment. The summation presents consumptions of different \(j\) sensors during the capture of different data. The values of consumption of each functional module in the node are summarized in Table 4 which is shown above. The ultrasonic sensor generated a consumption of 15 mA when working, Due to its properties, the maximum operating time if the container is empty will consume 0.36 mAh. The implemented weight system consisted of four load cells connected to a hub and an ADC amplifier which was accurate enough to capture the variation produced by an increase in weight. This amplifier provides the required voltage for the proper functioning of transducers. It only consumes 1.5 mA while performing a measurement for 40 ms. This means that the sensor uses 0.06 mAh per measurement. The temperature sensor employed for this case study (TMP36) was an analog temperature sensor. It consumes 4 mA and can perform measurements every 5 ms, so it uses 0.002 mAh per measurement. The LoRa1276-C1 module--developed by niceRF--manages communications with the Gateway. This device uses 30 mA upon shipment and sends data in less than 10 ms, that is, the radio module consumes 0.3 mAh per shipment. These consumption numbers were added to the period of time that the microcontroller was active and fully working in order to obtain the total required power to read the sensors and perform the shipment. The microcontroller uses 35 \(\mu\)A/MHz when working. As it works at a frequency of 48 MHz, it consumes 1.68 mA. In active mode, it performs two tasks: capturing data and managing shipments. For capturing data, the working time employed in the equation is the longest time spent obtaining measurements by sensors. In this case, the weight sensor takes the longest time to provide data--it provides a measurement in 40 ms. Consequently, the microcontroller takes 0.068 mAh in total to perform a measurement. When the MCU is in idle mode, it consumes 200 nA, so it uses a charge of 200 mAh (0.2 \(\mu\)Ah) to be in idle mode for 1 h. Thus, we can confirm that we used 0.49 mA/measurement in total for capturing data. However, we needed 10 ms--the time the communication module requires--for sending.