This is the repo for the microcontroller part of project Cleanurge - a scalable IoT powered waste management system, our solution towards a greener world.

Cleanurge

Contributors Forks Issues Pull Request

A scalable waste management system powered by IoT.

There are 3 repositories for the entire cleanurge system in total

  1. cleanurge-mcu: Containing the source code for the microcontroller
  2. cleanurge-backend: Containing the source code for the Express backend
  3. cleanurge-app: Containing the source code for the Android App

cleanurge-mcu

This is the repository for the microcontroller part of project- Cleanurge

Contents

  1. Description
  2. Project structure
  3. Project roadmap
  4. Getting started
  5. TODO
  6. Built with
  7. Contributing
  8. Authors
  9. License
  10. Acknowledgments

Description

What's the problem?

Today, waste is a significant global issue. Increasing volumes of waste are being generated as the global population and living standards rise. The environmental impact is significant, with massive volumes of waste generated annually with only basic or little treatment to minimise its impact. People are increasingly concerned about the production of waste and its effect, and are seeking ways to deal with the problem.

How can this project help?

Our project serves to prevent overaccumulation of waste at public bins by maintaining a log of their waste accumulation levels. The authorities will have the feature to get live status of the various public bins and appoint garbagemen to clear off any bins on overaccumulation. Moreover, the local residents will be able to report if there is an urgent attention needed in case of an overflow outside the garbage bins or excess accumulation of wastes nearby.

The idea

The idea is to have wireless beacons configured at various public bins to detect and measure the level of waste accumulation at the bins. When the level at any of the bins cross a threshold, a request is triggered to a web server that is then used to send notifications to the authorities in an app as well as web based software. The mobile application also supports the feature for individuals living in the locality to report of any waste accumulation directly to the authorities.

Project structure

This repository hosts only the hardware side code

/
  ├── .github/            github related files like PR templates, contribution guidelines
  ├── PIO-Arduino
  ├── .env                environment variables used in the project
  ├── .gitignore          stores files and directories to be ignored in commits
  ├── LICENSE             the open source license
  ├── code_of_conduct.md  code of conduct for open source contribution
  ├── contributing.md     contribution guidelines
  └── readme.md           details and instructions about the project go here

Project roadmap

The project currently does the following things.

  • just an empty source code, ready for your contribution ;)

See below for our future steps.

  • Platform IO based firmware for the microcontroller unit
  • A sensor to measure the level of waste in the garbage bins which will be accurate as well as economic
  • The units are to be solar powered to reduce the maintenance and energy cost.
  • Some GPS arrangement to fetch the location of the beacon
  • An arrangement to supply internet connection to the beacons in a cheap and practical way
  • The data channel should be secure

Getting started

Everyone is welcomed to contribute to our project. Mentioning in bold, you do not need to know the tech stack and tools beforehand to be a part of our project. This is a learn-and-build projects where the contributors build alongside learning the various concepts and technologies involved. Below are a few prerequisites and installation guides:

Prerequisites

Softwares needed

  • An IDE that supports Platform IO

Knowledge needed

The best way to learn the following is to google each and everything!

  • Very basic understanding of git and github:

    • What are repositories (local - remote - upstream), issues, pull requests
    • How to clone a repository, how to fork a repository, how to set upstreams
    • Adding, committing, pulling, pushing changes to remote repositories
  • For IoT

    • Embedded C/C++ language
    • Tune in to the IoT and electronics channel in our discord server and learn more - link

Installing

A step by step series of instructions that tell you how to get the project running locally is given below. Google every issue you face following the below instructions or just ask us in our Discord / WhatsApp group.

  • Fork and clone the repository followed by opening the project in your text editor (with a terminal)
  • If you are working with VS code, just go to Extensions -> Install Platform IO
  • Press the button in the status bar and Open the project folder which starts with PIO...
  • Main code lies in the src/ foler inside each PIO project
  • include/ includes .h header files
  • lib/ contains the libraries exclusively added from outside
  • platformio.ini contains the library dependencies, board properties and all, head on to their website for exact details on that ini files.

TODO

  • Make an working prototype on Arduino
  • Make the design more economic
  • Improve/Add the logic
  • Optimise the coding

Built with

Contributing

Please read contributing.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the GNU Public License - see the LICENSE file for details.

