Exp.1 (A) - SD20IF007

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

SMART DUSTBIN

USING AIDUINO
SMART DUSTBIN USING ARDUINO

Abstract: The main objective of the project is Keywords: arduino, microcontroller, IOT,
to design a smart dustbin which will help in circuitry
keeping our environment clean and also eco
friendly. We are inspired from Swaach Bharat INTRODUCTION:The rate increasing
Mission. Nowadays technologies are getting population in our country has increasing rapidly
smarter day-by-day so, as to clean the and also we have increase in garbage which have
environment we are designing a smart dustbin increased environmental issue. Dustbin is a
container which collects garbage’s or stores items
by using Arduino. This smart dustbin
management system is built on the which recyclable or non-recyclable, decompose
and non-decompose. They are usually used in
microcontroller based system having
homes, office etc, but in case they are full no one
ultrasonic sensors on the dustbin. If dustbin is
is there to clean it and the garbage are spilled out.
not maintained than these can cause an
The surrounding of a dustbin is also conducive
unhealthy environment and can cause pollute
for increasing the pollution level. Air pollution
that affect our health. In this proposed
due to a dustbin can produce bacteria and virus
technology we have designed a smart dustbin
which can produce life harmful diseases for
using ARDUINO UNO, along with ultrasonic
human. Therefore, we have designed a smart
sensor, servo motor, and battery jumper wire.
dustbin using ARDUINO UNO, ultrasonic sensor
After all hardware and software connection, which will sense the item to be thrown in the
now Smart Dustbin program will be run. dustbin and open the lid with the help of the
Dustbin lid will when someone comes near at motor. It is an IOT based project that will bring a
some range than wait for user to put garbage new and smart way of cleanliness. It is a decent
and close it. It’s properly running or not. For gadget to make your home clean, due to
social it will help toward health and practically all offspring of home consistently
hygiene, for business for we try to make it make it grimy and spread litter to a great extent
affordable to many as many possible. So by electronics, rappers and various other things.
that normal people to rich people can take Since the smart dustbin is additionally intriguing
benefit from it. and children make fun with it so it will help to
maintain cleanliness in home. It will be applied
for various type of waste. Dustbin will open its 6. JUMPER WIRES
lid when someone/object is near at some range
then it will wait for given time period than it will 2. PROCEDURE:
close automatically. Here lid will close when you SERVO MOTOR CONNECTION SETUP:
don’t want to use and it will only open when it
required. 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,
1 .METHODOLOGY:SMART DUSTBIN I have used a Servo Motor for this purpose. In
USING ARDUINO is an IOT based project. Here order to open the lid, I have fixed a small plastic
we are using arduino for code execution, for tube (like an empty refill of a ball-point pen) to
sensing we used ultrasonic sensor which will the servo horn (a single ended horn) using instant
glue. For this mechanism to be able to open the
open lid and wait for few moment. It will bring
lid of the dustbin, it must be placed near the lid.
drastic changes in tern of cleanliness with the
help of technology. Everything is getting with In this the actual setup of dustbin design and
smart technology for the betterment of human build the system by using Arduino. Starting with
being. So this help in maintaining the the mechanism of opening the lid of dustbin, for
environment clean with the help of technology. It this purpose Servo motor has been used.To open
is a sensor based dustbin so it would be easy to the lid, I have attached a small plastic tube (like
access/use for any age group. an empty refill of a ball-point pen) to the servo
horn (a single ended horn) using instant glue.
Our aim is also to make it cost effective so that
many numbers of people can get the benefit from
this. And it should be usable to anyone and
helpful for them. ULTRASONIC SENSOR CONNECTING:

After successfully servo motor is placed now it’s


time for sensor, so HC-SR04 Ultrasonic sensor is
To complete our project, we require some placed at the front of the dustbin.
software as well as some hardware.

1.1. Required Software:


WIRING UP THE COMPONENTS: The final
1. ARDUINO IDE
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
1.2 Required Hardware:
that they don’t hang around. All the wires from
1. ARDUINO UNO both the components i.e. Ultrasonic Sensor and
Servo Motor are connected to respective pins of
2. ULTRASONIC SENSOR
Arduino. This finishes up the build process of the
3. SERVO MOTOR Smart Dustbin.InArduino Code has been
4. 9V BATTERY submitted, and with all hardware and software
5. DUSTBIN
connection in Dustbin. We will run our dustbin,
wait its working or not.

CIRCUIT DIAGRAM:
The circuit diagram of smart dustbin is shown in
given below.Arduino Uno board consist
ATmega328 P microcontroller, it is important
component of UNO board. In this other
components are present like a power supply,
ultrasonic module and servo motor etc.

The ultrasonic sensor echo pin and trigger pin is


