loading

Arduino Controlled Can Crusher With LCD Readout.

FeaturedContest WinnerContest Winner
Picture of Arduino Controlled Can Crusher With LCD Readout.
I have always wanted to do an instructable, but I never had a somewhat original idea that hasn't been done a million times, or something that had no means of building. I have some friends who recycle aluminum for money and after seeing the large bags of an unknown amount and weight of uncrushed cans, I decided to make a machine that would crush the cans, count the cans, and tell the weight of the number of cans that it has crushed. I searched the internet and have found no machines that count the cans that have been crushed or tells the weight of the total crushed weight and could also be made from low cost and recycled materials. 

Once I knew that this was a one of a kind idea, I drew up a rough plan on google sketchup to act as a starting schematic. I wanted to build the main chasis out of wood using mostly handtools so anyone could build one without a wood shop. The actuator (the crushing part) is driven by a old windshield wiper motor that my dad had laying arround, attached to two threaded rods by a belt and pulley system.  There was an arduino that was sitting arround the house doing nothing, so there was no question that that would be the brains. 
 
Remove these adsRemove these ads by Signing Up

Step 1: Tools and Parts

Minimum tools required:
Safty goggles
Hearing protection
Hand saw
Drill
Drill bits- 5/8, 1/2, 1/4, 1/8
Cross tip bit or screwdriver.
Hammer
Exacto knive
Vicegrips or adjustable wrench
Soldering Iron
Ruler
Pencil or pen

Materials required:
Plywood
1"x4" board
(2ea) 1ft, 1/2" threaded rods
(2ea) 1/2" couplers (remember to make sure the threading is the same as the rods)
(1ea) 3ft 1/4" smooth rod
(2ea) 1/2"ID 1-1/2" OD pulleys
(25ea) #8 x 1-1/4" Screws
(1ea) 1ft 1/4" threaded rod
(4ea) 1/4" nuts
(2ea) 1/4" ID large OD washers
(2ea) 1/4" lockwashers
(2ea) 1/2" OD washers (ID same as the motor shaft)
1/2" belt (diameter about 20")
Fence pole mount
Plastic clothesline puley 
Soda can box
Epoxy
Arduino
Large 12v motor (power window motor or windshield wiper motor)
Solder
Wire
1602 LCD screen
Project box
1/2" Cable wrap
(2ea) Zipties
(3ea) Limit switches (SPDT submini lever switch)
Protoboard 
Motor controller
Pins


Optional materials:
Sandpaper
Spray paint
 

Step 2: Part 1: Making the puley and mounting it on the motor.

Picture of Part 1: Making the puley and mounting it on the motor.
1302038289252.jpg
IMG_20110409_163250.jpg
The first step is to remove the pulley from the plastic holder on the laundry line pulley; to do this you have to cut the pin holding the pulley. A hacksaw should work but I used a dremmel to cut off the head. Once the pulley is free, use a 1/2" drill bit to create a space for a washer to fit into the puley while leaving enough material to still have strength. Clip off the extra material and sand it down. Mount the pulley on the motor and place the fence pole mount on the base of the motor. 

The motor may have three wires, one is connected to the a switch that changes the direction once the motor rotates so far, you don't want to use that wire to power it. Use one wire from the motor and another connecting the lead to the base of the motor--it should spin continuously (use a bolt on the motor to attach the ground).    

Step 3: Part 2: Building the chasis

