The Trash Can Project

Over the past two weeks, I have built a robot that will potentially take your trash can to the road everyweek, so you don’t have to. Here is how i did it, the idea, and how you can do it too!

The materials

First things first you will need a few things to start here is the list: - motordriver - dc geared motor x2 - arduino nano or micro - acryllic sheet 1/4 in - laser cutter - fusion 360 - arduino ide desktop - ultrasonic sonar sensor - sautering iron - fan these supplies are necessary and shouldnt cost more than 30 dollars!

The Hardware Assembled

fritzing Here is the hardware diagram and how you should connect and wire your bot. I highle recommend trial and error as a process for getting your exact digram right.

The software

For software here is the code is used:

int servoPin = 5; #define trigPin 3 #define echoPin 2 int LightPin = 0; int threshold = 980; unsigned long previousMillis = 0; const long interval = 1000; int ledState = LOW; int n; long duration, distance; String readString; void setup() { Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(9, OUTPUT); pinMode(6, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); } void loop() { Serial.println(analogRead(LightPin)); digitalWrite(trigPin, HIGH); _delay_ms(500); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration / 2) / 29.1; if (distance < 70) { digitalWrite(9, LOW);//blue2 digitalWrite(6, LOW);//grey-4 digitalWrite(8, HIGH);//purple3 digitalWrite(7, HIGH);//green-1 delay(1000); digitalWrite(9, LOW); digitalWrite(6, HIGH); digitalWrite(8, LOW); digitalWrite(7, HIGH); delay(4000); digitalWrite(9, HIGH); digitalWrite(6, HIGH); digitalWrite(8, LOW); digitalWrite(7, LOW); delay(1000); } else { digitalWrite(9, LOW); digitalWrite(6, HIGH); digitalWrite(8, LOW); digitalWrite(7, HIGH); } }

The code shown is a very simple program that will make the sonar sensor sense continuously and when it senses objects within 70 mm it will turn go forward and turn back and go forward onto the original path.

The created hardware

In order to create the frame and wheels of the robot you will have to use fusion 360 i have attached the files below.

the wheel mold the frame

The wheels are actually almost entirely silicon. The only piece not made of silicon is the core. Make these wheels you will have to 3d print the silicon wheel mold (print two because you will have to destroy them to remove the wheels) and the core. After printing place the core around the molded spindle and SLOWLY pour a silicon mix into the mold.

Next, you will have to lasercut the frame out of acrylic! Power settings on your laser cutter will likely have to be changed so I recommend looking up suggested power settigns specifically for your laser cutter. Just do it. final final

Mistakes have been made. Originally, my wheel design was far to complex, making it impossible to remove the silicon from the mold. Secondly, the original design didnt have a core for the wheel. THis resulted in the wheel only turning when grip on the flat part of the silicon was recognized. Additionally, the original design has a hole cutout for the swivel wheel that was far too big for the swivel wheel axle.

For the Future

In advance a few things could be added to the design of this project. First, i would like to add my own octogon trash can made of aluminum to the top and add and area for a battery pack. Also, I would add back my pressure sensor from input devices week. GO check it out!

input devices