Elegoo Arduino Uno R3 – Motion Sensor Trash Can Project

Elegoo Arduino Uno R3 - Motion Sensor Trash Can Project

In this article, you’ll learn how to build a motion sensor trash can using the Elegoo Arduino Uno R3. This trash can will be able to open when your hand moves in front of it, allowing you to through away trash without touching the bin.

Items you’ll need include:
– Elegoo Arduino Uno R3 kit and software
– A container or cardboard box
– A popsicle stick
– Tape
– Any adhesive(make sure you can remove if you want to use the hardware again)
1) Before doing anything, you’ll need to set-up the technical hardware and programming that will be powering the trash can. Please follow the image above and place the wires in the correct spots. The image includes the main computer board, the servo motor, the motion sensor, and several wires. All of these items are included in the Elegoo kit. Note: when using the servo motor please screw on the lever piece to the rest of the part.
2) Connect the computer board to your computer through the given USB cord, bring up the Arduino software, and copy the below code into a new program. Save the code and test run it by clicking the checkmark and arrow at the top of the page. The servo motor should move whenever you display motion over the motion sensor.

3) Now that the programming is done, we can build the trash can set-up. Take a box and cut one face open. Next, using tape, attach that face back to the box but only sticking one edge of the face so that is loosely attached and can be easily moved and opened. Then, using the adhesive, attach the stick to the servo motor lever piece. This will be used to extend the reach of the servo motor so that when it moves upwards it will lift the trash can lid along with it.
4) Stick the Elegoo hardware into the trash can and position it so that when the lever moves the lid moves as well.

Well, there you have it, folks! When you move your hand over the trash can, the lid moves to open for you. A simple project you can do and show off to your friends. If you did not understand these instructions, please refer to the above video, which presents a different way to make this project, or one of the links below.

Related Articles and Websites: