You are on page 1of 12

SMART DUSTBIN

● About this Project : In this corona pandemic ,


everything must be contactless , so I tried to
make a contactless dustbin called “Smart
Dustbin” to promote “Clean India Mission”.

This Smart Dustbin senses the rubbish using an


Ultrasonic sensor which sends the message to
the servo motor using Arduino Uno.

When the person takes the rubbish closer to the


Smart Dustbin , then the dustbin cap will
automatically open for the waste and after a
certain time, it will automatically close.

● Components used :
HC-SR04 Ultrasonic sensor
SG90 Tower Pro Servo Motor
Arduino UNO R3
5V Power Supply
Jumper Wires
● Male to Male
● Female to Male
● Female to Female
Dustbin
Miscellaneous ( Glue , Scissor , Cutter)
HC-SR04 Ultrasonic sensor

SG90 Tower Pro Servo Motor


Arduino Uno R3

Jumper Wires
Concept Behind Smart Dustbin :
The main concept behind the Smart Dustbin
using Arduino project is Object Detection.
I have used an Ultrasonic sensor in this project
to sense the rubbish as an object .When the
sensor detects any object, it will trigger Arduino
to open the lid . I have used a Servo motor to
persuade the mechanism of lid-opening.
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 dustbin.

After setting up the smart dustbin and making all


the necessary connections , upload the code to
Arduino and provide 5V Power supply to the
circuit. Once the system is powered ON ,
Arduino keeps monitoring for any object near
the Ultrasonic Sensor.

If the Ultrasonic sensor detects any object,


arduino calculates its distance and if it is less
than a certain predefined value, Arduino will
activate the Servo motor and with the support of
the extended arm , it will list the lid open.
After certain time , the lid is automatically closed
Circuit Diagram
About Arduino : Arduino is an open-source
electronics platform based on easy-to-use
hardware and software. Arduino boards are able
to read inputs - light on a sensor, a finger on a
button, or a Twitter message - and turn it into an
output - activating a motor, turning on an LED,
publishing something online.
To do Arduino Programming , we use Arduino
software IDE .
Why Arduino ?
Inexpensive - Arduino boards are relatively
inexpensive compared to other microcontroller
platforms. The least expensive version of the Arduino
module can be assembled by hand, and even the
pre-assembled Arduino modules cost less than $50.
Cross-platform - The Arduino Software (IDE) runs on
Windows, Macintosh OSX, and Linux operating
systems. Most microcontroller systems are limited to
Windows.
Simple, clear programming environment - The
Arduino Software (IDE) is easy-to-use for beginners,
yet flexible enough for advanced users to take
advantage of as well. For teachers, it's conveniently
based on the Processing programming environment,
so students learning to program in that environment
will be familiar with how the Arduino IDE works.
Open source and extensible software - The Arduino
software is published as open source tools, available
for extension by experienced programmers. The
language can be expanded through C++ libraries,
and people wanting to understand the technical
details can make the leap from Arduino to the AVR C
programming language on which it's based. Similarly,
you can add AVR-C code directly into your Arduino
programs if you want to.
Open source and extensible hardware - The plans of
the Arduino boards are published under a Creative
Commons license, so experienced circuit designers
can make their own version of the module, extending
it and improving it. Even relatively inexperienced
users can build the breadboard version of the module
in order to understand how it works and save money.
Arduino Code
#include <Servo.h>

Servo servoMain; // Define our Servo

int trigpin = 10;

int echopin = 11;

int distance;

float duration;

float cm;

void setup()

servoMain.attach(9); // servo on digital pin 10

pinMode(trigpin, OUTPUT);

pinMode(echopin, INPUT);

void loop()

digitalWrite(trigpin, LOW);

delay(2);

digitalWrite(trigpin, HIGH);

delayMicroseconds(10);

digitalWrite(trigpin, LOW);

duration = pulseIn(echopin, HIGH);


cm = (duration/58.82);

distance = cm;

if(distance<70)

servoMain.write(180); // Turn Servo back to center position (90 degrees)

delay(3000);

else{

servoMain.write(0);

delay(50);

}
Servo Motor
A servomotor is a rotary actuator or linear actuator that allows
for precise control of angular or linear position, velocity and
acceleration. It consists of a suitable motor coupled to a sensor
for position feedback. It also requires a relatively sophisticated
controller, often a dedicated module designed specifically for use
with servomotors.
Servo motors are not a specific class of motor, although the term
servomotor is often used to refer to a motor suitable for use in a
closed-loop control system.
Servo motors are used in applications such as robotics, CNC
machinery or automated manufacturing.
Difference between Servo Motor and DC Motor :

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 mosquitoes) and when we want to
dispose any waste , it will automatically open the
lid .

You might also like