The chasis is the "frame" that everything is connected to and operates. 
First you will want to make the crusher, this is done by cutting two short section of a 1"x5" (about 12" each) cutting the 3' smooth rod into 4 equal length pieces. I used junk pieces of wood I found. I used the diameter of a aluminum can to make the square in the middle. The square gives you the width of the final part as well as the the distance between the 4 1/4" smooth rods. Towards the outercenter of the boards the actuators will be mounted. I placed the one of the boards on the other to make the holes in line. Drill out the outer holes (actuator mounting holes) to 5/8" in one board and 1/2". Next, place a 1/2" coupler in the 5/8" from the back, and add some epoxy. The inner four holes should be 1/4" for the rods to be mount into on the board with 1/2" holes on the outside (the other should be slightly larger), this will act as a can retainer/guide. The top and bottom portions of the boards should be trimmed to the diameter of a can.

After the epoxy dries you can now run the 1/2" threaded rods through the boards and install the pulleys on the rods. Now place the belt on the pulleys along with the motor, then measure the distance from the bottom of the board to the top of the pulley, on the motor add about an inch and you have the height of the next board you need to cut for the front wall of the "box" the width is 12". Remove the pulleys from the rods and place the board with the 1/2" holes (the can retainer mount [not the one with the couplers in it]) and use it as a template to make holes in the front wall.  Drill it out to 1/2" using the can retainer mount board as a retainer, remove the template then drill the holes to 5/8" so that the sleeves fit in them. Use some epoxy on the sleeves to keep them in the board. This should be flat on the side that meets the can retainer mount and should stick out on the other side (this will work to reduce friction). You can use this board's width and height for the back wall of the box. 

Align the front wall holes with the holes in the can retainer mount, drill 4 well placed 1/8" holes through the back of the front wall into the can retainer mount and then screw them together using the 1/8" pilot holes. Now install the threaded rods with the pulleys, place this on a piece of plywood, then mount the motor and belt, measure the distance from the front of the can retainer mount to the back of where the motor is plus the thickness of the back wall of the box. This will be used to draw an outline of the back part and to make a bottom for box. The outline should be drawn including the front part of the machine as well. This should look similar to the bottom on image 11 and 12. Now cut a square hole wider than the diameter of a can and length slightly smaller than the diameter of the can. 

Add some supports fot the back and side walls to the bottom as shown in image 14. Now place the motor with the pulley on the belt, pull the belt tight and mark the top of the front board. Measure the distance and now make a 1/4" hole in the back wall so the fence pole connector around the motor will hold the pulley up to the measurement on the back board that was taken from the front board. Use the 1/4" threaded rod, lock washers, large OD washers, and nuts to mount the motor to the back wall. Measure the distance from the front and back wall and make top supports, side walls and top. Also be sure to drill a 1/2" hole in the bottom for the wires.
 

Step 4: Part 3: Programing and circuit design

Picture of Part 3: Programing and circuit design
The Program :

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); // LCD on pins 12, 11, 10, 5, 4, 3, 2.
int StartPin = 9;                          // switch input
int motor1Pin = 7;                         // H-bridge leg 1 (pin 2, 1A)
int motor2Pin = 6;                         // H-bridge leg 2 (pin 7, 2A)
int enablePin = 8;                         // H-bridge enable pin
int DirPin = 13;                           // Motor direction select
int DirSwCounter = 0;
int LastDirState = 15;
int Dir = 14;             
int cansCrushed;                       // Initial number of cans crushed set to 0
void setup()
{
// INITIALIZE
pinMode(StartPin, INPUT);
pinMode(DirPin, INPUT);
pinMode(motor1Pin, OUTPUT);
pinMode(motor2Pin, OUTPUT);
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, LOW);
lcd.begin(16, 2);
lcd.print("Can Crusher MKII");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Crushed:");
lcd.setCursor(10, 0);
lcd.print((int)cansCrushed);
lcd.setCursor(0, 1);
lcd.print("Weight:");
lcd.setCursor(9, 1);
lcd.print((int)cansCrushed*.034375);      
pinMode(StartPin, INPUT);
pinMode(DirPin, INPUT);
pinMode(motor1Pin, OUTPUT);
pinMode(motor2Pin, OUTPUT);
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, LOW);
cansCrushed = 0;
}
void loop()
{
// READ PINS
int DirState = digitalRead(DirPin); 
if (LastDirState == LOW && DirState == HIGH) 
{
DirSwCounter++;
}
LastDirState = DirState;
// PROCESS
if (DirSwCounter % 2 == 0)
{
digitalWrite(Dir, LOW);    
cansCrushed++;
} else {
digitalWrite(Dir, HIGH);
}
if (digitalRead(StartPin) == HIGH && digitalRead(Dir) == LOW)
{
digitalWrite(enablePin, HIGH);
digitalWrite(motor1Pin, HIGH);
digitalWrite(motor2Pin, LOW);
}
else if (digitalRead(StartPin) == HIGH && digitalRead(Dir) == HIGH)
{
digitalWrite(enablePin, HIGH);
digitalWrite(motor1Pin, LOW);
digitalWrite(motor2Pin, HIGH);
} else {
digitalWrite(enablePin, LOW);
}
}


The wiring diagram for the machine is shown below.
For this design I used Fritzing, it is pretty awesome.
http://www.fritzing.org
Build the circuit board from this design, but don't add the switches yet.

Step 5: Part 4: Making a home for the electronics

