Shop OBEX P1 Docs P2 Docs Learn Events
TCS3200-DB Focal Length and Ambient Light — Parallax Forums

TCS3200-DB Focal Length and Ambient Light

bkirkbkirk Posts: 37
edited 2012-09-23 09:39 in Accessories
I know the TCS3200-DB has a focal length, but will this affect readings for ambient light? As in, if I am trying to measure ambient light, can I just leave the DB exposed, or do I need to position a lens or something at the focal point? Thanks!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-19 19:08
    If your reason for measuring ambient light is to subtract it from the LED-lit color readings, you don't have to do anything special. However, if you're trying to measure the color profile of the ambient light, you could simply remove the lens altogether. (You may need to invoke the TCS3200's internal dividers to avoid overrunning your MPU's ability to count the output frequency.) Another option would be to use the lens and present it with a flat white subject (for reflected ambient light) or a neutral translucent diffuser (for transmitted ambient light).

    Please tell us more about your project, and it will be easier to provide a more precise answer.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-01-19 20:01
    Nothing too special, just messing around with a light bulb of sorts that emits varying shades of light -- more of an art thing than anything else. I guess I'm trying to measure the color profile of the ambient light. If I leave the lens on, and do not have any sort of surface within its focal length (just open air), will it not provide accurate readings of the color profile? I'd rather not take off the lens. If I do have to remove it, how do I invoke the internal dividers? I'm not really sure what you mean by that. Thanks!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-19 20:29
    If you leave the lens on, you may inadvertently aim it to a colored wall or some other target that will give a deceptive reading. OTOH, you could just tape a piece of white paper over the lens to act as a diffuser.

    See the TCS3200-DB docs or the TCS3200 datasheet for info about the internal dividers. They are controlled by the S0 and S1 inputs which are, by default, pulled high on the TCS3200-DB module.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-01-19 21:45
    I guess I would prefer the most accurate option. Question though, if the focal length is 5.4mm, would it matter whether it is pointed at a wall or something so long as it is further than that distance away? Regardless, would you say it is more accurate to tape the piece of white paper, or just remove the lens altogether and activate the internal dividers? Finally, I've consulted the datasheet on the internal dividers, but how do I know which output frequency scaling is correct (2, 20, 100)? In other words, how do I know that it is too high for my MPU (or not)? Thanks!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-20 00:07
    if the focal length is 5.4mm, would it matter whether it is pointed at a wall or something so long as it is further than that distance away?
    Yes, it matters. If the wall is pink, it'll report pink, even though the ambient light might be white.
    would you say it is more accurate to tape the piece of white paper, or just remove the lens altogether and activate the internal dividers?
    Actually I erred with my remove-the-lens advice. I had neglected to consider that the lens includes that all-important IR filter. This is important, because IR will pass right through all of the color dyes that form the sensor's internal filters. So leave the lens on and aim it at a piece of white paper.
    Finally, I've consulted the datasheet on the internal dividers, but how do I know which output frequency scaling is correct (2, 20, 100)?
    Try it with all the settings, starting from the highest ratio, and working your way down. If you reach a point where the reading is too low, compared to the what you'd expect from the prior readings, you've gone too far. For example, if you get 144,000 counts at a setting of 2, and 200,000 counts at a setting of 1, you'll know that your MPU can't keep up at the latter setting, because you should have gotten 288,000.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-01-20 07:51
    Thanks Phil, that's very helpful. One final question if you don't mind. Would positioning a piece of clear (or semi-clear) film at the focal point be better than a piece of white paper (because wouldn't the paper have to be angled relative to the light source and the sensor to accurately reflect the available light)? I ask because I'm working primarily with indirect light sources (whatever the room lighting is, i.e., sunlight, lamps, and/or overhead lighting) and don't want to have to reposition the sensor depending on the light. Thanks again!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-20 08:20
    A ground-glass diffuser positioned directly over the lens will probably be your best best for reducing directionality to a minimum.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-01-23 15:19
    Thanks Phil. I think I found one online that will work. One quick question for clarification. When you say "positioned directly over the lens," do you mean directly over the lens but distanced at the focal point, or do you mean positioned directly over the lens and directly on top of the lens (so there is no gap between the two)?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-23 15:45
    In contact with the lens housing.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-01-23 21:22
    Thanks Phil!
  • bkirkbkirk Posts: 37
    edited 2012-01-31 22:15
    Hey Phil, I received the ground glass diffuser, and have one quick question.

    One side of the diffuser has a "frosted" finish (ground glass side), while the other side has a shiny, smooth finish. Which side should be in contact with the lens, and which should be facing up (away from the lens) to get the best results? I would guess the ground glass side down (in contact with lens), but want to double check. Thanks for your help.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-31 22:30
    I would put the frosted side facing out. You'll get less reflection from it that way.

    -Phil
  • bkirkbkirk Posts: 37
    edited 2012-02-01 08:28
    Ha, looks like my instinct was wrong. Glad I asked, thanks!
  • atok_91atok_91 Posts: 5
    edited 2012-09-21 02:57
    what is the range of photodiode sensitivity for tcs3200?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-09-23 09:39
    atok_91 wrote: »
    what is the range of photodiode sensitivity for tcs3200?


    Are you asking about the wavelengths to which the photodiodes are sentive? If so, there are spectral response curves on page 5 of the documentation.
Sign In or Register to comment.