Smart Dustbin using Arduino

Smart Dustbin Interfacing with Arduino and Ultrasonic Sensor Leave a comment

[otw_is sidebar=otw-sidebar-1]Smart Dustbin using Arduino,Circuit Design Of  Smart DustbinHi guys! In this tutorial, I will display you how to build a Smart Dustbin using Arduino, the top of the dustbin will spontaneous open when you appear with waste. The main component used to build this Smart Dustbin is an Ultrasonic Sensor and Arduino. In this tutorial, I have build a easy system called Smart Dustbin using Arduino, Ultrasonic Sensor and Servo motor, where the top of the dustbin will automatically open itself upon tracing the human hand.

Smart Dustbin Interfacing with Arduino and Ultrasonic Sensor

Garbage bins, or Trash Cans are small plastic containers that are utilized to store waste on an interim basis. They are utilizing in homes, offices, and many other places to gather the waste.

In some places, wasting is a serious crime and therefore public trash containers are the only way to throw away the waste.

Normally, it is a usual practice to use separate bins for gathering all wet or dry waste.

Smart Dustbin using Arduino,Circuit Design Of  Smart Dustbin 

Concept of Smart Dustbin

The principle behind the Smart Dustbin using Arduino project is Object Noticing. I have used the Ultrasonic Sensor which is set on top of the dustbin’s cap and when the sensor trace any object like a human hand, it will activate Arduino to open the top of dustbin.

 

Required Components

  1. Arduino UNO
  2. Ultrasonic Sensor
  3. Servo motor
  4. Battery

Circuit Design Of  Smart Dustbin

Firstly collect all the required components from libraries of proteus. Furthermore trig pin of Ultrasonic is connected to Arduino pin 5, whereas Echo pin is attached to Arduino pin 6, and GND is connected to ground. On the other hand one pin of servo motor pin is connected to Arduino pin 7. And thre rest of the pin is ground and one gives 9v.

How to Simulate Arduino in Proteus

 

Circuit Design Of  Smart Dustbin

Smart Dustbin Using Arduino Programming

#include <Servo.h>
Servo myservo;  
int pos = 20;  
const int trigPin = 5;
const int echoPin = 6;
const int led = 13;

long duration;
float distance;

void setup() 
{
  myservo.attach(11);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT); 
  pinMode(led, OUTPUT);
  myservo.write(pos);
}

void loop() 
{
  //Serial.begin(9600);
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);
  distance = 0.034*(duration/2);
  //Serial.println(distance);
  if (distance < 27)
  {
    digitalWrite(led,HIGH);
    myservo.write(pos+160);
    delay(1000);
  }
  else 
  {
    digitalWrite(led,LOW);
      myservo.write(pos);
  }
  delay(300);
}

 

 

 

Working Of  Smart Dustbin

After making all the necessary connections, upload the code to Arduino and give 9v power supply to the circuit. Once the circuit is powered ON, Arduino keeps observing for any object near the Ultrasonic Sensor.

If the Ultrasonic Sensor trace any object like a hand, Arduino figure out its distance and if it less than a certain predetermine value, Arduino will set the Servo Motor and with the support of the stretch arm, it will open the top of dustbin.

 

 

Conclusion:

 An easy but helpful project called Smart Dustbin using Arduino is build. Using this lesson, the top of the dustbin stays closed, so that trash is not reveal and when you want throw away any waste, it will automatically open the top of dustbin.

Leave a Reply

Your email address will not be published. Required fields are marked *