Varun walimbe
Published © GPL3+

Smart Segregator that seperates Dry and Wet Waste

This can separate dry waste and wet waste successfully.

IntermediateFull instructions provided4 hours45,549
Smart Segregator that seperates Dry and Wet Waste

Things used in this project

Hardware components

Arduino Mega 2560
Arduino Mega 2560
Brain of the Project
×1
Gravity: Digital Capacitive Touch Sensor For Arduino
DFRobot Gravity: Digital Capacitive Touch Sensor For Arduino
Helps in classifying Dry Waste.
×1
SparkFun Soil Moisture Sensor (with Screw Terminals)
SparkFun Soil Moisture Sensor (with Screw Terminals)
This will detect moisture and thus help in classifying waste as dry or wet
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
Actuator
×1
Acrylic Sheets
Body of the Segregator
×1
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
Jumper wires (generic)
Jumper wires (generic)
×1
9V battery (generic)
9V battery (generic)
Power Supply
×1

Software apps and online services

Arduino IDE
Arduino IDE
Coding Platform which is compatible with Arduino.

Hand tools and fabrication machines

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Smart Segregator Circuit Diagram

Interfacing of Touch sensor with Arduino

Code

Smart Segregator

C/C++
#include <Servo.h>

class Smart_Segregator
/*
   _____________________________________________________________
  |
  | Description
  | -----------
  | - This is a smart segregator which seperates dry and wet
  |   wet waste. (It cannot segregate metal or plastic)
  |
  |.............................................................
  |
  | Attributes
  | ----------
  | pin_1 : int
  |    -  Servo Motor pin number.
  |
  | pin_2 : int
  |    -  Moisture Sensor pin number.
  |
  | pin_3 : int
  |    - Touch Sensor pin number.
  |
  |............................................................
  |
  | Methods
  | -------
  | dry_waste()
  |       - Lid of the segregator slides towards right side.
  |
  | wet_waste()
  |       - Lid of the segregator slides towards left side
  |
  | neutral_state()
  |       - In which the lid of segregator is in the middle.
  |
  | execute()
  |       - Smart Segregator starts operating.
  |
  |___________________________________________________________
  */
{
  public:
     int servo_pin;
     int moisture_sensor_pin;
     int touch_sensor_pin;
     int detect_moisture;
     int detect_touch;
 
     Servo servo;

     Smart_Segregator(int pin_1, int pin_2, int pin_3)
     {
       servo_pin = pin_1;
       moisture_sensor_pin = pin_2;
       touch_sensor_pin = pin_3;

       detect_moisture = 0;
       detect_touch = false;
     }

    void init()
    {
      Serial.begin(9600);
      servo.attach(servo_pin);
      servo.write(90);
      
      pinMode(moisture_sensor_pin, INPUT);
      pinMode(touch_sensor_pin, INPUT);

      Serial.println("Your Smart Segregator is ready to Segregate!");
    }

    void dry_waste()
    {
      servo.write(0);
    }

    void wet_waste()
    {
      servo.write(180);
    }

    void neutral_state()
    {
      servo.write(90);
    }
    
    void execute()
    {
      detect_moisture = analogRead(moisture_sensor_pin);
      detect_touch = digitalRead(touch_sensor_pin);

      if (detect_moisture > 85 && detect_touch == true)
      {
        wet_waste();
      }

      else if (detect_moisture <= 85 && detect_touch == true)
      {
        dry_waste();
      }

      else 
      {
        neutral_state();
      }
    }
}

segregator = Smart_Segregator(8,6,2);

void setup() 
{
  segregator.init();
}

void loop() 
{
 segregator.execute();
}

Credits

Varun walimbe
15 projects • 69 followers
I like to innovate and make different types of Robots and systems that thrive to make human lives easier :)

Comments