Color Sensor

I was wondering if any one has been able to make a color sensor that works well with VEX. I was thinking of trying to make one but I am not sure where to start. I was thinking of trying to use this: Color Light Sensor Evaluation Board - SEN-08663 - SparkFun Electronics

Any ideas? Or previous experience with color sensors?!

-Ben

This is a very nice color sensor from Parallax that works great with the BS2 family chips but I haven’t tried it with Vex. However looking at the pinout it looks like it should work with Vex.

Technic-R-C

Yeah, yours looks good too. The bad thing about the Spark Fun light sensor is there is not that much information on the website about it. I might hold of on the light sensor idea because it is very complicated and I have some other orders in the mail.

The Sparkfun sensor has an I2C interface (aka TWI, or Two-Wire Interface). It is possible to program a VEX Microcontroller to talk to I2C devices, but it is not easy.

Also, it is a 3.3V (max) part, so you’ll have to add a voltage regulator, and possibly line drivers/receivers to ensure all he signals are in-spec.

The data sheet for the sensor chip can be downloaded at the bottom of this page.

If you want a low-tech solution, you could just use three VEX light sensors with red, green, and blue filters. Or you could use a single light sensor and use a servo to rotate a color-wheel over it. Point a bright white light, such as the VEXplorer flashlight, at the point you want to read, and make sure all the light sensors are aimed at that spot.

Cheers,

  • Dean

Ok I guess color sensors are a lot more complicated than I thought they were. Now i am definitely not going to make one.:eek: I guess I will just have to wait for VEX to come out with one?!

Shouldn’t take that long. At the current rate at which Vex is releasing products you’ll have a color sensor soon enough. :slight_smile:

Technic-R-C

completely agreed, i still need to try out the potentiometer though

you could setup a very unorthodox gyro by using optical encoders and counterweights but i highly doubt it would work well

Does any one know if this color sensor will work? I looked and it uses 5v but I am not sure about the other specifics a sensor needs to be used with VEX.

Thanks,

Ben

Electrically, you should be able to hook it up, but I don’t think it’d work very well. The problem is that it requires you to count pulses over a 50ms period, but the ~17ms periodic service routine that run in the Vex microcontroller is likely to interfere with this. The result would be some lost counts, though I don’t know how many.

You might be able to configure one of the timers into counter mode to count pulses, but I’ve not gone that far into PIC details yet to know how workable that is off the top of my head.

Hope this helps,

  • Dean