Julia and Duc Color Sensor

Content

 Duc Nguyen and Julia Ferreira
Robotics
Color Sensor Investigation
 
            For our project, we decided to test the color sensor, particularly the RGB color detector. We set up the sensor by attaching it to the brick so that the bottom of the sensor touches the ground, then we stabilized the brick by putting legs to support remaining three corners.
            We decided to test how well the sensor picks up different colors from various distances.  To test this, we got six different colors (black, blue, green, yellow, white, orange, pink) of paper and one red Lego since the sensor wasn’t picking up red construction paper.  We put a ruler next to the sensor to measure the papers’ distance.  For the test, we moved each colored paper/Lego away from the sensor at 1mm increments from 0-40mm and recorded what color the sensor picked up.  To do this, we programmed on LabView so that the color sensor could detect a color, then print out what color it was on the brick screen.
 
Results:

  • For all colors, the screen read “black” at 0mm.  This is because the paper is so close to the screen, that the sensor cannot detect outside light and reads the color as black. 
  • All of the colors read "no color" by 40mm.
  • All of the colors were correctly detected at 1mm, but as the distance increases, the readings start to differ.
  • Black, blue, and green can be detected up to 19-20mm. 
  • Red and white could be detected up to 14mm.
  • Yellow could only be detected up to 4mm.
  • Both orange and pink were read as white/no color for all distances.  This may be because these colors have mixed values of red, green, and blue light that the sensor does not recognize.  Since white light is a mix of all 3 primary colors of light, the sensor sees these colors as white or simply as a blend of colors in the background, causing it to sense the default/no color setting.
Sources of Error:
  • The red Lego is much smaller than the pieces of paper which could have been a factor in the shorter distance that the color red could be detected
  • It was difficult to hold the paper/Lego at each millimeter increments with a steady hand, so some of the readings might not be exactly a millimeter apart
  • The paper created shadows over the sensors, possibly blocking the light and altering the color detected

             We noticed that the black, blue, and green colors were detected from a longer distance, and they are also darker, cool colors.  Red, white, and yellow (lighter, warmer colors) were not picked up by the sensor at such long distances.  This suggests a correlation between cool dark colors and further sensor detection.  We also noticed that for all the colors except yellow, the sensor detected black before it detected no color.  This could be because the sensor picks up the paper’s shadow as it is moved farther away.
             All in all, the color sensor is great for detecting different colors, but its applications are limited to a robot that could keep the sensor a 4mm away from a yellow surface, 15 mm away from red or white surface, and 19-20mm away from black, blue, or green surface.

The code file and data table are attached below.

Gallery
Video
Attachments

Leave a Reply

Your email address will not be published. Required fields are marked *