Blog 3 - Node-RED/Bin Bot - Davin Barron
Blog 3 - Node-RED/Bin Bot - Davin Barron
Gemini said
Team feedback session
To kick off this weeks sprint, we came together and had a team-based feedback session. The objective behind this was ensuring our technical work to date was sound and, more importantly, ensuring no one was left behind.
In any complex project, it’s easy for team members to "fall out of the boat" due to missed sessions or technical roadblocks. We made it a team priority to identify who was falling behind and actively pull them back in, ensuring everyone was up to speed with our progress, that goes for Jay as well! 😉
During the session we also discussed how we can independently make strategic decisions without relying on external input. By taking ownership of the "How" and "Why" behind our project, we can show that we are capable of spotting interesting problems and proposing our own solutions.
Node-RED
During one of our previous sessions, we looked into different ways we can interact with an MQTT server. One of our teammates, George, looked into Node-RED which is a flow-based programming tool used for IoT applications.
We decided as a group that it would be an interesting technology to use for the bin bot project so we dedicated a lab session to learn about it from George since he had the most experience with it.
George did such a great job at it that he may as well become a lecturer at this point 😄 Careful Jay, even he'll give you a run for your money 😉
George made a very interactive lab session with a set of exercises to help us get started. He helped us throughout the entire project and ensured that everybody was up to speed, now that is teamwork 😎
- Download Email using Palette Manager
- Create an injection to an email node
- Create an MQTT out connection injection that sends drives to the Micro:bits
- Create an MQTT in connection and separate them from each other
- Do you have a webhook? Try send some messages to it using injections
First was to get Node-RED installed.
Node-RED Setup:
The way we did it was through setting up a container using Docker. I didn't have docker installed on my machine so I went to their website and downloaded the installer there. This should install the Desktop app and the Docker CLI (Command Line Interface)
https://docs.docker.com/desktop/setup/install/windows-install/
Then over on the Node-RED website there is a command that we can run using our command line terminal to set up the docker container.
https://nodered.org/docs/getting-started/docker
From a glance the UI looks really intuitive, you can drag and drop nodes as needed and connect them together. Neato!
Email Exercise:
Connecting to the MQTT Broker:
After running the flow, we can see the output being displayed on the debug panel on the mobile app we used.
Connecting multiple nodes together:
One really useful feature that I enjoyed about Node-RED is the ease of being able to connect multiple nodes together seamlessly.
Using the JSON injection I setup before, I wanted to test if I am able to send the payload to my email and to the debug window within the Node-RED environment.
In the flow above, I am reusing the email flow I used previously and just extending it's capabilities by connecting additional nodes to it. Isn't that handy! 😊
In the setup, I am using an MQTT In node and using a switch node to send the payload to the email node which we set up earlier and a debug node.
The MQTT In node is configured exactly the same way as the MQTT Out node.
The debug node is already configured by default to output the message payload to the debug window within the Node-RED environment.
You can also check the option to print the payload to the terminal as well. This can then be found within the Docker App.
After redeploying and running the payload injection again, it's time to see if everything works.
The debug window can be opened using a button found on the top-right hand side of the Node-RED UI.Over in the Docker log window, it shows the message payload from the debug too.
It also informs us that the payload was successfully sent to our email.
Which it has!

