1. Color Sensor Manual

1.1 Color Sensor Description

1.1.1 Sensor Introduction

The color sensor is applied to the detection of object color. It has a wide range of applications, including object color recognition, light intensity detection, and object proximity detection. Additionally, the four directional diodes on the sensor can be used to recognize gesture actions such as up, down, left, and right.

1.1.2 Working Principle

This sensor primarily uses the APDS9960 component. It can detect the color of an object, the ambient light intensity, object proximity, and support non-contact gesture detection. It features integrated RGB color detection which enables identification of various colors, ambient light detection to measure light intensity under different lighting conditions, and a built-in infrared LED to support proximity sensing.

1.2 Notice

  1. Do not exceed the rated voltage range during use.

  2. Do not use materials that transmit visible light or infrared light as test objects.

  3. Avoid strong light exposure and do not block the light on the test object during use.

  4. Do not operate the sensor in humid environments.

1.3 Specifications

For more information of this chip, you may refer to Color sensor schematic

1.3.1 Pin Instruction

Pin Instruction
5V Power Input
GND Ground
SDA SDA Data Cable
SCL SCL Clock Line

1.3.2 Specifications

Color Sensor
Parameter Specification
Color detection and ambient light detection RGB colors and mixed colors recognition
Recognizable light wavelength:465nm~650nm
Recognition can be performed through dark glass.
Programmable infrared LED Use infrared LED to provide detection light source, not affected by external ambient light
The ADC value range of the object's proximity is 1~255.
Programmable infrared LED
Gesture detection Directional diode with four directions
Recognition of gestures such as"up,""down,""left," and "right."
Programmable infrared LED
Working voltage DC 5V
Operating Current Maximum 100mA
Data Interface I2C bus with a maximum clock rate of 400 kHz.
Detection range 2~100mm
Detection angle Forward-20° to 20°
PWR description The sensor lights up after power is supplied
Connector Type 5264-4AW
Dimensions 50mmx20mm
Integrated optical lens and calibrated infrared LED beam enhance photodiode
Modular installation, compatible with Lego series.

1.4 Project Outcome

You can refer to the case tutorials and programs for different platforms in the same directory as this tutorial. This section will demonstrate the testing effect using Arduino IDE as an example.

Aim the color sensor at objects of red, green, and blue respectively. The sensor detects the color and displays the corresponding color word on the monitor.