Smart Dustbin using Arduino

Today I am going to describe how to make a Smart dustbin using Arduino UNO ( with Arduino code & video tutorial)

working principle

when your hand is near ultrasonic sensor then the servo motor rotates for 90 degrees & pull the dustbin’s cardboard cover & after few seconds servo rotates to 0 degrees & the dustbin become closed.

You need to make :

  1. Arduino Uno
  2. Ultrasonic Sensor HC-SR04
  3. 9G Servo Motor
  4. Cardboard
  5. Jumper wire
  6. A plastic Dustbin
  7. 9 Volt battery or power bank
  8. Arduino Code

The complete making process is in this video

video tutorial of smart dustbin

Connections :

  • Connect HC-SR04 Trig pin to Arduino D5 pin
  • Connect HC-SR04 Echo pin to Arduino D6 pin
  • HC-SR04 VCC to Arduino 5 volt
  • HC -SR04 GND to Arduino GND
  • Connect Servo motor signal pin to Arduino D7 pin
  • Servo motor VCC to Arduino 3.3 volt pin
  • Servo motor Gnd to Arduino gnd pin
  • For the power supply, you can use 9Volt battery or power bank
Connection diagram of Smart dustbin

For upload Code to Arduino Uno Please install & open Arduino IDE software

Select board Arduino UNO, select com port where Arduino is connected

creat a .ino new file & save it then delete all existing from new .ino file & Download the code txt file from here, copy all from downloaded, txt file & past it in new .ino file.

Upload the code to Arduino

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *