-
The Color Sensor
09/07/2015 at 03:31 • 6 commentsI 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:
-
The Motors
09/07/2015 at 01:23 • 0 commentsThe DC motors came from a robotics kit that I bought at RadioShack:
Powered by the Adafruit Motor Shield v2:
Here are the incremental encoder rings that provide position feedback for the discs. They are alternating slots that are read by photo interrupters. After the initialization sequence, this is sufficient information for the microcontroller to tell what positions the top and bottom discs are in.