The smart dustbin is built on a microcontroller-based platform Arduino Uno board which is interfaced with the Servo motor and ultrasonic sensor. An ultrasonic sensor is placed at the top of the dustbin which will measure the stature of the dustbin. The threshold stature is set at a particular level. Arduino will be programmed in such a way that when someone will come in front of the dustbin the servo motor will come into action and open the lid for the person to put the waste material into the dustbin. The lid of the dustbin will automatically open itself upon the detection of a human hand.
Servo Motor:
SERVO MOTOR is an electromechanical device that produces torque and velocity based on supplied current and voltage. It can push or rotate an object with great precision. Servo Motor SG-90 is used. It will perform its angular rotations when a signal will be provided by the microcontroller. The servo motor rotates approximately 180 degrees (90 in each direction).
Infrared sensor:
IR SENSOR is a radiation-sensitive optoelectronic component with spectral sensitivity in the infrared wavelength. It is used for object detection.
Connections: –
The Red Pin of the Servo Motor is connected to Arduino 3.3v. The Black Pin of the Servo Motor is connected to Arduino GND (Ground). The Orange Pin of the Servo Motor with Arduino Pin 8. VCC of the sensor is connected with Arduino 5v.
The Smart Dustbin as you can see in the picture above is built using Cardboard. This is a custom-made Smart Dustbin equipped with HC-SR04 Sensor, Arduino, and a Servo Motor. It is programmed using the Arduino code.
Code:
#include<Servo.h>
Servo myservo;
int angle = 0;
int angle step= 50;
void setup(){
myservo.attach(8);
pinMode(2,INPUT_PULLUP);
}
void loop() {
if(digitalRead(2) == HIGH){
myservo.write(180);
}
else{
myservo.write(-180);
delay(3000);
}
Once there is no one in front of the Sensor the Smart Dustbin Lid remains closed.
The smart dustbin is a carefully designed solution that solves the social issue of waste disposal.