Pages: 1 [2]   Go Down
Author Topic: TCS3200 with Arduino Uno  (Read 2022 times)
0 Members and 1 Guest are viewing this topic.
Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1287
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Karma points always welcome smiley

Quote
Do I need to connect the outer inputs to the digital pins instead of connecting to 5V?
I don't know what this means. What are the 'outer inputs'?

Quote
Do you think I will be able to have the exact color temperature of a light?
No idea on this one. My use of the sensor is for detecting color, not color temperature. The sensors work by reading the level of reflected light rather than a light source directly. This may not be compatible with reading a color emitted from a colored source. However, assuming that you can read such a source, then there should be formulas that allow you to convert from one to the other. Color space and its attributes is an interesting topic but I am not at all an expert.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am a web programmer trying to learn a bit of Arduino.

I installed marco_c 's library (thank you!) to use with a TCS230 sensor. The vendor said it's TCS3200, but it looks like this, so I'm guessing it's the TCS230.
I used the Calibration example and it worked, but rgb values on serial monitor translate to colors much darker than the objects sensed. I tried different libraries with the same problem, colors are too dark. For example, a green color that should be something around R=172 G=204 B=60  is being recognized as R=160 G=154 B=63.
My ultimate goal is to detect skin color, so some level of accuracy would be important.


Could this be caused by some problem with my settings or could it be sensor malfunction?

I changed pin definitions in the Calibration example to these:
Code:
#define  S0 13
#define  S1  12
#define  S2  11
#define  S3  10

And I'm calling the class like this:
Code:
MD_TCS230 CS(S2, S3, S0, S1);

OUT is set to D5
OE is set to GND

Can anyone help me?
I have little to no knowledge on hardware/electronics, but I may try to check the sensor if you have some tips.

Thank you in advance!
« Last Edit: July 27, 2014, 12:03:34 am by carolx » Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1287
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you are using the sensor, are you shielding it from externally reflected light? If you are using the sensor as-is in the picture you linked to, you will get different results depending on the light level and other objects in the room.

If you see in my documentation, I built a black cardboard shielding around the LEDs and the sensor. Then when I want to sense, I lock out all the external light from the sensor by putting the shroud in contact with the material to be identified. this stops the external light from influencing the reading and I get the same every time.

I would also say that the colours on the screen will look different from colours in real life because they are produced differently.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, thank you for such a quick response.

Well, I improvised a shield using thin cardboard, but it is not black and it still lets some external light pass through. For some colors the results are a lot different... A pale skin is read as dark brown.

I'll try to make a better shielding and post the results.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I've built a pretty decent shield around the sensor in black cardboard, and the results changed minimally. On human skin, results are the worst, I guess skin has bad reflectance (I found some studies on the subject, like this one).

I put the colors generated from the rgb values on an image to illustrate what's happening (image attached)


* color-sensor-results-2014-07-27.jpg (31.37 KB, 364x550 - viewed 22 times.)
« Last Edit: July 27, 2014, 12:05:06 am by carolx » Logged

Pages: 1 [2]   Go Up
Jump to: