Cảm Biến Màu TCS3200 GY-31
Cảm biến màu GY-31 TCS3200 được sử dụng để nhận biết màu sắc bằng cách đo phản xạ 3 màu
- Estimated Delivery : Up to 4 business days
- Free Shipping & Returns : On all orders over $200
Cảm biến màu GY-31 sử dụng IC TAOS TCS3200 RGB với 4 led trắng. Cảm biến màu TCS3200 có thể phát hiện và đo lường một phạm vi gần như vô hạn của màu sắc có thể nhìn thấy. Cảm biến màu TCS3200 tích hợp 1 dãy bộ dò ánh sáng quang bên trong, với mỗi cảm biến ứng với các màu đỏ, xanh lá, xanh dương.
Các bộ lọc của mỗi màu được phân bố đều khắp cảm biến để loại bỏ sai lệch vị trí giữa các màu sắc. bên trong cảm biến có bộ dao động tạo ra sóng vuông có tần số là tỷ lệ thuận với cường độ của màu sắc được lựa chọn.
Cảm biến màu GY-31 TCS3200 được sử dụng để nhận biết màu sắc bằng cách đo phản xạ 3 màu sắc cơ bản từ vật thể là đỏ, xanh lá và xanh dương từ đó xuất ra tần số xung tương ứng với 3 màu này qua các chân tín hiệu, đo 3 tần số xung này và qua 1 vài bước chuyển đổi nhất định là bạn sẽ có đươc thông tin của màu sắc của vật thể cần đo.
THÔNG SỐ CẢM BIẾN MÀU GY-31
- Nguồn 2.7 -> 5.5VDC
- Ngõ ra: 3 tần số xung tương ứng 3 màu đỏ xanh dương và xanh lá.
| GND | GND |
| OE | Enable (Mức Thấp) |
| OUT | Đầu ra tín hiệu tần số |
| S0, S1 | Dùng để lựa chọn tỷ lệ tần số |
| S2, S3 | Dùng để lựa chọn kiểu photodiod |
| VCC | 2.7V đến 5.5V |
SƠ ĐỒ ĐẤU VỚI VỚI ARDUINO (VÍ DỤ)

Chức năng chân cảm biến màu:
+ S0,S1 : Đầu vào chọn tỉ lệ tần số đầu ra .
+ S2,S3 : Đầu vào chọn kiểu photodiode.
+ OE : Đầu vào cho phép xuất tần số ở chân OUT.
+ OUT : Đầu ra là tần số thay đổi phụ thuộc cường độ và màu sắc.
—————–CODE THAM KHẢO—————-
/*
Color Sensor Arduino
----------- --------
VCC 5V
GND GND
s0 8
s1 9
s2 12
s3 11
OUT 10
OE GND
*/
const int s0 = 8;
const int s1 = 9;
const int s2 = 12;
const int s3 = 11;
const int out = 10;
// LED pins connected to Arduino
int redLed = 2;
int greenLed = 3;
int blueLed = 4;
// Variables
int red = 0;
int green = 0;
int blue = 0;
void setup()
{
Serial.begin(9600);
pinMode(s0, OUTPUT);
pinMode(s1, OUTPUT);
pinMode(s2, OUTPUT);
pinMode(s3, OUTPUT);
pinMode(out, INPUT);
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(blueLed, OUTPUT);
digitalWrite(s0, HIGH);
digitalWrite(s1, HIGH);
}
void loop()
{
color();
/* Serial.print("R Intensity:");
Serial.print(red, DEC);
Serial.print(" G Intensity: ");
Serial.print(green, DEC);
Serial.print(" B Intensity : ");
Serial.print(blue, DEC); */
//Serial.println();
if (red < blue && red < green && red < 20)
{
Serial.println(" - (Red Color)");
digitalWrite(redLed, HIGH); // Turn RED LED ON
digitalWrite(greenLed, LOW);
digitalWrite(blueLed, LOW);
}
else if (blue < red && blue < green)
{
Serial.println(" - (Blue Color)");
digitalWrite(redLed, LOW);
digitalWrite(greenLed, LOW);
digitalWrite(blueLed, HIGH); // Turn BLUE LED ON
}
else if (green < red && green < blue)
{
Serial.println(" - (Green Color)");
digitalWrite(redLed, LOW);
digitalWrite(greenLed, HIGH); // Turn GREEN LED ON
digitalWrite(blueLed, LOW);
}
else{
Serial.println();
}
delay(300);
digitalWrite(redLed, LOW);
digitalWrite(greenLed, LOW);
digitalWrite(blueLed, LOW);
}
void color()
{
digitalWrite(s2, LOW);
digitalWrite(s3, LOW);
//count OUT, pRed, RED
red = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH);
digitalWrite(s3, HIGH);
//count OUT, pBLUE, BLUE
blue = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH);
digitalWrite(s2, HIGH);
//count OUT, pGreen, GREEN
green = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH);
}
| Cân nặng | 0,1 kg |
|---|---|
| Kích thước | 5 × 5 × 5 cm |
Shipping policy
At our Company, we understand the importance of timely delivery. We offer a variety of shipping options to suit your needs, including standard, expedited, and express shipping. Our dedicated team works diligently to process and dispatch your orders promptly, aiming to deliver them to your doorstep within the estimated timeframe.
We strive to provide fast and reliable shipping to our customers. Here’s everything you need to know about our shipping process:
- Dispatch: Within 24 Hours
- Free shipping across all products on a minimum purchase of $99.
- International delivery time 5 to 7 business days
- Cash on delivery might be available
- Easy 30 days returns and exchanges
Please note that delivery times are estimates and may vary depending on factors such as product availability, destination, and carrier delay
Returns policy
We want you to be completely satisfied with your purchase from our website. If for any reason you are not entirely happy with your order, we’re here to help. Certain exclusions and conditions may apply, so we encourage you to review our detailed return policy for more information. Rest assured, our goal is to ensure your complete satisfaction with every purchase you make from our website
- Returned items must be unused, undamaged, and in the same condition as received.
- Original tags, labels, and packaging must be intact and included with the returned item.
- Proof of purchase, such as your order confirmation or receipt, is required for all returns.







