most of you have a smartphone, smartwatch and many other smart machines which are using in daily life. How it will If we will make our one another basic thing smart. In this technological ERA, anything can be smart so we are thinking about to make our dustbin as a smart dustbin Using Arduino microcontroller. Will it be interesting ?. Ok so, today we are going to make our dustbin smart. Now, you will think about it. how it can be possible and how will it works?. there are so many questions are there. To find answer Read full article carefully. there is almost everything by which you can easily make your dustbin. like what things we required to make this smart dustbin Using Arduino controller. What should be the components, Circuit diagram and yes you need a code also to make it possible.
Working of Smart Dustbin:-
Smart Dustbin as its names to describe. it works smart. It is a good device to make your home clean. because of almost all children of home always make it dirty and spread garbage here and there by paper, rappers and many other things. because the smart dustbin is also interesting and children make fun with it so they help to keep clean your home. they always will be used to through all garbage and waste into this smart dustbin.
Smart dustbin open and close it’s top when someone is in front of it. when you come in front of it. it’s cap get open. and when you throw the waste into it then it closes by itself. so how it’s work what the principle behind it and what the components and sensor do it possible. all these things we are going to learn in this post.
Components Required to make smart dustbin Using Arduino
there are many components needed in this project. we need a microcontroller which can give the instruction according to the condition. so, to make a decision according to the condition we need Controller and we are using Arduino Board with atmega328p microcontroller. and then we need a sensor which can sense the person at the front of dustbin so it can detect this person and give some value to the microcontroller on which the microcontroller will work. now we need a device or electronic components which can give the movement to the dustbin cap. which we required the most. so, it can be possible with the Servo motor. servo motor rotates according to the degree. we can convert this rotation into the linear motion by some means as you will in the tutorial. in below we describe some components which we will use.
It has an ultrasonic sensor in the front part of the dustbin as you can see in the above picture. so, it can detect the person in front of the dustbin. The ultrasonic sensor works on the ultrasonic sound frequency. It has two pins TRIG and ECHO. trig pin transmits the ultrasound wave and ECHO pin receive the sound wave and the duration of the sound travel. we have a full tutorial on how to use and working of ultrasonic sensor here.
so ultrasonic sensor put in the front of the dustbin by making connections.
Servo motor uses here to make the movement in the dustbin cap. when someone detects in front of the sensor it will send the information to the Arduino microcontroller and Arduino gives the signal to the servo motor to rotate some degree which we have to calibrate duration of assembly. means we have to measure the distance cover by the cap and calibrate this distance with the motor rotation. for example, if the cap takes 2 cm movement then how much degree rotation will we need by a servo. and we attached servo at the topside of the dustbin as you can see in the below diagram.
Arduino is an Open source AVR based board which also known as a microcontroller. it has 3 port and 14 gpio pins 6 analog pins. and easy to use we have a tutorial on Arduino you can learn Arduino from where.
Smart Dustbin Using Arduino Circuit Diagram
Now we need a circuit diagram to make this awesome smart dustbin. always a circuit diagram should be clear and must have when we do the connection. it reduces the chance of connection errors. it means when we have a good circuit diagram then we better know how to connect things and wires. so, we need it in any project.
In the above circuit diagram, you can see all the connection clearly.
- connect Arduino pin 10 to the Trig pin of the ultrasonic sensor.
- connect Arduino pin 11 to the Echo pin of the ultrasonic sensor.
- connect GND and VCC of ultrasonic, Arduino and servomotor together.
- Connect pot pin of the servo motor to the pin 9 of Arduino
Smart Dustbin Arduino C code
Servo servoMain; // Define our Servo
int trigpin = 10;
int echopin = 11;
servoMain.attach(9); // servo on digital pin 10
duration = pulseIn(echopin, HIGH);
cm = (duration/58.82);
distance = cm;
servoMain.write(180); // Turn Servo back to center position (90 degrees)
Copt this above code into the Arduino IDE and upload it to the Arduino. now make all connection. your dustbin is ready now. for any query you can ask in the comment box. and if you like this tutorial comment and share this article. all the best.