Introduction: 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.
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.
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
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
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
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
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.

Finalist in the
MakerBot Challenge

First Prize in the
Spring Cleaning Contest
1 Person Made This Project!
- tjdux made it!
40 Comments
8 years ago on Introduction
hello im working on putting together the circuit. what kind of motor controller and and stdp switch did you use?
8 years ago on Step 9
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.
10 years ago on Introduction
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.
11 years ago on Introduction
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.
11 years ago on Introduction
hi i would like to know is there any motor that can crusher 5tins at once?
Reply 11 years ago on Introduction
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.
11 years ago on Introduction
Great idea and instructable. How do you get the weight of the crushed cans?
Reply 11 years ago on Introduction
The weight of the crushed is number of crushed cans multiplied by the weight of one aluminum can. Thanks for the commment.
11 years ago on Introduction
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
Reply 11 years ago on Introduction
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.
11 years ago on Introduction
WOW!!
A video?
11 years ago on Introduction
Awesome idea! Good luck with the votes!!
Reply 11 years ago on Introduction
Thanks!
11 years ago on Introduction
Great idea! You get my vote!
Reply 11 years ago on Introduction
Thanks for the vote and the comment!
11 years ago on Step 9
I love 3, 4, and 7.
XD...
Great project!!!
Reply 11 years ago on Introduction
Thanks!
11 years ago on Introduction
wow now that is really cool!
you should record a video of it in action, it must be awesome :D
Reply 11 years ago on Introduction
Thanks!
11 years ago on Step 2
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.