Author Topic: Colorimeter with tcs34725  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Colorimeter with tcs34725
« on: April 02, 2020, 05:51:45 pm »
Hi
I made a colorimeter with tcs34725
I'm going to test the oil according to the standard
standard file ==>https://gofile.io/?c=rEi4qq
According to color standard No. 2, the ratio of red, green and blue should be as follows
R=552,G=442,B=6
But the results of my experiment
R=516.5058405
G=343.829355
B=139.6648045 :-\
The light source is an 1 watt LED
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Colorimeter with tcs34725
« Reply #1 on: April 03, 2020, 08:05:46 am »
I haven't read that big arse PDF, but you have to take the spectrum of the light source into account.  Different light sources will give different results. A cold white LED will have a lot of blue, which is probably why you measured more blue.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8760
  • Country: fi
Re: Colorimeter with tcs34725
« Reply #2 on: April 03, 2020, 08:22:14 am »
Yes, the light source is critical, but you can calibrate the light source spectrum out of equation by measuring the light source directly, and calling that the baseline.

Do note that TCS34725 is designed for entertainment devices, not for chemical analysis, and the spectral sensitivity curves are all over the place, for example the red seems to have a 10% relative value peak over the blue region, this is huge. You may want to play around with extra filters.

 
The following users thanked this post: seyedsaeed, rajhlinux

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #3 on: April 03, 2020, 04:45:32 pm »
Yes, I know the light spectrum is important
But it is said to be between 6400 and 7000 Kelvin
The LED in the experiment was 6600 Kelvin
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #4 on: April 03, 2020, 04:52:31 pm »
How do I calibrate the light source?
Previously this device was made by someone else with tcs34725 , Unfortunately I do not have access to its information

 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14749
  • Country: de
Re: Colorimeter with tcs34725
« Reply #5 on: April 03, 2020, 04:59:53 pm »
The light spectrum has more to it than just the color temperature. Especially white LEDs usually have a relatively strong peak of red light and often more red and less yellow and green than normal sun light. They can still have a comparable color temperature. With the white LED one also has to specify the exact LED type. The color rendering index CRI can give an indication how much the LED spectrum is off the normal one.

The more reproducible way would be using colored LEDs to define the wavelengths and than use a more normal photo-detector to record all wavelengths. One may not be limited to just the base colors for the eye.
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #6 on: April 03, 2020, 05:32:39 pm »
All I know is that tcs34725 detects it 6600 Kelvin
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8760
  • Country: fi
Re: Colorimeter with tcs34725
« Reply #7 on: April 04, 2020, 06:37:21 am »
Kelvins are meaningless. You need to do a bit of homework on this.
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #8 on: April 04, 2020, 07:32:36 am »
What do you mean?
Do you have a suggestion or sensor for my work?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8760
  • Country: fi
Re: Colorimeter with tcs34725
« Reply #9 on: April 04, 2020, 08:30:55 am »
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #10 on: April 04, 2020, 09:08:13 am »
The amount of Kelvin is proportional to the amount of red, green and blue
kelvin_table = {
    1000: (255, 56, 0),
    1100: (255, 71, 0),
    1200: (255, 83, 0),
    1300: (255, 93, 0),
    1400: (255, 101, 0),
    1500: (255, 109, 0),
    1600: (255, 115, 0),
    1700: (255, 121, 0),
    1800: (255, 126, 0),
    1900: (255, 131, 0),
    2000: (255, 138, 18),
    2100: (255, 142, 33),
    2200: (255, 147, 44),
    2300: (255, 152, 54),
    2400: (255, 157, 63),
    2500: (255, 161, 72),
    2600: (255, 165, 79),
    2700: (255, 169, 87),
    2800: (255, 173, 94),
    2900: (255, 177, 101),
    3000: (255, 180, 107),
    3100: (255, 184, 114),
    3200: (255, 187, 120),
    3300: (255, 190, 126),
    3400: (255, 193, 132),
    3500: (255, 196, 137),
    3600: (255, 199, 143),
    3700: (255, 201, 148),
    3800: (255, 204, 153),
    3900: (255, 206, 159),
    4000: (255, 209, 163),
    4100: (255, 211, 168),
    4200: (255, 213, 173),
    4300: (255, 215, 177),
    4400: (255, 217, 182),
    4500: (255, 219, 186),
    4600: (255, 221, 190),
    4700: (255, 223, 194),
    4800: (255, 225, 198),
    4900: (255, 227, 202),
    5000: (255, 228, 206),
    5100: (255, 230, 210),
    5200: (255, 232, 213),
    5300: (255, 233, 217),
    5400: (255, 235, 220),
    5500: (255, 236, 224),
    5600: (255, 238, 227),
    5700: (255, 239, 230),
    5800: (255, 240, 233),
    5900: (255, 242, 236),
    6000: (255, 243, 239),
    6100: (255, 244, 242),
    6200: (255, 245, 245),
    6300: (255, 246, 247),
    6400: (255, 248, 251),
    6500: (255, 249, 253),
    6600: (254, 249, 255),
    6700: (252, 247, 255),
    6800: (249, 246, 255),
    6900: (247, 245, 255),
    7000: (245, 243, 255),
   .....}
this Link https://andi-siess.de/rgb-to-color-temperature/
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5133
  • Country: bt
