What color filter would I use for the light sensor to see the yellow middle platform and not the red or blue platform?
And what material would I use for the filter?
I suppose you could use what’s known as an optical bandpass filter. You will need to search for it by wavelength, which is usually in units of nanometers (nm). If you’re wanting to filter out all but the yellow, then you need to determine about what wavelength that particular platform yellow might be. Yellow tends to be around the vicinity of 570 nm on the spectrum. These types of filters tend to be expensive but maybe you can find something used on eBay or elsewhere. I expect you are looking at around $25 to $50-ish no matter what you do.
Or you could overlap two “cut off” filters: a “long pass” filter (which lets in the red end of the spectrum) with a short pass filter (which allows the blue end to pass) so that only the yellow gets through. Again, expect to pay, pay, pay.
I have yet to get my hands on a vision sensor (Ships in 8 weeks, yeah right), but I think you should be able to use its color signature capability to somehow see the yellow and ignore the red and blue. That is, of course, if the Vex vision sensor actually works and isn’t suffering V-ennui. I’ve played with Pixy Cams in the past, which I think is what the Vex vision sensor is built around, so it should be possible.
A short pass filter that lets blue through should not allow any yellow through at all, or it won’t be a blue filter, a blue filter being a negative yellow filter. I think you were thinking of a green long-pass filter.
Meanwhile, be careful. Just because the platform appears reddish doesn’t mean it doesn’t reflect yellow light, too. If you restrict the incoming light to that region of yellow, the red will probably appear to be dim yellow as opposed to black. But dim should be OK since you can set a minimum brightness on the analog reading you get from the light sensor.
Yes, the vision sensor can distinguish between them.
I suppose it depends on what sort of filters you might be talking about. Theater lights maybe? All I know is that short pass optical filters used in many science and industrial applications have a range of transmissions that can be relatively narrow or allow more than half the visible spectrum through. See, for example, this particular shortpass filter that allows 350 - 612 nm, blue up to yellow and beyond:
In that link, click on the blue tab marked “Curve”. This will show you the light transmission for this particular filter.
In the optical world, “short” simply refers to the blue side of the spectrum (shorter wavelength). “Long” refers to the red side of the spectrum (longer wavelength). But neither of those terms necessarily implies a particular color; it can include a range of colors.
pick up something like this
and try various filters until you find one that works for you.
Does this mean you have little faith in the Vision Sensor’s built-in ability to select colors? I’m not trying to be snarky - I don’t have access to the vision sensor yet - but I was hoping it could select colors without any physical filters.
Do you think layering yellow cellophane could work as a filter? It would be cheap and readily available.
It’s nothing to do with the vision sensor, OP asked about the light sensor. presumably this.
also, for more info on light sensor see this
Oh, heck, I’ve got Vision Sensor on the brain.
Okay, in that case, maybe the OP might also consider using the Line Follower. If I recall correctly, some kids played with the Line Follower last year and found it could easily detect the difference between the red and blue floor goals, and also the floor tiles. Since it has its own emitter, it might work better than the Light Sensor, which depends on ambient lighting. Of course, the Line Follower is “seeing” in infrared, so it might “see” the various plastics much differently than they look to the human eye.
What would be an acceptable way to attach the filter to the robot to comply with vex turning point competition rules?
Last season I had two light sensors right next to each other- one standard and one filtered with yellow tape- and compared the values given by the two to identify cones. It worked well (as long as the cone was right up against it of course). Because the tape absorbs most non-yellow light, the closer together the values of the two sensors are are, the closer the light is to the color of the filter. I don’t know the exact brand of tape I used (I’ve had it for years for electronics work), but here is a similar one.
As @FullMetalMentor said, line followers work well too, so if you have one of those lying around you can try that too (just remember that filtering the line tracker the way I described above is not at all practical, as they work in the infrared spectrum rather than visible light).
Can the line tracker distinguish color in the visible light spectrum even though it uses infrared light?
I somewhat doubt it. If I’m not mistaken, that dark piece of plastic over its “window” is a filter that allows in mostly infrared light, the same wavelengths that its built-in IR LED emits.
Yeah I just tested the line tracker and it can’t distinguish between the different colors of the parking platforms. However, I also tested the light sensor and the yellow platform reflects significantly more light than the red and blue platforms which really helps what I need it for. I’m still gonna test the light sensor with a yellow filter just to get a bigger difference between the yellow platform and the other two platforms. I just haven’t gotten it yet.
Is it acceptable to tape the color filter straight onto the light sensor? I know tape is restricted in most cases but I don’t know how else to attach the filter to the light sensor.
I can’t provide an official answer, but I would say that your use of tape as a color filter definitely falls under the regulation that allows for the use of a color filter. Since the tape is used strictly as a color filter and is not holding other things in place, I think it qualifies. But that’s just my opinion:
<R7> Robots are allowed the following additional “non-VEX” components:
a. Any material strictly used as a color filter or a color marker for a VEX Light Sensor or Vision
And that still works even though the tape is not the actual filter? It’s just holding the color filter in place.
In that case, I don’t think you would probably be within a super strict interpretation of the rules.
Is the filter a solid piece of plastic or is it like plastic wrapper material? Can you hold the filter in place with rubber bands or maybe make a holder/frrame for it with pieces of bar? There is adhesive on the back of the Vex foam material - could you stick it on with that?
Personally, if I were an inspector, I would probably allow tape in this case because I could consider it as being part of the filter, but you never know when you might get an inspector who’s very picky.
The filter is a piece of gel that I got from the theater department at my high school. It’s the clear colored plastic stuff that they use to cover the white stage lights to change their color. I tested it and it works really well. I layered a piece of amber gel on top of a piece of green gel and it filters out the red and blue platforms and only sees the yellow one.