EARTH SAVER: Autonomous Material Sorter





Introduction: EARTH SAVER: Autonomous Material Sorter

This Arduino project was part of an Association of Mechanical Engineers (ASME) contest to create an Autonomous Material Sorter. The sorter was to sort four glass bottles, four plastic bottles, four Tin cans, and four Aluminum cans. There were requirements such as size of the bottles and size of the machine. The machine had to be able to sort the bottles and cans automatically after being started and had to run off of a dry-cell rechargeable battery. The full machine requirements can be read in the PDF file 'ASME'.

About the video:
The problem in the competition was not the machine, it was the hopper.  Most of the time was spent building the machine and little time was devoted to the hopper. The hopper was the part that all 12 bottles/cans were poured into before the machine was turned on. The hopper was supposed to feed 1 bottle/can at a time to the machine. The hopper for this machine was just a slide.  The first bottle/can on the slide would rest on the edge of the conveyor and then the rest would stack up behind it.  When the bottles/cans were poured onto it, the weight of all the bottles/cans collapsed and many fell into the machine at once.  This is where you can hear the crowd let out a big "OOHHHH".  Nobody was allowed to touch anything once pouring began so there was nothing that could be done except start the machine.

I turned the machine on to see what the machine would do. There were still bottles/cans on the slide at this time so when the conveyor started, it rolled down the conveyor and fell on top of the others that had already fallen into the machine.  It wasn't Tin so it didn't pull the magnet up.  Since there were at least 3 or 4 bottles/cans between the plates in the second testing area, it didn't close the conductivity test, and, since there were bottles/cans stacked up in front of the ultrasonic sensor, the machine thought it was short, so it thought glass. The ramp underneath turned to the glass bin, but when the trap door tried to open, the weight of all the bottles/cans maxed out the motor and it didn't open far enough to allow the bottles to fall out.

The Arduino was set to leave the trap door open a few seconds to allow the bottle/can to fall out and slide down the ramp and then close back.  The ramp returned to its starting position and then the door closed.  The Arduino started the process over again, and started the conveyor.  This time when the next bottle/can fell off of the conveyor, there were so many bottles/cans between the plates, that motor couldn't put enough pressure to activate the switch behind the hinged plate so the motor just kept running.  At the end you can hear the motor running when it was decided to shut the machine off.

The machine actually worked like it should have based on the conditions the sensors were given.  The part that failed was the hopper which had nothing to do with the electronics of the machine.  Before the competition the machine was test by placing one bottle/can on the conveyor at a time and everything worked perfectly.

Step 1: Collect Materials

x2 Hinges
x3 Limit Switches
x4 DC Motors
Angled Aluminum
Conveyor Tracks
Electrical Wire
Gear Boxes for motors
PVC Pipe
Screws and Nuts
Threaded Rod
Ultrasonic Sensor
Arduino Motor Shield
Other metal pieces and miscellaneous parts

Step 2: Identify Methods of Sorting

The first step is to find ways to identify each type of bottle and can.

Since the Tin can is the only container that is ferrous, a method to test if a material is magnetic will be developed.

Now that the Tin can now be identified, the Aluminum can is the only remaining material that will conduct electricity. A method to test for conductivity will be developed.

The remaining two materials can be sorted by measuring their lengths. In the contest rules, the size of each bottle/can to be sorted is given. The biggest glass bottle is smaller than the smallest plastic bottle. This leaves a gap between the two materials' lengths. A method to test the lengths of the bottles will be developed.

Magnetic Test: The method to identify the Tin can is to use a magnet switch. A magnet is placed onto a hinging metal bar that is resting on another piece of metal. When a tin can is past over the magnet, the magnet is attracted to the can, which pulls apart the metal pieces. The metal pieces act as a switch. When the magnet is attracted to the can, it opens the switch.

Conductivity Test: The method to identify the Aluminum can is to use a conductivity test. Two metal plates are placed on each side of the can. One of the plates will move and contact one side of the can and then push it into the other plate. The two plates will also act like a switch. When the Aluminum can comes into contact with both plates, the switch will close.

Length Test: The method to differentiate between the glass and plastic bottles is to use a length test. The two metal plates used in the conductivity test can be used in this test. When they touch each end of the glass or plastic bottle, the conductivity switch will be open, but the distance between the two plates is the length of the bottle. An ultrasonic sensor can be used to measure the distance between the two plates. If the length is within the smaller bottle size range, it is glass. If it is within the larger range, it is plastic.

Step 3: Build Machine Frame and First Testing Area

A frame is built to the dimensions outlined in the contest rules. The frame can be constructed using angled Aluminum. Using the top few inches of the frame, a conveyor will be used to supply the bottle/can to the machine. A motor is set up to turn a PVC pipe. Two rubber tracks are stretched between the turning PVC pipe and another smaller, free-rotating PVC pipe. The magnet test is placed in between the two rubber tracks. Two wires are wired to the magnet switch to supply the electricity. It is important that both sides of the magnet switch are insulated from each other and from the rest of the frame.

As the bottle/can moves along the conveyor it will fall of the end. A limit switch is attached at the end of the conveyor to signal to the Arduino when the bottle/can falls off the conveyor. This will also signal the Arduino to stop the conveyor.

Step 4: Build Second Testing Area

Under the first testing area and about six inches from the bottom of the frame will be the second testing area. When the bottle falls off of the conveyor, it will fall in this area. To create a moving plate for the conductivity test, a motor is attached to a threaded rod. A hole is drilled through the moving plate and a nut is attached around the hole. The plate will have constraints on each side to prevent it from rotating, so when the motor turns the rod, it will move the plate in and out. When the bottle/can falls off of the conveyor and hits the limit switch beneath the conveyor the conveyor is stopped and the motor to move the plate is started.

