Some weeks ago, I was looking for interesting Arduino projects to build, and I found out some people who made a trash bin using the ultrasonic sensor.
I thought
it was worth getting into, so I decided to build a trash bin using cardboard. You can see the final result in the video below.
You can also check the photos right here:
Arduino is great for DIY robotics and automation. But just plugging things on a breadboard can be boring sometimes. The cool part is putting everything inside a box, so people can use your invention.
However, many creators don't have a 3D printer or can't afford a 3D print service. That's why using cardboard becomes an option.
Got interesting in this project? Now I'm going to teach you how to do it.
Step 1I used ordinary cardboard because I wanted the project to be as cheap as possible. I got it in a local store. I just went there, asked for it, and they gave me the cardboard for free. You can use any cardboard you want. Just make sure it's not too thin or thick.
Then I drew six rectangles on the cardboard, and their dimensions are:
- 20 cm x 18 cm (7.87 in x 7.08 in) - it's the right and left side of the bin;
- 15 cm x 18 cm (5.90 in x 7.08 in) - it's the front and backside of the box;
- 15 cm x 20 cm (5.90 in x 7.87 in) - it's the up and downside of the trash bin.
Now that you have all rectangles, glue them (except for the upside) by using hot glue.
Our bin is almost done.
Step 2Draw 6 squares on the cardboard, and each one should be 3 cm x 3 cm (1.18 in x 1.18 in). Then use hot glue to form 2 groups of 3 squares.
Now use a barbecue stick to make a hole in these piles. The hole must be 1 cm from the top line (0.39 in) and 0.5 cm from the left line (0.20 in).
Use hot glue to fasten the squares on the top backside of the box.
Cut 2 rectangles of 13 cm x 2.5 cm (5.11 in x 0.98 in) and use hot glue to fasten only one border (the large one). Fit this structure on the lid and add hot glue. The big border sides are glued, and there's empty space between them.
Make a little box to store the servo motor like the one below. This box is 7 cm x 3 cm x 4 cm (2.75 in x 1.18 in x 1.57 in) and was designed for the SG90 servo motor. If you use a different servo, you may change the dimension.
This time you must make another little box to keep the ultrasonic sensor in the front side of the bin. This box is similar to the last one, but its size is 7 cm x 4 cm x 2 cm (2.75 in x 1.57 in x 0.79 in).
Now it's time to finish the lid.
Step 4Use a barbecue stick to fix the lid on the box. Make sure it can move smoothly. You can also add some sticks on the lid to make it go down faster.
Glue the servo on its box. Pick a stick 13 cm (5.11 in) long and glue it in the servo. Fasten the servo box on top backside of the trash bin.
If you came this far, congratualations, you have learned how to make a bin from cardboard. Now it's time to connect the Arduino and upload the code.
For this project I connect the sensor supply to 5V pin and the servo supply in the 3.3V pin. The trigger and echo sensor pins are connected to Arduino digital ports 8 and 9. The servo pin is connected to the digital port 7.
Now upload the code below and have fun!
Comments