Re: Colorimeter with tcs34725
« Reply #11 on: April 04, 2020, 09:40:07 am »
..The light source is an 1 watt LED
What is your 1W LED? Part number?
« Last Edit: April 04, 2020, 09:48:32 am by imo »
Readers discretion is advised..
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8760
  • Country: fi
Re: Colorimeter with tcs34725
« Reply #12 on: April 04, 2020, 09:42:51 am »
That table is for theoretical black body radiator, which you can't buy anywhere. In practice you can't buy a lighting product that actually has a color temperature at all (as expressed in Kelvin). Classic incandescent bulbs come fairly close, though.

White LEDs or fluorescent tubes do not have a color temperature; instead, they come with "color temperature equivalent" also rated in Kelvins, but it only corresponds how the light kind-of-looks like on human eye. Such a table is meaningless; you need to look at the actual spectral curves for the LED you are considering.

All this being said, you can calibrate the light source out of the equation. The poorly defined and overlapping filters on your chosen sensor are a bigger problem because you can't calibrate out the fact that some red light is indicated as "blue".

There is another, simpler way; assuming your sample is not moving, why not use a simple photodiode or similar to just sense light, and use different wavelength LEDs (like red, green, blue, maybe yellow as well) as sources. Switch one on at a time, do a measurement. Spectrum of the LEDs is well defined and there are no extra spikes outside the main peak. This way you can easilly generate like 6-7 different samples along the spectrum, far better than just RGB.
« Last Edit: April 04, 2020, 09:48:24 am by Siwastaja »
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #13 on: April 04, 2020, 09:45:11 am »
..The light source is an 1 watt LED
What is your 1W LED? Part number?

Yes, but power limited with resistor
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5133
  • Country: bt
Re: Colorimeter with tcs34725
« Reply #14 on: April 04, 2020, 09:48:49 am »
Your sensor has got R/G/B peaks at below wavelengths (datasheet). Try to find the LED diodes as below and use them instead of the white 1W one.
Datasheet page 4.:
Quote
The 465 nm input irradiance is supplied by an InGaN light-emitting diode with the following characteristics:
dominant wavelength lambdaD = 465 nm, spectral halfwidth lambda½ = 22 nm.

The 525 nm input irradiance is supplied by an InGaN light-emitting diode with the following characteristics:
dominant wavelength lambdaD = 525 nm, spectral halfwidth lambda½ = 35 nm.

The 615 nm input irradiance is supplied by a AlInGaP light-emitting diode with the following characteristics:
dominant wavelength lambdaD = 615 nm, spectral halfwidth lambda½ = 15 nm.

Also mind the "relative" response, you have to calibrate the R/G/B channels against it (see below).
« Last Edit: April 04, 2020, 10:07:58 am by imo »
Readers discretion is advised..
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Colorimeter with tcs34725
« Reply #15 on: April 04, 2020, 12:12:14 pm »
The LED doesn't produce a continuous spectrum, but will have a strong peak in the blue region, hence the stronger than expected blue reading. You need to take some real samples to calibrate it properly, rather than relying on theoretical tables.

https://www.cree.com/led-components/media/documents/XLampXML-11E.pdf
« Last Edit: April 04, 2020, 02:54:26 pm by Zero999 »
 

Offline seyedsaeedTopic starter

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ir
Re: Colorimeter with tcs34725
« Reply #16 on: April 04, 2020, 05:54:43 pm »
The LED doesn't produce a continuous spectrum, but will have a strong peak in the blue region, hence the stronger than expected blue reading. You need to take some real samples to calibrate it properly, rather than relying on theoretical tables.
(Attachment Link)
https://www.cree.com/led-components/media/documents/XLampXML-11E.pdf
If blue is more, why is this ratio of red, green, and blue without a test tube?
R=339.7468354
G=343.7974684
B=316.4556962
They are almost equal
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Colorimeter with tcs34725
« Reply #17 on: April 04, 2020, 08:20:35 pm »
The LED doesn't produce a continuous spectrum, but will have a strong peak in the blue region, hence the stronger than expected blue reading. You need to take some real samples to calibrate it properly, rather than relying on theoretical tables.
(Attachment Link)
https://www.cree.com/led-components/media/documents/XLampXML-11E.pdf
If blue is more, why is this ratio of red, green, and blue without a test tube?
R=339.7468354
G=343.7974684
B=316.4556962
They are almost equal
Because, according to the data sheet. the  TCS34725 is the least sensitive to blue and is most sensitive to red?

Note, the spectrum in my previous post is for the Cree® XLamp® XM-L range of LEDs. Your LED will might differ. Look at the data sheet.

Your apparatus is totally different to what's listed in the report you linked to (for future reference please upload here, to make life easier for others). You have an LED with peaks and troughs in the spectrum and a colorimeter with an uneven response, whilst the report talks about an incandescent lamp and daylight filter and RGB values in chromaticity coordinates. Colour is a subjective phenomenon. The exact same perceived colour can be made in a variety of different ways. For example, a light with a single, sharp peak at 580nm will appear to be yellow, whilst a light with peaks both the red and green regions of the spectrum will also appear to be yellow and could actually match the apparent colour of the pure spectral yellow light, yet measure differently with the TCS34725.

I don't think you should worry about the actual numbers. You have a range of samples right? So just calibrate it with each of them and do some interpolation if necessary.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf