TAOS TCS230 RGB PICAXE Colour Sensor (AXE045 Module)

I am currently trying to integrate the PICAXE Colour Sensor (AXE045) module with a PIC and output RGB values on a LCD.

I have read the PICAXE Colour Sensor datasheet and I am using the COUNT command as suggested. With a 50ms COUNT period I get values ranging from 0 to 1000(ish) outputted on the LCD for red, green and blue values depending on the colour that the sensor is looking at.

Please could someone tell me if these values seem correct, given that the values given on the datasheet seem to vary between 0 and 350.

If anyone knows I would be extremely grateful if someone could let me know how to convert these values to true RGB values (ie. between 0 and 255, not 0 and 1000(ish).)

Many thanks in advance,

Chris
 

Fowkc

Senior Member
I think it's simply a matter of experimentation and calibration. In your case, if 1000 is about the highest count you get, that is equivalent to an RGB value of 255 for that colour. You can either scale all the numbers to 255, or reduce your COUNT time to get closer to 255. Currently you use 50ms to get 1000 counts (maximum). Therefore you need to reduce the time to (255/1000)*50 = 13 ms. You should get maximum values of around 255 then.

Remember the values on the datasheet are for a particular arrangement of objects:

"A table of colour values, found by experimentation, is shown below. Note these figures are from a test setup and will
need to be repeated and adjusted for your own setup." - page 5, axe045.pdf

Edited by - Fowkc on 08/11/2006 12:32:25
 

Technical

Technical Support
Staff member
Your numbers are fine. The number will vary considerably on hardware setup such as the focus of the lens and distance from lens to target.

Calibrate as suggested above (or simply divide your values by 4 to give 0-250 instead of 0-1000).
 

BeanieBots

Moderator
Actually, there is no such thing as a "true" RGB value. It is all relative and down to the individual. Even the values that are commonly used within programs that let you set three numbers between 0 and 255 simply go off to a "colour space converter" that has been calibrated BY EYE to get a REASONABLY consistant colour output from whatever screen is being observed. (and that in itself changes with brightness)
The closest thing you will ever get to a "standard" colour is a "pantone colour chart" but the numbers bear no resemblance to RGB values.
As suggested, just calibrate to whatever is YOUR perception of what a particular value should look like.
 
Thank you for your advice. I purchased the AXE045 module very recently. The first time I used it, I got the values as mentioned in my initial post. Today I connected it up exactly as before and I no longer get any values for RED. I get BLUE, GREEN and CLEAR values from the module, but RED values seem to have died...any ideas???
 
Top