Auto-Opening Trashcan

by c303g827 in Circuits > Arduino

31 Views, 1 Favorites, 0 Comments

Auto-Opening Trashcan

IMG_2545.jpeg

Our group decided to create an automated trashcan. The opening of the lid is triggered using an ultrasonic sensor to detect an object approaching. When the object comes within the threshold distance it causes the servos to open the lid.

Supplies

UPDATED parts list.png

The Sparkfun Kit includes the breadboard, Arduino, servo motors, wires, and an ultrasonic sensor.

Wire Arduino

board 2.png
  1. Get out an Arduino breadboard, Arduino Uno, 2 servo motors, ultrasonic sensor, and 13 wires.
  2. Wire the Arduino Uno and the breadboard together by connecting the "GND" and "5V" to the "-" and "+" respectively.
  3. Wire the signal pin on each servo motor to pin 9.
  4. Wire both servos to the ground and voltage on the breadboard.
  5. For the ultrasonic sensor wire the trigpin to pin 5 and the echopin to pin 4.
  6. For the ultrasonic sensor wire the ground and power to the breadboard.

Physical Construction

When constructing the physical trashcan we cut out two 6''x10'' pieces of cardboard and then two 8''x10'' pieces along with another two 6''x8'' pieces of cardboard. After cutting out all the pieces of cardboard we connected them together to create a rectangular box. Once creating the main box, we created a small compartment area to but our Arduino board. This was created using two 1.5''x6.5'' pieces of cardboard and 5''x6.5'' piece of cardboard and taped to the back of the box.

Code

Download this code and open it in Arduino. Upload the code to the circuit board using a USB cable. Then, connect a battery pack to circuit board.

Downloads