Picture of Part 4: Making a home for the electronics
1302411754788.jpg
1302411782524.jpg
1302408386972.jpg
1302408394196.jpg
The first thing should be creating a hole for the LCD screen in the project box. This can be done using an exacto knife (time consumming and super accurate) or dremmel (fast and messy) by first making a template of where you want the screen to go. You can make a template by using tape or paper to make an outline of the screen. Cut out the hole and test for fitting. Drill a hole about an inch away from the screen for the potentiometer (the screen contrast control) or just hide it inside the box. Drill a 1/2" hole in the bottom to run the cords out from. Next cut a square hole for the usb port on the Arduino and a round hole for the arduino power.

Place the screen in the hole and add some hotglue or epoxy to make it stay. Run the wires out through the hole and insert the wire wrap into the hole. Grap the piece of metal that came with the project box and bend one edge to make it j-shaped. 
From here on we will call this the control box.

Step 6: Part 5: Sanding and painting the machine

Picture of Part 5: Sanding and painting the machine
IMG_20110410_161040.jpg
IMG_20110413_214840.jpg
IMG_20110413_224237.jpg

If you want to make everything match you will need a can of flat black spray paint and some sand paper. The whole thing needs to be sanded well before you try to paint it. Remember to remove the motor, the threded rods, and cover everything you don't want covered in paint with tape. Now paint away! Once the paint is dry and looks good, remove the tape, replace the motor, and insert the threaded rods. 

Step 7: Part 6: Adding the control box and hopper

Mount the control box on to the j-shaped piece of metal with a screw and then mount the other end of the j to the bottom of the chasis. Run the wire wrap along the bottom and attach the wires from the motor to the wires from the motor controller. Connect the DirPin switches to the wires that correspond to the them and hot glue them to the points where you want them to be triggered (ie: DirPin switches should be at the full open position and the other should be to about 1/2" to 1" from the can ejection hole (square hole in the bottom board). 

Now grab an empty soda box and cut a hole in it so there is a cool looking window; this is now our can hopper. Now take the hopper and a piece of the top or bottom of the 1"x5" boards we made into a crusher and a can retainer mount, and paint them (sanding is not needed for the soda box). Now mount the wood aginst the "box" at a 45 degree angle, so that the box will freely drop a can into the crusher once the last can is gone (the angled board is for spacing). Now mount the can hopper to the angled board on the "box."

A support needs to be made that holds up the hopper and the StartPin switch. This can be made with small scraps of lumber. I made one from a small rectangular piece and a square piece. Cut a slot in it so the switch can fit in it. After you sand it down and paint it insert the switch and use a piece of cardboard to lengthen the switch. This switch extender is made by a rectangular cut of cardboard. Slice the cardboard piece long ways (like a hotdog bun) not all the way through. Fold it in half using the slice and then glue it around the switch. Install the support so the switch will be flipped when a can is in position to fall in the crusher.

Time to wire the switches! Lets start with the DirPin switches, these badboys are wired to act like one switch. Wire the power (5 volts) to a common terminal on the closer switch, then make a jumper from the common pin from that switch to the common pin of the other DirPin switch. Now wire pin13 of the arduino to the normally open teminal of the closer switch, then like the power terminals, jumper the normaly closed terminals together. Now you are almost ready to try it out.

Step 8: Part 7: Attaching an external power supply and finnishing up

Picture of Part 7: Attaching an external power supply and finnishing up
IMG_20110423_203026.jpg
Find an old 12v power supply that meets the needs of the motor and doesn't exceed the limits of the motor controller, and wire the positive to pin 16 of the motor controller and the negative to pin 4, 5, 12, or 13 of the motor controller. The Wire should be fed through the wire wrap and into the control box. 

Step 9: Bonus points!

Keep all of your receipts and calculate how much it costed to build this machine. Call the local recycling center and get the price of aluminum, then:

 
1) Add code to the program that will tell you how many cans you are away from paying for the parts. 
  
2) Add code that will tell you how many cans away from buying solar panels to power the machine you are.

3) Add code that will tell you how many can you are away from paying for more soda.

4) See how many people will start to recycle (or give away cans) just to see the machine work.

5) Share photos of your can crusher in the comments.

6) Make a mount to hang it above a large trash can or make a tall stand.
  
7) Add speakers and a light that playes Iron Man while you crush cans.

Step 10: Build Improvements

I had some ideas after building this that can improve performance and building time:
1. Use a heavy duty motor controller.
2. Use a big metal pulley on the motor to keep the belt from slipping.
3. If your wire is too big for the holes in the LCD board, solder them to the pads, not through the holes (I tried to trim the wires down to do inside the hole and they broke easily).
4. Take everything apart before drilling into something.
5. Always make pilot holes.
6. Use some old Powerwheels motors along with relays to control the direction instead of the motor controller.
7. Use a chain and sprockets instead of a belt and pulleys.

