Skip to content

GDSC-UIT/eGreenBin

Repository files navigation

eGreenBin

Every year, Vietnam in particular and the world in general spend hundreds of billions of dollars on garbage classification

eGreenBin is an open source solution born to solve the problem of garbage sorting by helping to build and form habits and awareness for children from an early age.

Our goal is provide solution for those 3 major pillar recommended by WHO.

Screenshot 2 Screenshot 3 Screenshot 4

Solution in action

We submit our solution in GDSC solution challenge 2023 base on 17 Sustainable Development Goals of the United Nations,

Youtube: eGreenBin video

eGreenBin smart bin

Screenshot 4
Screenshot 4
Screenshot 4

eGreenBin for teacher

Screenshot 4

eGreenBin-devices

Installation

  • IDE: PlatformIO / Arduino IDE:
Screenshot 4
- Libraries:
Screenshot 4
    ⇒ ESP8266WiFi
    
    ArduinoJson
    
    WebSocketServer
    
    ESP8266WebServer
    
    AccelStepper 
    
- Prepare for build system:
    - Master: ESP8266.
    - Slave: Arduino Uno R3 + CNC Shield V3 + Driver A8825 + Stepper Motor .
    - Sensor: HC-SR04 (Ultrasonic Sensor).
  1. Hardware Part
Screenshot 4
- HC-SR04 (Ultrasonic Sensor)
    - Link: [Ultrasonic Distance Sensor - HC-SR04 - SEN-15569 - SparkFun Electronics](https://www.sparkfun.com/products/15569)
Screenshot 4
- LCD 16x2 I2C:
    - Link: [LCD 1602 kèm module I2C màu xanh lá - Nshop (nshopvn.com)](https://nshopvn.com/product/lcd-1602-kem-module-i2c-mau-xanh-la/)
Screenshot 4
- Driver A8825:
    - Link: [Mạch Điều Khiển Động Cơ Bước DRV8825 - Nshop (nshopvn.com)](https://nshopvn.com/product/mach-dieu-khien-dong-co-buoc-drv8825/)
Screenshot 4
- Servo Motor:
    - [Động servo - Nshop (nshopvn.com)](https://nshopvn.com/product/dong-co-servo-sg90-tower-pro/)
Screenshot 4
- Power: 12V - 3A (Using **220V power directly or backup charger).**
- Others:
    - BreadBoard:
Screenshot 4
    - Wire:
Screenshot 4
- Materias
    - Formex
    - Mica

⇒ For ease of control, I have added the Arduino Uno R3 circuit to it:
Screenshot 4
  1. Wired diagram
Screenshot 4
- **Explanation:**
    - We are using a 12V - 3A power supply directly from the 220V input to run the stepper motor by connecting with CNC Shield V3.
    - We are using a power source from a portable charger to supply power to both circuits:
        - Master: ESP8266.
        - Slave: Arduino Uno R3.
    - In reality, we use the CNC Shield V3 board to operate the stepper motor, but for simplicity, we have replaced it with a different board in a 3D model form to make it easier for everyone to understand how our system is deployed.
- **Functions of devices:**
    - ESP8266: Connecting to a Wifi network and becoming a data transmission center.
    - LCD 16X2 I2C: Displaying the IP address of the network used by ESP8266 to input for two phones connecting to the IoT system.
    - HC-SR04: Detecting when trash is thrown in.
    - Arduino Uno R3 + CNC Shield V3 + Driver A8825: Controlling the operation of a stepper motor.
  1. IoT division
    • Reasons for choosing a specific circuit board:
      • Device that is easy to find, affordable, and suitable for students.
        • Arduino Uno: The Arduino Uno is a popular microcontroller board that is easy to find and affordable, and is commonly used in electronics projects and prototyping. It has a wide range of input/output pins, and can be programmed using the Arduino IDE.
        • ESP8266 WiFi module: The ESP8266 WiFi module is a low-cost WiFi module that can be used to add WiFi connectivity to electronics projects. It has a built-in microcontroller and can be programmed using the Arduino IDE, making it a versatile and affordable option for students.
    • Web socket protocol - Useful when using ESP8266 because it provides several benefits over traditional HTTP-based communication:
      • WebSocket provides a full-duplex communication channel over a single TCP connection. This means that the client and server can send messages to each other simultaneously without having to wait for a response. This real-time capability is especially important for IoT applications that require immediate responses.
      • WebSocket has lower overhead compared to HTTP because it uses a smaller message format and does not require the client to resend headers with every request. This makes WebSocket more efficient for data transfer, especially when dealing with large amounts of data.
      • WebSocket is easier to implement than other real-time communication protocols such as UDP and MQTT. It uses a simple and straightforward API, making it easier to integrate into your application.
    • Communicating ESP8266 with Arduino Uno R3 by using SDA and SCL pin - Using the I2C (Inter-Integrated Circuit) protocol:
      • The I2C protocol is a widely used communication protocol for communicating between microcontrollers and other devices such as sensors and displays.
    • How to set up project:
      • Step 1: Connecting ESP8266 to any WiFi network by input SSID and PASSWORD here!

        const char* ssid = "<YOUR_SSID>";
        const char* password = "<YOUR_PASSWORD>";
      • Step 2: After connecting to a WiFi network, the LCD screen will display the IP address information. We enter this IP address into the 2 devices we want to connect. When you see "2 devices connected" on the screen, it means that our system has completed the setup.

      • Step 3: Let's get started with your project.

Use case diagram

Screenshot 4

User flow

Screenshot 4

Screenshot 4

We also encourage everyone who is interested in the eGreenBin project to contribute to make eGreenBin better in the future.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published