Another plate is attached on the other side of the frame, opposite of the moving plate. This plate is attached with hinges at the top of the plate. A limit switch is placed behind this plate. When the bottle/can is pushed into this plate, it will pivot and push the switch, signaling the Arduino that the bottle is touching both plates and to stop the motor. A wire is attached to each plate to create the conductivity switch. An ultrasonic sensor is also attached to the pivoting plate. It will send a signal that will bounce off of the other plate, measuring the length of the bottle/can between the plates.

When these tests are completed, the moving plate will be moved back out to its original position. Another limit switch is placed at this position to signal when the plate has returned and to stop the motor. At this point the Arduino will know if the bottle/can is glass, plastic, Aluminum, or Tin.

Step 5: Sorting Ramp

Underneath the second testing area, a ramp is built to sort the bottle/can. Each side of the machine represents one of the bottles/cans and a bin is placed on each side to collect each bottle/can. When the Arduino identifies what material the bottle/can is, the ramp will rotate to the side that represents that material. A motor is attached to the bottom of the ramp to turn it. The Arduino will run the motor for a given number of seconds to turn it to the right spot. Since this method isn't very accurate, the ramp will eventually begin to stop at places it should not. To prevent this from happening, the ramp will have a starting position that it will return to after each time a bottle/can is sorted. A stopper will be placed in this spot so when the ramp returns it will always start in the same position.

To get the bottle/can to the ramp, the bottom plate (blue plate) in the second testing area is actually a trap door. When the ramp is in the correct position, a motor will rotate the trap door out of the way, causing the bottle/can to fall down and hit the ramp, diverting it to the correct side of the machine and into its bin.

When the bottle falls into its bin, the trap door closes, the ramp returns to the starting position, and the machine starts over by running the conveyor.

Step 6: Wiring and Programing

At this point, everything is in place to sort each material. Wire all sensors, motors, and wires into the Arduino. Attach the battery to the Arduino with an On/Off switch in line.  Then send the sketch to the Arduino and begin sorting. The attached Arduino sketch was not the final sketch used in the competition, but was an earlier version of the final version.



    • Water Contest

      Water Contest
    • Oil Contest

      Oil Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    17 Discussions


    1 year ago

    Hey, i just wanna ask, how long did it take for you to accomplish this project? We're having our thesis this year and me and my groupmates are planning to create a similar machine with other features but we only have limited time to do it, i wanna know if possibly we can make these and still add the features we are thinking in time. I hope you can reply soon. :)

    Sorry for the late comment but if this helps I know that all plastic PET bottles from the small 300ml ones to the big 3L ones are all made from the same plastic plug and therefore weigh the same except for the extra weight of the label on the larger bottle which should be negligible.

    I had an idea you could of had a magnetic switch detector so if it was aluminum or tin it would activate a switch and tell the ardunio . you could of also had a part with 2 metal probes and check the electrical resistance of the object when it fell on the 2 probes. you could of pre checked it and had it measure precisely. to check the plastic from the glass you could of squeezed it with a pair of clamps that would do it

    now I don't know if you would of been aloud to do any of that but if you did it again that's what i would try to do.

    anyways nice job

    im curious. you used the predetermined length of the bottles to separate glass from plastic; how would one go about doing so without knowing the bottle dimensions in advance? say for example they were just going to give you a big bag of random glass and plastic mixed together. maybe not even bottles at all? how could you separate the two? density? very, very cool project though. well done sire. well done indeed.

    1 reply

    Yeah this contest really wouldn't work in the real world. Density was one way we thought about that could work in the real world. Another idea we had would be to detect what kind of vibration frequency each bottle would have. We never tested this. Another test would be test how light is reflected by each material.

    I wonder if weight would have been a sufficient test for determining glass or plastic, maybe using a pressure sensor. That was my first though when I read the problem description. I would think that even a small glass jar or bottle would weigh more than even a large plastic container.

    1 reply

    We actually thought of that and did some testing. We tried to get the heaviest plastic bottle and the lightest glass bottle we could find. There was a big enough gap between the two to use that test. We had a problem implementing a pressure/weight test into the machine so we decided not to go with that.

    Looks great, and from what I've read it sounds great, but I think this instructables would really benefit from a video

    2 replies

    I forgot that I had a video from the competition. The lighting wasn't very good so it is poor quality. I added the video and gave a description.

    Thanks! Unfortunately I am not able to get a video. Since the project was part of ASME at my college, I do not have access to it anymore. I am kind of disappointed in myself that I didn't get a video before I was done with it.

    I stated before that I didn't have a video, but I actually have a video from the competition that I forgot about. The lighting in the room was poor so the quality isn't that great. I will post the video and a description of what happened in the video.

    woow the audience was not helping at all ,
    all the "Aoooooooh",
    and you remind me with school, when you make a project they take it and you never see it again :(

    anyway nice project. :)

    Yeah it really sucked because after that happened, I wasn't able to touch it and that was the only try I had. It was fun to work on though. It was my first time using the Arduino and I learned a lot of about it. I used it to control my Christmas lights this season.

    They actually would have probably let me keep it, but I didn't ask because I really didn't have a need or a place to keep it.

    Thanks for checking it out.

    This is very cool! I was wondering how you connected the motors. Do you have a scheme of that? Or did I overlook it somewhere?

    2 replies

    I used the Adafruit Motor/Stepper/Servo Shield for Arduino. It has the electronics to run the motors forward and backward. It comes with the ability to run 4 DC motors and also comes with code which makes programing the motors very easy.

    The positive and negative wires from the motor are wired into terminals on the shield. Very easy hookup.