Step 11: Thanks:

I wanted to dedicate a part to thanking those who helped me along the way:
My dad for the parts, Dr. Manning for looking at my code and addon ideas, Brandi for not killing me, robtillaart and AWOL from the arduino forum for helping me get the code working, my brother for giving me input, and anyone who builds one of these machines.
1-40 of 45Next »
max_barton5 months ago

hello im working on putting together the circuit. what kind of motor controller and and stdp switch did you use?

I've skimmed through all the pages and I still have no idea what the basic operation of this device is. A diagram of how it works (mechanically) would improve the presentation and usefulness. I'm not going to spend an hour reading the whole thing and squinting at the dark photos to see if this is worth pursuing.

tjdux made it!10 months ago

Seriously great instructible. One of many that I have been using to help kick start my way into arduino. I actually found this via google search when trying to find DIY can crusher plans. My can crusher is much humbler design. In fact its as simple as a "Machine" can be. Almost a polar opposite that is means to the same end, but a remix is a remix.

_MG_1109.JPG
MRHint (author)  tjdux10 months ago
Thank you so much. My design was a bit too much in many people's eyes, because it used too much energy to crush cans. I think one could come up with a design that could use a tiny motor to crush the cans and get away from the clunky windshield wiper motor. I used a lot of crap that that was garbage to build it. It was surprising that it came out at all due to the lack of time, good parts, planning, and knowledge used to build it.
abbat20093 years ago
Im technician new to this (using Arduino), and trying to do the same thing as you im good electronically, and mechanically but not with programming this is way new to me I can get some examples uploaded in sketch but not yours do you have any hints, im getting allot of compiling errors.

when im done ill post mine with my schematic

thanks in advance.
danilo-dude3 years ago
Hey dude! I would like to ask you if you could put up a video on how this works if you don't mind :3

Also, I am a beginner with Arduinos, so I am not sure what to do and how to wire all that up... Is there a possibility to make the crusher without the LCD screen and to make the crusher just crush when I turn it on (with an optional switch)... Thank you very much in advance! =D
MRHint (author)  danilo-dude3 years ago
You could simplify this to a battery, a switch, and a motor. But it makes it so much easier to go without the screen. To do what you want to do, you will need a motor controller to go with the arduino so you can control the direction of the motor. If I were to redo this machine, I would use gears instead of a belt (it slips too much). I took the machine apart and threw most of it away. I am going to use the motor and arduino for a plastic recycler, but I can walk you through it.
choo_tan4 years ago
hi i would like to know is there any motor that can crusher 5tins at once?
MRHint (author)  choo_tan4 years ago
Thanks for the question, I wish I knew what you were asking. You could crush 5 cans at once but it would be better if it was chain driven instead of belt. the crushing part would have to be wider.
HECTOR_1344 years ago
Great idea and instructable. How do you get the weight of the crushed cans?
MRHint (author)  HECTOR_1344 years ago
The weight of the crushed is number of crushed cans multiplied by the weight of one aluminum can. Thanks for the commment.
redhotmama4 years ago
How cool! I was so pleased to see you included safety goggles :)
One question- what is arduino?
Way to go!
Love
Your cousins in Alabama
MRHint (author)  redhotmama4 years ago
An arduino is a micro-controller, which serves as the "brains" which controls the electronics--giving the machine instructions what to do when an event happens.
jabujavi4 years ago
WOW!!
A video?
mhinton4 years ago
Awesome idea! Good luck with the votes!!
MRHint (author)  mhinton4 years ago
Thanks!
immom4 years ago
Great idea! You get my vote!
MRHint (author)  immom4 years ago
Thanks for the vote and the comment!
woody1234 years ago
its so cool how it has a "magazine" of cans. great instructable!
i hope you dont mind me asking but are you using Circuit Wizard? (first pic - step 4)
MRHint (author)  woody1234 years ago
It is made by a program called fritzing, which can be found at fritzing.org. Thanks for the comment.
traxman664 years ago
I love 3, 4, and 7.
XD...
Great project!!!
MRHint (author)  traxman664 years ago
Thanks!
zack2474 years ago
wow now that is really cool!

