

The Grayscale 3CH Sensor by SunFounder (Part ID: Grayscale 3CH Sensor) is a versatile light intensity sensor designed to detect variations in grayscale levels across three independent channels. This component is ideal for applications requiring precise light intensity measurements, such as robotics, line-following vehicles, and machine vision systems. By capturing grayscale data, the sensor enables detailed image processing and analysis, making it a valuable tool for projects involving object detection, path tracking, and environmental monitoring.








The following table outlines the key technical details of the Grayscale 3CH Sensor:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Operating Current | ≤ 20mA |
| Output Type | Analog (3 channels) |
| Detection Range | 1mm - 6mm |
| Response Time | ≤ 2ms |
| Dimensions | 30mm x 20mm x 10mm |
| Operating Temperature | -10°C to 50°C |
The Grayscale 3CH Sensor has a 4-pin interface. The pin configuration is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V - 5V) |
| 2 | GND | Ground connection |
| 3 | OUT1 | Analog output for Channel 1 (grayscale intensity) |
| 4 | OUT2 | Analog output for Channel 2 (grayscale intensity) |
| 5 | OUT3 | Analog output for Channel 3 (grayscale intensity) |
VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.OUT1, OUT2, and OUT3 pins to read the analog grayscale intensity values for each channel. These outputs can be connected to an ADC (Analog-to-Digital Converter) or directly to an Arduino's analog input pins.Below is an example of how to connect and use the Grayscale 3CH Sensor with an Arduino UNO:
VCC pin of the sensor to the 5V pin on the Arduino.GND pin of the sensor to the GND pin on the Arduino.OUT1, OUT2, and OUT3 to Arduino analog pins A0, A1, and A2, respectively.// Grayscale 3CH Sensor Example Code
// Reads analog values from the sensor and prints them to the Serial Monitor.
const int sensorPin1 = A0; // Channel 1 connected to A0
const int sensorPin2 = A1; // Channel 2 connected to A1
const int sensorPin3 = A2; // Channel 3 connected to A2
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
// Read analog values from each channel
int value1 = analogRead(sensorPin1); // Read Channel 1
int value2 = analogRead(sensorPin2); // Read Channel 2
int value3 = analogRead(sensorPin3); // Read Channel 3
// Print the values to the Serial Monitor
Serial.print("Channel 1: ");
Serial.print(value1);
Serial.print(" | Channel 2: ");
Serial.print(value2);
Serial.print(" | Channel 3: ");
Serial.println(value3);
delay(100); // Delay for 100ms before the next reading
}
No Output or Incorrect Readings
VCC and GND pins are properly connected.Inconsistent Readings
Low Sensitivity
Sensor Overheating
Q1: Can the Grayscale 3CH Sensor be used with a Raspberry Pi?
A1: Yes, but since the sensor outputs analog signals, you will need an external ADC (Analog-to-Digital Converter) to interface it with the Raspberry Pi.
Q2: What is the maximum detection range of the sensor?
A2: The sensor can detect grayscale variations at a distance of 1mm to 6mm from the surface.
Q3: How do I calibrate the sensor for my application?
A3: Use the analog output values to determine the range of readings for your specific surface and lighting conditions. Adjust your code or circuit accordingly to interpret the data.
Q4: Can this sensor detect colors?
A4: No, the Grayscale 3CH Sensor is designed to detect light intensity variations (grayscale) and cannot differentiate between colors.