📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Attention all domestic customers! Please place UPS Ground and USPS First Class & Priority orders by 11am ET Monday December 9, 2019 📬❄️📦 Attention all international customers! Please place all UPS WORLDWIDE EXPRESS; SAVER, and DHL EXPRESS WORLDWIDE orders by 11am ET Monday December 9, 2019 📬❄️📦
0

Floral Sensor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Floral Sensor

by vbalaji on Wed Aug 14, 2019 1:32 am

I recently purchased a flora color sensor Flora Color Sensor with White Illumination LED - TCS34725 from a local shop near chennai. i works fine and gives reading in the serial monitor, but the problem is the values for the same color is different at different times.
First when i start place red color papers at the top of the sensor it gives this
Code: Select all | TOGGLE FULL SIZE
Code: Select all | TOGGLE FULL SIZE
R:22  G:12 B:12


after few minutes when i place the same color again (red color paper) now it shows
Code: Select all | TOGGLE FULL SIZE
Code: Select all | TOGGLE FULL SIZE
R:42  G:32 B:32

after few minutes when i place the same color again (red color paper) now it shows
Code: Select all | TOGGLE FULL SIZE
Code: Select all | TOGGLE FULL SIZE
R:102  G:92 B:92

the value keep on raising for the came color paper,

[list=]What should i do?
My teacher told to calibrate the sensor but i cant find how to do calibation?
Should i change the sensor?[/list]

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by adafruit_support_carter on Wed Aug 14, 2019 2:18 pm

It may be how you are holding the paper over the sensor and changes in other lighting in the environment.

What if you just leave the paper on the sensor and watch the values. What do they do over time?

adafruit_support_carter
 
Posts: 13661
Joined: Tue Nov 29, 2016 2:45 pm

Re: Floral Sensor

by vbalaji on Mon Aug 19, 2019 2:22 am

The value keep on increseing even when I leave the color paper above the sensor??
Is there a way to calibrate the sensor?

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by adafruit_support_carter on Mon Aug 19, 2019 11:55 am

We should see if we can reproduce this behavior. Can you post a photo of your setup and show the paper being used, etc. We'll try it here also.

adafruit_support_carter
 
Posts: 13661
Joined: Tue Nov 29, 2016 2:45 pm

Re: Floral Sensor

by vbalaji on Wed Aug 28, 2019 1:30 am

https://ibb.co/85xjDs3

This is my Circuit, please help me solve it

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by vbalaji on Wed Aug 28, 2019 1:51 am

Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include "Adafruit_TCS34725.h"
Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X);
void setup() {
  Serial.begin(9600);
  Serial.println("Color View Test!");
  if (tcs.begin()) {
    Serial.println("Found sensor");
  } else {
    Serial.println("No TCS34725 found ... check your connections");
    while (1); // halt!
  }
}
void loop() {
  uint16_t clear, red, green, blue,Avg;
  tcs.setInterrupt(true);      // turn on LED ==false *** turn off LED== true
  delay(25000);  // takes 500ms to read
  tcs.getRawData(&red, &green, &blue, &clear);
  delay(500); 
  tcs.setInterrupt(false);  // change to act like photo flash
  Serial.print("C:\t"); Serial.print(clear);
  Serial.print("\tR:\t"); Serial.print(red);
  Serial.print("\tG:\t"); Serial.print(green);
  Serial.print("\tB:\t"); Serial.println(blue);
}



This is the code I am using

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by vbalaji on Wed Aug 28, 2019 4:52 am

[url]
https://ibb.co/vQgjPNC
https://ibb.co/D8Dncp8
https://ibb.co/NSCQh1h
https://ibb.co/c3phvvm
https://ibb.co/MRGPzn1
https://ibb.co/mN5zhtj
https://ibb.co/QmZD5NF
https://ibb.co/4dMPSGY[/url]

These are all my photos,
As u told there is problem in color paper, I changed to Building Blocks https://postimg.cc/tYRRqHcP

Please replay to my post, I need to complete my project,... Answer my questions....
[list=]Can we connect floral color sensor with Arduino?
can we read the floral color sensor values with digitalRead or analogRead because I know them[/list]

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by vbalaji on Wed Aug 28, 2019 7:01 am

Please replay

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by adafruit_support_carter on Wed Aug 28, 2019 1:15 pm

Can we connect floral color sensor with Arduino?

Yes. But power with 3V not 5V. The Flora version of the sensor does not have a voltage regulator. But the breakout version might be better suited for use with an UNO:
https://www.adafruit.com/product/1334

can we read the floral color sensor values with digitalRead or analogRead because I know them

No. It's an I2C device.

In general, it looks like it's working. Not sure why you are using interrupts and have a 25s delay. Try just running the basic demo sketch:
https://github.com/adafruit/Adafruit_TC ... s34725.ino

adafruit_support_carter
 
Posts: 13661
Joined: Tue Nov 29, 2016 2:45 pm

Re: Floral Sensor

by vbalaji on Thu Aug 29, 2019 6:50 am

why it gives different readings..
It should give constant reading with came color and same light, but it fails why

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by adafruit_support_carter on Thu Aug 29, 2019 11:51 am

It won't give exactly the same readings every time. There will be some variance. That's true of any sensor. But your readings looks generally as expected. Red is the dominant channel.

adafruit_support_carter
 
Posts: 13661
Joined: Tue Nov 29, 2016 2:45 pm

Re: Floral Sensor

by vbalaji on Tue Sep 03, 2019 1:35 am

Can you suggest me a color sensor that always gives a correct value?

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by vbalaji on Tue Sep 03, 2019 1:56 am

adafruit_support_carter wrote:It won't give exactly the same readings every time. There will be some variance. That's true of any sensor. But your readings looks generally as expected. Red is the dominant channel.


If the value for Red color and the value for yellow color are same, then how can I say what is the color with the result from the sensor value??

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by vbalaji on Tue Sep 03, 2019 9:36 am

Please replay

vbalaji
 
Posts: 14
Joined: Mon Aug 05, 2019 1:31 am

Re: Floral Sensor

by adafruit_support_carter on Wed Sep 18, 2019 5:33 am

The sensor does not report a yellow value. Only red, green, blue. If you are trying to determine red vs. green vs. blue, you could try averaging a bunch of samples and looking for the max value. Or something similar with perhaps some normalization to determine other colors.

No sensor will report the exact same value every time.

adafruit_support_carter
 
Posts: 13661
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.


cron