Following my earlier post on Introducing the Microchip RN2483, I am writing this application blog post to showcase how LoRaWAN can be used for enabling waste management by means of a smart garbage bin. LoRaWAN provides long range wireless communication with ultra-low power consumption that enables very long battery life.
We built a proof of concept for garbage bin level tracking device, based on Raspberry Pi + Arduino Uno, and then optimized it further with a custom circuit to make a production grade bin level sensor(BLS) for smart city use cases. In this post, we will show you how you can quickly hack together a proof-of-concept of a functional smart garbage bin on Raspberry Pi using LoRaWAN. For more details about the custom BLS, please get in touch with us.
Deploying smart trash cans for real time waste management system is one of the key applications of a smart city system. Municipal authorities need an efficient way to clear the trash from all public places before it becomes a mess. And this needs to be achieved with the minimum overhead of cost and impact to the city dwellers. LoRaWAN is one of the earlier LPWAN technologies that envisages a city-wide network for keeping track of public infrastructure assets. Once fitted with a BLS device on a trash can, LoRaWAN allows the city authorities to keep a tab on the bins via wireless connectivity.
LoRaWAN does suffer from some limitations, such as extremely low data rates, higher collision and deteriorated network performance with increasing number of nodes and inability to perform over the air updates to the device. Like every emerging technology, it is also going through an evolutionary phase and is also getting a healthy competition from some of the other emerging standards such as NB-IoT and Weightless. However, at the current state, this technology is well suited for non-mission critical applications, and tracking garbage bins is one such use case.
Let’s build a model end-to-end PoC for smart waste collection using LoRaWAN.
The setup presented in this blog post is a prototype system. If you are looking for a real product or technology around smart trash can or a smart waste bin then refer to our product R&D page on smart cities.
This solution is ideally suited for waste pickup and management companies, who can optimize their logistics resources while reducing collection costs.
The PoC scope of this solution is to remotely monitor a garbage bin. The bin is fitted with a BLS device coupled with Microchip RN2483 LoRa Module, for tracking the garbage level. And the level is indicated to the user via a mobile app.
There are three functional parts of this solution:
In this gateway setup, we have used the RN2483 Module with inbuilt CP2102 USB to TTL Converter, to interface with Raspberry Pi.
In the BLS node setup, we have used the RN2483 Module with an ultrasonic sensor (HC-SR04) for level detection.
Here is the hardware schematic for BLS node.
Before proceeding, we need to install Arduino IDE on a laptop/computer.
Installing the Arduino IDE
– Download and Install Latest Version of Arduino IDE
– Start Arduino IDE and plug the Arduino development Board to the computer.
You need to be familiar with Arduino IDE. For more details, refer the Getting Started guide.
Step 1: Clone the GitHub repository under your home directory, using the following link
git clone https://github.com/suryasundarraj/lora-based-garbageBin-tracker.git
Step 2: Open the file “/node/loraNode/loraNode.ino” from this repo in Arduino IDE.
Step 3: From Arduino IDE menu, select the Board from Tools – > Board – > Arduino UNO
Step 4: Select the USB Port from Tools menu ( Tools – > Port – > COMXX )
Step 5: Upload the Code to Arduino Uno board. Now the Arduino Uno will start transmitting the bin level through LoRaWAN.
Follow the procedures below to run the python program on Raspberry Pi gateway.
Step 1: Log on to the Raspberry Pi console and clone this GitHub repository under the home directory.
Step 2: Under the “lora-based-garbageBin-tracker” directory navigate to “gateway” subdirectory.
Step 3: Run the script (Check for permissions, sudo)
You can see the logs to check that the LoRa module gets initialized and starts receiving data from the node.
You can also use a CP2102 USB to Serial Converter module to connect the RN2483 and interface with any serial PC terminal.
This setup is developed using the LoRa stack radio commands.
On the Receiver Side (Gateway), the commands are:
mac pause radio rx 0
On the Transmitter Side (Node), the commands are:
mac pause radio tx FF
This LoRa setup is tested under an ideal indoor condition. To try it outdoors and for non line of sight cases, you need to test it by setting LoRa MAC radio parameters (ADR, SF, Channel Frequency) and sending commands manually to RN2483.
You can find all the commands embedded in the code. Refer the official Microchip datasheet for more details.
Since LoRa works in the open ISM band, make sure to adhere to your country specific regulations for testing it outdoors. It is not recommended to use this PoC setup for extended testing.
The mobile app is a standard Cordova-based Android app. It shows the current level of the garbage bin.
The source code of this app is available under the app folder in the GitHub repository. Refer the README file for details on how to compile and run the app.
Once the node and gateway setup is up and running, you can see the debug messages on the serial monitor (Arduino) and ssh terminal (Raspberry Pi), indicating the continuous Lora transmission.
Here is the model garbage bin setup fitted with the node device.
As we keep filling the container with trash, the level goes up, and it is indicated in the mobile app.Now I Know How To Build A Smart Garbage Bin with LoRaWAN using Microchip RN2483Click To Tweet
The PoC setup depicted here is for lab testing only. In reality, this will be too bulky and power inefficient to be installed in an outdoor garbage bin or isolated trash cans that you see in public places.
We have developed this PoC further on a custom built hardware that runs on battery.
It has a compact form factor and the casing can be further modified to suit the bin design and guarded with enhanced protection for environmental damages (IP 65 – 67). We recently tested it in an outdoor location with a LoRa service provider and we achieved one-month battery life even with an hourly trigger of bin level.
Get in touch with us if you want to know more about this BLS device. We also look forward to your comments and inputs on the further use of technology for smarter waste management.
Surya is a hardware buff and tinkerer who loves all the stuff around IoT. He is a specialist in building proof-of-concepts around electronic hardware and conceptualizing use cases and solutions for Internet of Things. When not working with hardware, Surya can still be found fiddling with some crazy hardware design, trying to bring out an idea out of a raw circuit.
IoT Intelligent Transportation Systems with Twilio Sync
An IoT Retrofit Suite For Professional DIYers
This Alexa Powered Dictionary Bot Can Expedite Your Vocabulary Buildup
Five Emerging Technologies Spearheading The IoT Security Research
Witness the Cutting Edge Way of Conducting Physical Asset Verification
Worrying About Rising Energy Bills? Realtime IoT Energy Management Is At Your Disposal
Please log in again. The login page will open in a new window. After logging in you can close it and return to this page.