Servo Motor
A servo motor is an important component of the Smart Dustbin Robot because it is responsible for automatically opening and closing the dustbin lid. Unlike a normal DC motor, a servo motor can rotate to a specific angle, making it suitable for controlling the lid accurately. A small SG90 servo motor is commonly suitable for a lightweight plastic dustbin lid.

The servo motor generally has three wires: VCC, GND, and Signal. VCC is connected to the appropriate power supply, GND is connected to the common ground, and the Signal wire is connected to a PWM-capable digital pin of the Arduino Uno. The Arduino sends control signals to position the servo at a desired angle, such as 0° for the closed position and 90° for the open position.
In the Smart Dustbin Robot, the Arduino receives information from the HC-SR04 ultrasonic sensor and activates the servo when a hand is detected near the dustbin. The servo rotates and lifts the lid, waits for a short period, and then returns to its original position to close the lid. This demonstrates how sensors, microcontrollers, and actuators can work together to create a practical automatic system.