you should record a video of it in action, it must be awesome :D
MRHint (author)  zack2474 years ago
Thanks!
Andsetinn4 years ago
A windshield wiper motor is usually a single direction motor. It's the lever on the gearbox, that you replaced with a pulley, that makes the wipers go back and forth as it turns in a circle. (It is a DC motor and they usually turn in the opposite direction if you switch plus and minus but the gearbox is often designed for force in one direction only)
If it's a front windshield wiper motor, it usually has wire for high speed, low speed and power, the ground sometimes does not have a wire.
The gearbox has a built in switch that stops the motor in certain position (so the wipers don't stop in the middle of the windshield).
If you connect 12 V to the power wire and the motor to the ground it doesn't turn, or only turns part of a circle and then stops. If you then momentarily connect 12 V to high or low speed wires the motor will start turning, but not stop until the circle has been completed. If you disconnect the power wire then the motor will start and stop as soon as you connect and disconnect 12 V to high or low speed wires.
MRHint (author)  Andsetinn4 years ago
Thanks for the comment.

But to clear things up, I should have included the wiring of the windshield wiper motor. I attached a wire from the frame of the motor and the wire that goes to direcly to the motor, bypassing the little switch that changes the direction.

I didn't like the results with the wind shield wiper motor, it isn't too fast (I know other motors could have much better results, but that's all I had to work with). The lever arm was taken off of the motor before I got it. I believe there is a picture of it in the Instuctable showing what the motor looked like.

It is an old model of a winshield wiper motor, I think from a GM based RV.
bobcat20104 years ago
I think this is a great idea, think i might just try this one but my question is, what exactly is an arduino?
MRHint (author)  bobcat20104 years ago
Thanks! An arduino is an open-source development platform (basicly a easy to use microcontroller).
Including a video of it in action would change this instructable from an A to an A+. Nonetheless, it is still remarkable. Great job.
MRHint (author)  tofu4tortoise4 years ago
Thanks!
eyebot1174 years ago
What rate can it mash the cans? I use a lever crusher and it's pretty quick, but it wears you out. I'd like to try an automated method like this, but I would want it to be able to mash the cans fairly fast as they accumulate by the bucketful around our house! Very cool project.
MRHint (author)  eyebot1174 years ago
Thanks for the comment!
The rate depends on the speed of the motor you use. I used an old windshield wiper motor-- It is a little too slow. I believe if you use a motor from a "powerwheels" you should be able to crush them fast.
Electric wheel chairs bought for Medicare patients are NOT RESELL-ABLE so If you ask nice the repair guy at your local hospital, nursing home, etc who has to PAY to discard them will probably give them to you free or sell them as "parts". They have an electro-magnetic brake that either needs to be removed or tripped with at least 12v and the motors are 24v and POWERFUL even when run at 12V. I built a remote control lawnmower that can't be stopped and seen the motors used to tow aircraft and cars around. I am a Biomedical Electronics Tech and have considered selling a few of my wheel chair motors so if your interested let me know. I have 10 or so different motors.
No kidding? Cool! I need to look into that! Personally I would use a pneumatic press to mash my cans. Using a pneumatic press, a solenoid valve, an arduino, a pressure tank, and a compressor, as well as some other parts, chutes, and electronic components, I'm sure it would be possible to make a pneumatic variation of a can mashing machine. I do however have in my possession a treadmill motor that I intended to use for a wind turbine, but I like this method better. Besides, my turbine blades were too heavy for the wind to spin anyways!
MRHint (author)  eyebot1174 years ago
That would be awesome! I would love to see a variation like that.
ilpug4 years ago
original idea, but how does it crush cans exactly?
MRHint (author)  ilpug4 years ago
There are 2 threaded rods that are connected to pulleys on one end and threaded couplers on the another which are mounted to a board. When the moter moves the belt, the pulles turn the threaded rods which pull the crusher closer. It works just like a cnc linear actuator, or a scissor jack.
ilpug MRHint4 years ago
very nice. thanks for the explanation. hope to see more from you.
jakdedert4 years ago
I like the idea, and you've apparently implemented it successfully. However, from looking at the pix, I can't seem to get my head around the actual mechanism you've built. Rather than answering a bunch of questions from me; perhaps it would help if you added a video of the device in operation. A flow diagram of the progress of the can through the machine might suffice.

The automation is likewise quite ingenious, but I could see a lot more people (myself included) building this a manually-operated device, with a simple switch to initiate the cycle, and perhaps a limit-switch to stop it. Automation could be added later if desired..

MRHint (author)  jakdedert4 years ago
Thanks for the comment! I wish I had time to make a video, but the end of the semester is on its way--and I have too many tests...

It crushes cans using the force created by the linear actuators (threaded rod moving the crusher).

A simple circuit could be made using the same setup with a SPDT switch connected to a DPDT relay which controls the direction of electricity going into the machine. the limit switches can still be used to create an open so that the machine doesn't go too far in or out.
1-40 of 45Next »