Shop OBEX P1 Docs P2 Docs Learn Events
Color Sensor module for measurement of liquids — Parallax Forums

Color Sensor module for measurement of liquids

EckhardEckhard Posts: 1
edited 2010-03-08 01:25 in Accessories
Hi,
I just have ordered the color sensor module and took a look at the documentation of the colour matching program - no mentioning of reading the clear photodiode for light level.

I think I need this feature as I want to measure and match coloured tints.
Plan is to shine a white LED through the liquid onto the sensor to establish colour, probably with on board LEDs switched off.

My guess is that the light level measured with the unfiltered photo diode would give me a measure of turbidity - in this case concentration of the tint - the less light the higher the concentration. How can I read and display this 4th diode ?

What I wonder about is this: Do the rgb values also change with changing concentration levels of the tint - same tint? I that is the case, would it be better to measure reflection off the tint, perhaps with a mirror behind the sample cell and opposite the sensor. Naturally, then you would have to shine light onto the sample.

I would be grateful for comments and suggestions.

Kind regards

Eckhard

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-03-08 01:25
    Eckhard,

    Reading the clear photodiode is as easy as reading the others. Just set the S2 = H and S3 = L.

    The absolute RGB values will change with tint concentration. However, their ratio to the clear level may not. You'll just have to try it. Another approach may be to convert your RGB values to HSB (hue, saturation, and brightness). You can throw out the brightness value, and maybe even saturation, relying on hue for your color comparisons.

    -Phil
Sign In or Register to comment.