Success! And it was pretty easy to set it up too don't you think 😏
Conclusion:
Using the JSON injection I setup before, I wanted to test if I am able to send the payload to my email and to the debug window within the Node-RED environment.
Bin Bot Brainstorming Session
The goal of the team
Our team’s objective is to build upon this foundation by leveraging IoT technologies. By communicating with an MQTT broker, we want to enable smart features that allow us to collect data and make the bin accessible and manageable through the internet.Here are some of the ideas that we came up with together as a team:
- Sensors to measure bin fullness.
- Gamifying rubbish to promote better waste management in schools.
- Specific eyebrow "mood" presets.
- Traffic encryption for data security.
- A barcode reader for identifying items.
- Automatic rubbish type detection.
- Data collection and analytics.
- Sending automated emails when the bin is full.
- Sending data to the IoT MQTT Panel mobile app.
- Phone-controlled interaction (moving eyebrows via an app).
- Subscription services for bin updates.
- Using Google Classroom for school-based reports.
- Microphone interaction to detect where a person is.
Team Discussions
After piecing together some ideas, we got together to discuss each idea.Encryption:
We noted that standard MQTT is not very secure by default. We discussed using TLS to encrypt messages and potentially moving toward end-to-end encryption between Micro:bits to protect data sent over radio waves.
Fullness detection:
We discussed about using an ultrasonic sensor to capture the fullness of the bin by connecting the sensor to a Micro:bit. We would use this sensor to measure the distance from the top to the bottom of the bin and publish this data to an MQTT topic.
LCD Display:
We can use the LCD to display data such as bin fullness without needing to see the inside of the bin. This can be like a progress bar or a percentage.
Sound detection:
While we loved the sound-rotation idea, we discovered the eyebrow motors are actually quite loud! Since the Micro:bit mic just picks up the loudest sound, the bin would essentially hear its own eyebrows moving. We have postponed this idea for now.
Tilt:
Using the Micro:bit’s built-in sensors, we can detect if the bin has fallen over. This would then trigger an alert.
Email:
After using Node-RED to do something similar, we thought of an idea that would allow users to subscribe to the bin bot and send on a report by using email. This can be used to send warnings such as bin fullness and if the bin has fallen over.
Rubbish identification:
We discussed how we can make use of Robo-realm vision system with machine learning and classification to identify the different types of rubbish. While at first it was a cool idea, there is also GDPR and data protection issues if we were to capture somebody's face in the data collection process.
I mentioned that we can do something like the current Return plastic bottle scheme and incorporate that into the bin bot project. This caused the discussion to shift from doing a sort of vision system to instead maybe using a barcode reader to collect plastic bottles rather than waste.
We can use a barcode reader module and hook it up to Robo-realm to scan barcodes found on most bottles as a way to collect data for identification.
This further plays into an idea we had for gamification and charity. The bottles we collect can be donated or be used to deposit into the Return bottle facilities.
Different classes within schools can compete where we can use the data we collect to do a sort of leaderboard ranking system to encourage school children to recycle more.
This brought us to the idea of using google classrooms to subscribe to the bin bot for schools where reports and bin bot data can be sent to the classroom.
Un Sustainable Development Goals
A massive part of this project is ensuring our work contributes to a better world. We have aligned the Bin Bot with several United Nations Sustainable Development Goals:
- Goal 4: Quality Education:
- Using the bin as an interactive tool to teach children about recycling.
- Goal 9: Industry, Innovation, and Infrastructure:
- Building smart, connected infrastructure for waste management.
- Goal 11: Sustainable Cities and Communities:
- Helping cities manage waste more efficiently via IoT.
- Goal 12: Responsible Consumption and Production:
- Encouraging better waste segregation at the source.
- Goal 13: Climate Action:
- Reducing the carbon footprint of waste by improving recycling.
- Goal 15: Life on Land:
- Reducing pollution and littering in our local environments.
- Goal 17: Partnerships for the Goals:
- Collaborating with schools and charities to achieve these targets.
In Ireland, 45% of rubbish is currently dumped or managed poorly. We hope this project helps reduce that number by making recycling data visible and the process more engaging.
Implementation plan
We have 6 weeks left in the semester, which we have broken into three 2-week sprints. The first two will focus on development, and the final sprint will be for debugging and final touches.
To stay organised, we created a team based slack channel where we can discuss the project and put together links and resources. In addition, I created a team project board using a project management system called Miro.
You can find the board here with read only access:
https://miro.com/app/board/uXjVG1jZkL8=/?share_link_id=885285499239
Proposed tech
- MQTT
- Node-RED
- Micro:Bits
- Bar Code Scanner
- Ultrasonic Sensor
- LCD Display
- Google Classroom and Emails
In Ireland, we are currently losing the battle against waste. With 45% of our rubbish exported or managed incorrectly, it’s clear that our current system lacks the engagement and intelligence to make a real difference. We don’t just have a waste problem; we have an education and infrastructure problem.
Meet the Bin Bot: an intelligent, interactive recycling teammate designed to bridge that gap. By leveraging IoT technologies and real-time data analytics, we’ve transformed a static utility into a character-driven experience. With expressive motorised eyebrows that react to your actions, the Bin Bot engages users turning a mundane chore into something fun.
By teaming up with schools, we can teach the next generation about the value of each and every bottle. Students can compete against each other through friendly competition and see how they rank on the leaderboard of waste management, where each recycled bottle scores a point for their class. But it doesn't stop there!
Comments
Post a Comment