Close

The Color Sensor

A project log for 3D Printed Skittles Sorting Machine

This is a custom designed 3D printed skittles sorting machine that sorts skittles by color into bins.

nathan-petersonNathan Peterson 09/07/2015 at 03:316 Comments

I ignorantly bought the cheapest TCS3200 color sensing module that was being sold on amazon at the time. The TCS3200 chip itself is good, but I wouldn't recommend this board that I used mainly related to the on-board LEDs. They are not pointed correctly, there is no mechanism for blocking light from the LEDs directly onto the sensor, and they do not distribute light evenly on close objects. I mostly solved one of the problems by printing a shield to block the light from directly hitting the sensor. Ideally I would have added a diffuser to help with the other two issues, but I have not gotten around to that.

Anyway, here is color sensor:

There was another problem as well in that the surface of the skittles are very shiny and irregular, so they end up producing a lot of glare. I figured out how to get around this issue by placing polarizing filters on both the LED light source as well as over the color sensor itself (at a 90 degree angle relative to the other filter). The idea is that any polarized light will remain polarized if it is just being reflected off of the surface as glare and will get filtered out by the second filter, whereas the rest of the (non-glare) light will depolarize and will not be filtered out.

Here I'm glueing the filter over the LEDs with hot glue:

LEDs lit up with filter:

Here is what a skittle looks like without a filter:

Here is the same skittle with a filter:

Here I'm gluing the filter on the part that goes over the sensor:

Discussions

mike wrote 09/22/2015 at 22:36 point

Would love to try and build this.  any chance of a "how to" i believe i already own most of the equipment needed.

  Are you sure? yes | no

Nathan Peterson wrote 09/23/2015 at 02:04 point

I would love to see you build one. I'd be happy to help answer any questions. A complete how-to would probably be too time consuming for me at the moment since I am working on some other projects, but I might get to it at some point. The design to print is in tinkercad and the arduino source code is in github. I have links for those in the links section on the project page. The only thing that is missing really is a wiring diagram, but you might be able to figure that out by looking at the source code, and like I said I am happy to answer any questions if you want to attempt the build!

Also, if you do manage to complete a build, you have my permission to post your own how-to if you want :)

  Are you sure? yes | no

mike wrote 09/23/2015 at 23:07 point

Thanks Man. I appreciate it.  I'm trying to decide to go for this setup or you've inspired me to try and design and print my own version that will sort colored golf balls

  Are you sure? yes | no

Nathan Peterson wrote 09/24/2015 at 12:18 point

That sounds awesome! I would love to see that!

  Are you sure? yes | no

mike wrote 09/29/2015 at 21:00 point

lol me too....

I just need to get better with programming the arduino... any suggestions on the best way to get started with programming for arduino?

  Are you sure? yes | no

Nathan Peterson wrote 10/04/2015 at 17:13 point

I would definitely start with http://arduino.cc They have good documentation and some tutorials and examples. I've done a fair amount of programming in different development environments, and I can definitely say that Arduino is quite good. Especially for beginners. Good luck! Let me know how that works out.

  Are you sure? yes | no