Smart Garbage Can With a Car

by Hsing Yi Chen in Circuits > Arduino

1280 Views, 0 Favorites, 0 Comments

Smart Garbage Can With a Car

Arduino - Smart Garbage Can with a Car
IMG_3809.jpg

This is a smart garbage can with an ultrasonic sensor, a car, and a button, so moves forward when you press it. This project is inspired by https://www.instructables.com/id/DIY-Smart-Dustbin-With-Arduino/

Here are a few parts I made changes:

  • 4 wheels and motor are added
    • When the garbage can is far from you and you want to throw trash, you can activate its wheel without walking over.
  • Mobile charger instead of a battery
    • A mobile charger is more environmentally friendly, and it's easier to control on/off
  • Button added on the car
    • The button allows the car to move forward when you press it, otherwise, the car won't move.

Supplies

For Garbage Can:

  • Arduino Leonardo/ Uno
  • A garbage can
  • Servo motor
  • Ultrasonic sensor

For the Car:

  • 4 Motor 3-12VDC (2 Flats Shaft)
  • LM298 H bridge Module
  • Mobile charger
  • Button
  • 8 Crocodile clips
  • Resistor (for buttons)
  • 4 wheels

Cut Holes in the Garbage Can & Place the Ultra Sensor and Servo Motor

h34ED.jpeg
  1. Poke two holes of the size of the ultrasonic sensor, and one hole at the bottom for wires to go through.
  2. Place the ultrasonic sensor in the holes.
  3. Stick the servo motor on the opposite side as shown in the picture.
  4. Attack a stick or straw on the servo motor so it pushes open the garbage can as shown above.

Place the Motor on the Board

IMG_3797.jpg

I used crocodile clips instead of welding, both work fine.

Wire

Screen Shot 2020-04-18 at 18.45.28.png
Screen Shot 2020-04-18 at 18.57.57.png
IMG_3800.jpg
IMG_3801.jpg
IMG_3796.jpg

The first image is for the car, and the second image is for the garbage can.

(Both Arduino Leonardo and Uno board can be used)

Code

Link to the code for Garbage Can: https://create.arduino.cc/editor/hsingyi_chen/60cc8031-2083-4ced-8d83-09b9ab1bed5a/preview

Link to the code for the Car: https://create.arduino.cc/editor/hsingyi_chen/66987130-0590-4fe4-a7ad-cdc051651821/preview

(Make any changes you'd like, such as distance or angle)

Wrap Up & Let It Work!

IMG_3812.jpeg
IMG_3802.jpg

Cover the wires with plastic board or paper board!

How does this work?

  1. Plug the USB cable to your computer
  2. Turn on the mobile charger
  3. Press the button to move the car forward, and stop by letting go the button
  4. Put your hand near the ultrasonic sensor
  5. The garbage can will open automatically!