Smart Dustbin With Using Arduino

by Gurdeep Sinjgh in Circuits > Arduino

33500 Views, 12 Favorites, 0 Comments

Smart Dustbin With Using Arduino

IMG_20190409_210512.jpg

The goal of this project is to keep our

Environment clean. Benefits of using Smart

Dustbin Bins.

• It will stop overflowing of dustbins along

roadsides and localities as smart Dustbins

Are managed at real time.

• It also aims at creating a clean as well as

Green environment.

• By using the routing algorithm it will smartly

find the shortest route thus it will reduce the

number of vehicles used for garbage

collection.

This Project has been made in the KHERA JATTAN NOOK

Makers name

Jyoti

soni

Pawan

Material

IMG_20190413_194805.jpg

1. Ultrasonic Sensor

2. Arduino

3. Servo Moter S9

4. Jumper Wire

5. Switch

6. Battery

7. Battery Clipper

Arduino Connect to Ultrasonic Sensor

IMG_20190409_181325.jpg

First,take ultrasonic Sensor to Connect it With Arduino

VCC - 5V

Trig - -5

Echo - -6

Gnd - Gnd

Arduino Connect to Servo Moter S9

IMG_20190409_181757.jpg

Take a servo Moter S9.

Then servo Positive wire connects Arduino Pin 3.3V

Servo Negative wire Connects Arduino Pin Gnd and then Signal Wire Connect to Arduino Pin 7

Connect Switch and Battery

IMG_20190409_182949.jpg
Diagram circuit .png

Take a Battery and fix the battery Clipper in it.

Battery Positive Wire Arduino Pin VCC

Battery Negative wire is to Put one Side of the Switch and one side of the Switch Arduino pin GND

Fix the Servo Pully With Sheet Metal

IMG_20190409_194123.jpg
IMG_20190409_195224.jpg

Fix Material

IMG_20190409_180614.jpg
IMG_20190409_183350.jpg
IMG_20190409_185712.jpg
IMG_20190409_200323.jpg
IMG_20190409_201020.jpg

First, took a box and then fix the ultrasonic sensor with the help of the Screwdriver.

Second, then fix the Arduino Uno

After that, the Servo motor fitted.

Code Upload

IMG_20190426_185549.jpg

#include

//servo library

Servo servo;

int trigPin = 5;

int echoPin = 6;

int servoPin = 7;

int led= 10;

long duration, dist, average;

long aver[3]; //array for average

void setup() {

Serial.begin(9600);

servo.attach(servoPin);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

servo.write(0); //close cap on power on

delay(100);

servo.detach();

}

void measure() {

digitalWrite(10,HIGH);

digitalWrite(trigPin, LOW);

delayMicroseconds(5);

digitalWrite(trigPin, HIGH);

delayMicroseconds(15);

digitalWrite(trigPin, LOW);

pinMode(echoPin, INPUT);

duration = pulseIn(echoPin, HIGH);

dist = (duration/2) / 29.1; //obtain distance

}

void loop() {

for (int i=0;i<=2;i++) { //average distance

measure();

aver[i]=dist;

delay(10); //delay between measurements

}

dist=(aver[0]+aver[1]+aver[2])/3;

if ( dist<50 ) {

//Change distance as per your need

servo.attach(servoPin);

delay(1);

servo.write(0);

delay(3000);

servo.write(150);

delay(1000);

servo.detach();

}

Serial.print(dist);

}

It's Ready

IMG_20190409_210456.jpg

Would you like to watch Dustbin's video?

please Watch