How To Make An Automatic Trash Bin Using Cardboard

Learn how to build an automatic trash bin using the ultrasonic sensor, a servo motor, and cardboard.

May 26, 2022

1815 views

1 respects

Components and supplies

1

SG90 Micro-servo motor

1

Arduino UNO

1

Jumper wires (generic)

1

Ultrasonic Sensor - HC-SR04 (Generic)

1

Cardboard

Tools and machines

1

Scissor, Electrician

1

Barbecue stick

1

Hot glue gun (generic)

Project description

Code

Trash bin

arduino

This is the code I wrote for this project. You need to install the Servo library if you don't have it on your Arduino IDE. Modify the openCloseDelay value to make the lid open and close faster or slower.

Downloadable files

Trash bin schematics

The sensor is supplied by 5V and the servo is connected to 3.3V pin.

Trash bin schematics

Trash bin schematics

The sensor is supplied by 5V and the servo is connected to 3.3V pin.

Trash bin schematics

Comments

Only logged in users can leave comments