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 27, 2022

1464 views

2 respects

Components and supplies

1

Arduino UNO

1

SG90 Micro-servo motor

1

Jumper wires (generic)

1

Ultrasonic Sensor - HC-SR04 (Generic)

Tools and machines

1

Barbecue skewers

1

Hot glue gun (generic)

1

Cardboard

1

Scissor, Electrician

Project description

Code

Trash bin code

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

lucas_fernando_maker

0 Followers

0 Projects

2

0