Git Product home page Git Product logo

cleanurge-mcu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cleanurge-mcu's Issues

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.

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

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

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

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

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!

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.