Acknowledgments

contributors-img

Owner
Developer Student Clubs KGEC
Developer Student Clubs KGEC
Comments
  •  Major update, added counter events and some functions

    Major update, added counter events and some functions

    • Updated Project Structure in README
    • Added contributing.md
    • Added code_of_conduct.md
    • Added timing functions (easy for beginners to understand)
    • Added Ultrasonic sensor logic
    • Added Debugging logic (test it out)
    • Added some comments to guide
    • Added the function prototypes and implemented in setup() and loop()
  • Instantiate a GPRS module object

    Instantiate a GPRS module object

    Make a Macro of BAUDRATE with its value as 9600 Another two macros as RXPin and TXPin as 7 and 8 as its value RXD Pin of the SIM module will be connected to Pin 7 of Arduino TXD Pin of SIM Module will be connected to Pin 8 of the Arduino Instantiate a GPRS Object Globally with RXPin as the Transmit Pin, TXPin as the receive pin, and BAUDRATE as the Baudrate. Follow the Library https://github.com/Seeed-Studio/GPRS_SIM900 for details. Follow this schematic to get an idea of the connections. image

  • Instantiate an Ultrasonic sensor object

    Instantiate an Ultrasonic sensor object

    Follow the given pin diagram of Arduino from the above image and use Pin 11 for Echo Pin and Pin 12 for Trigger Pin.

    For Echo and Trigger pin of the sensor, follow this image!

  • High RAM usage

    High RAM usage

    It is a good practice to keep global variables small Free resources as soon as your work is done Avoid large globals or static variables in embedded programming unless necessary

  • Write logic for the HTTP

    Write logic for the HTTP

    Check out Cleanurge Backend Docs for detailed information about all the routes. All the appropriate routes along with their HTTP methods are commented in PIO-Arduino/src/main.cpp methods shown below:

    1. void send_http_alive(): Makes a get request with the Device ID and receives the waste threshold and update it, this has to be done more frequently to stay updated
    2. void send_data_http(): Sends the waste level to the server (along with the location once on boot, check booted flag state to do this "once in boot" event), this has to be done every 'n' hours, check the value of http_timing.
  • AT Commands to configure the GPRS module

    AT Commands to configure the GPRS module

    SIM800L supports General Packet Radio Service (GPRS) for connecting to the internet with HTTP. The module has built in TCP/IP stack that can be accessed with AT commands. This can be very handy for persistent data logging on low bandwidth networks. Before we can get further into depths, we'll assure the AT commands to make a HTTP GET request to fetch a simple page and then use the library.

    For doing so we'll need to hook up the MCU(in this case I'm considering Arduino UNO) with GPRS Module:

    image

    Follow this code to initiate your Module: https://github.com/anubhav666/Setting-up-GPRS-Module-SIM-800L/blob/main/Basic_GPRS.ino

    Here below are a few AT commands to establish a GET request: image

  •  solar powered  disadvantages

    solar powered disadvantages

    1.The initial cost of purchasing a solar system is fairly high 2..During cloudy and rainy days the efficiency of solar system drops. 3.It is associated with pollution

  • Suggest a good sensor for sensing waste level

    Suggest a good sensor for sensing waste level

    A good sensor arrangement (apart from the Ultrasonic sensor currently used) that can measure the level or volume of the waste accumulated in the vat.

    • The existing problem with ultrasonic sensor: It is a cheap and beginner-friendly solution but it may get affected by waste content splashing on the sensor itself.
    • Here are some constraints that are expected to be followed:
    1. The choice should be economic
    2. It is okay to penalize a bit of accuracy for reliability/robustness
    3. The sensor should be easy to implement (readily available solution or a custom solution that doesn't involve much production complexity)
    4. Immune to splashes, fluctuating light intensity, or other interferences
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD

artifact64 THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD Generate x64 arch undetactable executables directly from cobalt strike . USAGE : compile u

Nov 15, 2022
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD

ACHLYSv2 How it works: First ACHLYS detects the environment of the machine its being in, by checking sandboxes and debuggers presents. second when the

Feb 1, 2022
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD

ACHLYSv1 How it works: First ACHLYS detects the environment of the machine its being in, by checking sandboxes and debuggers presents. second when the

Nov 29, 2021
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD

How Does 0x41 work: 1- checks the environment [detect sandboxes / debuggers / virtual machines] 2- download the [encrypted] shellcode file [.bin] if t

Jan 12, 2022
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD
THIS REPO IS PART OF WHAT ORCA TOLD ME TO UPLOAD

WHALE : A AES CRYPTOR USAGE: All u have to do is to build "builder" project and run it according to ur arguments. the builder.exe will then build and

Sep 9, 2022
This is our take on the digitalisation of the board game "b00le0", where you can play versus our AI, or against one of your friends in an online match.
This is our take on the digitalisation of the board game

This is our take on the digitalisation of the board game "b00le0", where you can play versus our AI, or against one of your friends in an online match.

Dec 8, 2022
Is this hardware solution the ultimate in switch bounce elimination? Simple PCB, cheap components = final solution!
Is this hardware solution the ultimate in switch bounce elimination? Simple PCB, cheap components = final solution!

#230 Ultimate Switch Bounce Eliminator Direct link to video: https://youtu.be/b2uUYiGrS5Y It's time to try a final, alternative approach to the ubiqui

Nov 7, 2022
FlexOS: Towards Flexible OS Isolation (ASPLOS'22) Artifact Evaluation Repository

FlexOS ASPLOS'22 Artifact Evaluation This repository contains the artifacts, including experiments and graphs, for the paper: FlexOS: Towards Flexible

Aug 24, 2022
Text - A spicy text library for C++ that has the explicit goal of enabling the entire ecosystem to share in proper forward progress towards a bright Unicode future.

ztd.text Because if text works well in two of the most popular systems programming languages, the entire world over can start to benefit properly. Thi

Dec 25, 2022
A beginner friendly repo in the world of open source. Contribute here to add here project in any languages.
A beginner friendly repo in the world of open source. Contribute here to add here project in any languages.

Hacktober Fest 2021 Heyy There (●'◡'●) Here you can contribute to opensource project in any valid language and project. Just follow the contribution g

May 24, 2022
A USB timer powered by Digispark ATtiny85 according to pomodoro time management technique
A USB timer powered by Digispark ATtiny85 according to pomodoro time management technique

⏲ ES Timer Powered ⚡ by Digispark ATtiny85 and it works based on ?? pomodoro time management technique a special timer for all those that work a lot w

Dec 30, 2022
This repo contains source code of our paper presented in IROS2021 "Single-Shot is Enough: Panoramic Infrastructure Based Calibration of Multiple Cameras and 3D LiDARs"
This repo contains source code of our paper presented in IROS2021

Single-Shot is Enough: Panoramic Infrastructure Based Calibration of Multiple Cameras and 3D LiDARs Updates [2021/09/01] first commit, source code of

Dec 19, 2022
CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.

The CQC Automation System What It Is CQC is a commercial quality, software based automation system, suitable for residential or commercial application

Dec 13, 2022
Vaccine Monitor app implemented in C with system Programming techniques.Projects implemented as part of the course Syspro K24

System_Programming_Projects Vaccine Monitor app implemented in C with system Programming techniques.Projects implemented as part of the course Syspro

Dec 30, 2021
This repo contains solution of 450 DSA sheet by love babbar

450DSA This repo contains solution of 450 DSA sheet by love babbar . Here is the link for that list : https://450dsa.com/ Guidlines to be followed Onl

Aug 14, 2022
mimic of libc’s printf function (42 Project, mandatory part only)

42printf mimic of libc’s printf function (42 Project, mandatory part only) This hasn't been tested yet by moulinette and is not recommended to take as

Oct 26, 2021
Final version of my dissertation project at the University of Birmingham as part of MSc. Computer Science degree.
Final version of my dissertation project at the University of Birmingham as part of MSc. Computer Science degree.

Unfair Edge: A Low-Level Manipulation of Game Memory with Bypassing VAC This repository hosts the code submitted as a dissertation project for MSc. Co

Nov 4, 2021
C Language project - Library Management System

Library Management System This is C Language project based on the file-handling. It basically provides the functionalities of Adding, Searching, Delet

Jan 22, 2022
Project Elektronica - microcontroller

Project_Elektronica_Microprocessor All important files regarding to our AMPLIFIER project. Schemes Code Erros :P Amplifier Amplifier Limiter Filter VU

Aug 29, 2022