50% found this document useful (2 votes)
21 views2 pages

Smart Dustbin Using Ultrasonic Sensor and Servo Motor

The document outlines the creation of a smart dustbin that automatically opens and closes its lid using an ultrasonic sensor and a servo motor. It details the required components, circuit connections, implementation steps, fine-tuning options, and troubleshooting tips. The setup can be enhanced with additional features like an indicator light or alert system.

Uploaded by

kavilakamsani05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
21 views2 pages

Smart Dustbin Using Ultrasonic Sensor and Servo Motor

The document outlines the creation of a smart dustbin that automatically opens and closes its lid using an ultrasonic sensor and a servo motor. It details the required components, circuit connections, implementation steps, fine-tuning options, and troubleshooting tips. The setup can be enhanced with additional features like an indicator light or alert system.

Uploaded by

kavilakamsani05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Smart Dustbin Using Ultrasonic Sensor and Servo Motor

To create a smart dustbin that opens and closes its lid automatically using an ultrasonic
sensor and a servo motor, you'll need to follow these steps:

Components Required

1. Microcontroller: Arduino UNO or any compatible board


2. Ultrasonic Sensor: HC-SR04
3. Servo Motor: SG90 or any suitable servo motor
4. Breadboard and Jumper Wires
5. Power Supply: Battery or USB connection to power the microcontroller
6. Dustbin

Circuit Diagram

1. Ultrasonic Sensor (HC-SR04) Connections:


o VCC to 5V on Arduino
o GND to GND on Arduino
o Trig to digital pin 9 on Arduino
o Echo to digital pin 10 on Arduino
2. Servo Motor (SG90) Connections:
o VCC to 5V on Arduino
o GND to GND on Arduino
o Signal to digital pin 3 on Arduino

Steps to Implement

1. Assemble the Components: Connect the ultrasonic sensor and servo motor to the
Arduino as per the circuit diagram.
2. Upload the Code: Open the Arduino IDE, copy the provided code, and upload it to
the Arduino board.
3. Test the Setup: Power the Arduino board and place your hand near the ultrasonic
sensor. The servo motor should open the lid when the object is within the threshold
distance and close it when the object is away.

Fine-Tuning

1. Adjust Threshold Distance: Modify the ‘thresholdDistance’ variable in the code


to set the distance at which the lid opens.
2. Servo Motor Angle: Adjust the angles in the ‘servoMotor.write()’ function if
needed to fine-tune the opening and closing positions of the lid.

Troubleshooting

1. Sensor Range: Ensure the ultrasonic sensor is correctly positioned and has a clear
line of sight.
2. Servo Motor Power: Ensure the servo motor is getting sufficient power to operate.
3. Connections: Double-check all connections to ensure there are no loose wires.
This setup creates a basic smart dustbin that automatically opens and closes the lid based on
the proximity of an object. You can further enhance it by adding more features such as an
indicator light or an alert system.

You might also like