The main task of the task is the detecting and sensing the object like hand make the dustbin to open and close by using the ultrasonic sensor and servo motor. Ultrasonic sensor is used to sense the object (hand) by sensing the distance from that sensor. Ultrasonic sensor has four pins, they are input 5V power supply, ground, trig pin, echo pin. Trig pin is taken as input and echo pin taken as output. Servo motor is used to rotate the motor step by step by setting the angle to the motor. Servo motor has three pins, they are 5V pin and ground pin.
By making the connections
As per the circuit, by connecting ultrasonic sensor, servo motor. By using arduino program gives the result of sensing the hand using the sensor and make the servo motor rotate to open the lid of the dustbin. The sensor senses the object, if the distance is less than the certain distance and motor rules the open and close of the lid. The distance is calculated using formula
✔ Speed of sound = v = 0.034cm/us
✔ Time = distance / speed
✔ t = s / v = 10 / 0.034 = 294us
✔ Distance = t * 0.034 / 2
The instruction is sent to the blynk app with the help of the Wi-Fi module. By using this app we can get the information about the state of the dustbin.