connected to pin digital pin D7 and D8. The
+Vcc pin is connected to +5V supply and GND
pin is connected to ground pin of arduino Uno
board. The control (PWM) pin of servo motor is Fig .1 Circuit Diagram
connected to digital pin D9 of arduino. Hence,
servo motor is used to open the cap of dustbin. Initially, the cap of dustbin is switched back to
zero-degree position (Close) by the servo motor.
For this project and components used, the preset The controller keeps on monitoring the signal
level of distance between dustbin and hand is receive from ultrasonic module. When ultrasonic
fixed to 40 cm. module detects an obstacle, the controller check if
it crosses a threshold distance value set for open
Ultrasonic Sensor: This sensor is used in to locate
the cap of dustbin.
the distance between the smart dustbin and
hand/object come near to it. The principle behind As soon as that happens, the controller triggers
finding distance of obstacle is sonar wave. It only the servo motor when then open the cap for
detects obstacle when Trigger pin receive high limited line (as set in code part). For this system
pulse for the period more than 10 us. When this prototype set time is given for 2 second.
sensor verifies the presence of hand (obstacle) it
starts to send eight cycles of ultrasonic burst at 40 Here in this project also used an ON/OFF switch,
KHz and then it waits for reflected ultrasonic in order to activate and de-activated the smart
signal. dustbin whenever require as per situation. A pull-
up resistor of 10K is connected in series of switch
Ultrasonic sensor module has two drums. One of as shown in circuit diagram in order to solve the
the drums is used for transmitting the pulse of de-bouncing problem.
ultrasonic and the second drums are for receiving
the ultrasonic signal. We can also use Arduino NANO instead of
Arduinouno. Do not have to change source code
When ultrasonic detect/sense object, the echo pin because the board use identical pin for controlling
of module is set high. Waiting period of reflected servo motor, switch and ultrasonic sensor.
pulse is completely dependent upon the location
of obstacle. When the echo signal is obtained, we The simplest part of the project smart dustbin
can calculate the distance by using the formula using arduino is software part because it is clean,
simple and easy to understand. The program
Distance (in cm) = (duration/2) / 29.1 check the distance had also used “Servo.h” inbuilt
library function for servo operation. It can assume
any value of motor rotation using ▪ Maintain environment hygiene (i.e. no
“myServo.write(angle)” function but here we had overflowing of waste and less
only use two state of position (1) zero degree and unpleasant odor).
(2) 1800.
▪ It will help in bringing evolution by
technology in term of cleanliness.

3. WORKING:
After wiring and attaching all the devices and 4. CONCLUSION AND SUGGESTION: Here
setting up to the Smart Dustbin, now observe all we are going to make an evolution changes
the important setup whether they are well toward cleanliness. The combination of
connected or something missed.
intelligent waste monitoring and trash
After connection set up now next step is to compaction technologies, smart dustbins are
submit/upload code in Arduino and supply power better and shoulders above traditional
to the circuit. garbage dustbin. It is equipped with smart
When system is powered ON, Arduino keeps devices like sensor Arduinoetc.Lid of the
monitoring for any things that come near the dustbin will automatically open when an
sensor at give range. object comes near to the dustbin and after
certain time period it will close the lid.
When Ultrasonic sensor detect any object for
example like hand or others, here Arduino For social it will help toward health and
calculates its distance and if it less than a certain
hygiene, for business for we try to make it
predefines value than servo motor get activate
first and with the support of the extended arm of affordable to many as many possible. So that
the lid. normal people to rich people can take benefit
from it. Believe this will bring something
Lid will open for a given time than it will changes in term of cleanliness as well
automatically close.
technology.So our next work will be adding one
more sensor which will sense whether our dustbin
is full or not. And there will be a display will be
3.1 ADVANTAGES: added so that user can notify that dustbin is full or
not.
Following are the advantages of using Smart
dustbin:

▪ A reduction in the number of waste .


collections needed by up to 80%,
resulting in less manpower, emissions,
fuel use and traffic congestion.
▪ A reduction in the number of waste
bins needed.
#include <Servo.h>
const int trigPin = 6;
const int echoPin = 7;
long duration;
int distance;
Servo myServo;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
myServo.attach(9);
}
void loop() {
for (int i = 15; i <= 165; i++) {
myServo.write(i);
delay(30);
distance = calculateDistance();//
Serial.print(i);
Serial.print(",”);
Serial.print(distance);
Serial.print(".");
}
for (int i = 165; i > 15; i--) {
myServo.write(i);
delay(30);
distance = calculateDistance();
Serial.print(i);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
}
}
int calculateDistance() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin,HIGH);
distance = duration * 0.034 / 2;
return distance;
}
THANK YOU

You might also like