0% found this document useful (0 votes)
79 views8 pages

ECE dustBIN FINALE

This document is a certificate certifying that four students - Anusha R, Dheeraj R, Jayanth Raju G S, and Manu B M - of the II semester Civil Engineering branch at R V College of Engineering successfully completed their prescribed project in the course "Elements of Electronic Engineering" for the academic year 2020-2021. The project was titled "Smart Dustbin" and used an Arduino, ultrasonic sensor, and servo motor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views8 pages

ECE dustBIN FINALE

This document is a certificate certifying that four students - Anusha R, Dheeraj R, Jayanth Raju G S, and Manu B M - of the II semester Civil Engineering branch at R V College of Engineering successfully completed their prescribed project in the course "Elements of Electronic Engineering" for the academic year 2020-2021. The project was titled "Smart Dustbin" and used an Arduino, ultrasonic sensor, and servo motor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

R.V.

COLLEGE OF ENGINEERING
(An Autonomous Institution Under VTU, Belagavi)

DEPARTMENT OF ELECTRONICS & COMMUNICATION


CERTIFICATE

This is to certify that

ANUSHA.R(1RV19CV017),
DHEERAJ.R(1RV19CV025),
JAYANTH RAJU G S (1RV19CV039)
MANU B.M (1RV19CV049)

OF II SEM CIVIL ENGINEERING


BRANCH HAVE SUCCESFULLY COMPLETED THEIR PROJECT
PRESCRIBED BY THE INSTITUTION IN THE COURSE OF Elements Of
Electronic Engineering FOR THE ACADEMIC YEAR 2020-2021

Max.Marks Marks Obtained

Signature of the Faculty Signature of the H.O.D


SMART DUSTBIN
(Using Arduino, Ultrasonic Sensor & Servo Motor)

INTRODUCTION:

Dustbins are small plastic (or metal) containers that are used to
store waste on a temporary basis. They are used in homes, offices, streets, parks
etc. In some places, littering is a serious offence and hence Public Waste
Containers are the only way to dispose small waste. Usually, it is a common
practice to use separate bins for collecting wet or dry, recyclable or nonrecyclable
waste.

Dustbin have been important part of our life. But, the


issue we have to deal is its open cap. Due to this open cap, insect and
flies visit the garbage and also the same flies roam around out kitchen
or lunch buffet. This leads to serious health issue. In order to solve this
issue, we had design here a Smart Dustbin using Arduino Uno. This
smart dustbin automatic open its cap when we pass our hand above it.
What is Aurdino?

Aurdino is a software designed to make electronics


more accessible to designers, anyone who is interested in creating
interacting objects.
where the Ultrasonic Sensor is placed on top of the dustbin’s lid and
when the sensor detects any object like a human hand, it will trigger
Arduino to open the lid.
Arduino Uno board consist ATmega328 AVR microcontroller
which is heart of the board. It is accompanied by other components
like a power supply, ultrasonic module HC-SR04 and servo motor.

The ultrasonic sensor echo pin and trigger pin is connected to pin
digital pin D7 and D8. The +Vcc pin is connected to +9V supply and
GND pin is connected to ground pin of arduino uno board. The
control (PWM) pin of servo motor is connected to digital pin D9 of
arduino. Hence, servo motor is used to open the cap of dustbin.

For this project and components used, the preset level of distance
between dustbin and hand is fixed to 30 to 70 cm.
Making of Smart dustbin

Aim:
How to Make a Smart Dustbin using Arduino, where the lid of the
dustbin will automatically open when you approach with trash.

Materials Used:

• Arduino UNO
• HC-SR04 Ultrasonic Sensor Module
• Tower Pro SG90 Servo Motor
• Connecting Wires
• 5V Power Supply
• A small dustbin with hinged lid
• Miscellaneous (glue, plastic tube, etc.)
Procedure:
Connecting the Servo:

• Now, let me take you through the actual setup and build process
of the Smart Dustbin using Arduino. First, I will start with the
mechanism to open the lid. As you might have already guessed, I
have used a Servo Motor for this purpose.
• In order to open the lid, I have fixed a small plastic tube (like an
empty refill of a ball-point pen) to the servo horn (a single ended
horn) using instant glue.

• For this mechanism to be able to open the lid of the dustbin, it


must be placed near the hinge where the lid is connected to the
main can. From the following image, you can see that I have fixed
the servo motor on the can. Also, make sure that the lifting arm is
parallel to ground under closed lid condition.

Connecting the Ultrasonic Sensor:

• Once the servo is in position, you can move onto the Ultrasonic
Sensor. Make two holes corresponding to the Ultrasonic Sensor on
the lid of the dustbin, as shown in the following image.
• Now, from the inside, place the Ultrasonic Sensor through the
holes and fix its position with the help of glue.

Wiring up the Components:

• The final step in the build process is to make the necessary


connections using long connecting wires as per the circuit
diagram and securing these wires so that they don’t hang around.
• All the wires from both the components i.e. Ultrasonic Sensor and
Servo Motor are connected to respective pins of Arduino. This
finishes up the build process of the Smart Dustbin.
Coding :
#include <Servo.h> //servo library

//-----Wiring---
#define trigPin 12
#define echoPin 11
#define servoPin 7
//----Wiring---

Servo;

long duration, dist, average;

int flag=0; //button flag

long aver[3]; //array for average

void setup() { servo.attach(servoPin);


pinMode(4,INPUT); //button is connected to D3 pin
pinMode(trigPin, OUTPUT); //Assign trigger pin as
output pinMode(echoPin, INPUT); //Assign echo pin
for input
servo.write(90); //open cap on
power on delay(1000); servo.write(3);
}

void measure() { //here is for range


sensor 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() {

if (digitalRead(3)==1 && flag==0) { //if button


pressed servo.write(90); //open cap delay(3000);
//wait 1 second for servo flag=1; //remember
that cap is opened
}
if (digitalRead(3)==0 && flag==1) { //if button released
servo.write(3); //close cap
delay(1000); //wait 1 second for
servo flag=0; //remember that
cap is closed
}

if (flag==0) {
for (int i=0;i<=2;i++) { //average distance taken up to three
time measure(); aver[i]=dist;
delay(50); //50 milli second delay between measurements
}
dist=(aver[0]+aver[1]+aver[2])/3; //average distance by 3
measurements }

if (dist>10 && dist<30 && flag==0) { //if hand on the distance between 10 to 30 cm
servo.write(90);
delay(10000); //open cap for 10 seconds
servo.write(3);
delay(1000);
}

if (dist>30 && dist<60 && flag==0) { //if hand on the distance between 30 to 60 cm
servo.write(90);
delay(3000); //open cap for 3 seconds
servo.write(3);
delay(1000);
}

Conclusion:
A simple but useful project called Smart Dustbin
using Arduino is designed and developed here. Using this project, the
lid of the dustbin stays closed, so that waste is not exposed (to avoid flies
and mosquitos) and when you want dispose any waste, it will
automatically open the lid.

You might also like