Smart Dustbin using Arduino and Ultrasonic Sensor

While we power Arduino through a USB port, it bypasses the voltage regulator present on the Arduino Uno R4 Wi-Fi board, so we can consume current up to 2 mA from the 5V pin, which is enough for driving all these things. In the below image, you can see that I am using a 5V water pump motor and a single-channel 5V relay module, which has 3 pins on the input side and 3 pins on the output side. On the input side, it has three pins, namely VCC, GND, and Signal (IN) pin. We can control the relay output using a signal pin by providing either 0V or 5V.

Interfacing relay module with Arduino

On the other hand, it has three output pins, namely Normally Open (NO), Normally Closed (NC), and Common (COM). But here we use only two relay output pins NO and COM pin for controlling the water pump motor. We utilize the Normally Open pin to make the motor off if the Signal pin is low and vice versa.