Skip to content

Connected trash module based on esp8266 board. Send telemetry data via MQTT protocol on HIVEMQ Cloud

License

Notifications You must be signed in to change notification settings

devnullone/SmartBin

Repository files navigation

SmartBin
+
SmartBin
+
Android

An arduino smartbin project based on HiveMQ Cloud and an CodeIgniter4 backend.

Table of Contents

Introduction

Transform a normal trash bin into a smart one. Reading data from ultrasonic sensors placed on the lid of the trash and send it over MQTT Protocol to the Waste Management Platform. I use ESP8266 but i would work for EP32 too with minors changements.

Get live notifications of filled bins and their locations.

Features

A few of the things you can do with this Repository:

  • Reading data from Ultrasonic sensor✅
  • Calculate the bins capacity and waste ✅
  • Send these data Trougth MQTT Protocol (HiveMQ Cloud) ✅
  • Show data on Map✅
  • Send live notifications of filled bins and their locations✅
  • more...

The device connecting to internet over wifi get NTP clock(need to check certificate) and send Json data to predifined topic (poubelles/$DeviceID/) on HiveMQ Cloud. The device send data evry 5 min and go to deep sleep when evrything done well.

An php script on waste management server side act like mqtt client and subcribe to topic (poubelles/#). Data is received and processed.

Device is created if not exit and it just updated with the new data if exist!

The data updated on the waste managment plateform

Finally the data showed on map

Feedback

Feel free to send us feedback on Twitter or file an issue. Feature requests are always welcome. If you wish to contribute, please take a quick look at the guidelines!

Build Process

Add ESP8266/ESP32 board to your arduino IDE. Follow this tutorial. Install all library the project need:

  • NTPClient
  • PubSubClient
  • LittleFS
  • ArduinoJson

Then connect your ultrasonnic sensor I use the hc-sr04 who is good for testing purpose and realy cheap.

  • Sensor <------> ESP8266
  • Vcc<------> vv
  • Trig<------> D8
  • Echo<------>D7
  • Gnd<------>GND

Connect the D0 to RST pin to use deep sleep mode.

Connect your ESP8266 to the arduino IDE via USB cable and verify the code and upload it on the board.

Don't forget to change values on config.h file according yours!

Enjoy It!

If you like what I do, maybe consider buying me a coffee

Buy Me A Coffee

About

Connected trash module based on esp8266 board. Send telemetry data via MQTT protocol on HIVEMQ Cloud

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published