

The APDS-9960 V2 is a highly versatile sensor that integrates multiple functionalities, including ambient light sensing, proximity detection, RGB color sensing, and gesture recognition, into a single compact package. This sensor communicates via the I2C protocol, making it easy to interface with microcontrollers and development boards such as the Arduino UNO.
Common applications of the APDS-9960 V2 include:








The APDS-9960 V2 is designed to provide reliable and accurate sensing capabilities. Below are its key technical specifications:
| Parameter | Value | 
|---|---|
| Operating Voltage | 2.4V to 3.6V | 
| I/O Voltage | 1.8V to 3.6V | 
| Communication Interface | I2C (7-bit address: 0x39) | 
| Proximity Detection Range | Up to 100 mm | 
| Gesture Sensing Range | 10 mm to 150 mm | 
| Ambient Light Sensitivity | 0.01 lux to 10,000 lux | 
| RGB Color Sensing Range | 0 to 65,535 counts per channel | 
| Operating Temperature | -40°C to +85°C | 
| Power Consumption (Active) | 1.0 mA (typical) | 
| Power Consumption (Sleep) | 2.2 µA (typical) | 
The APDS-9960 V2 has a total of 6 pins. Below is the pinout and description:
| Pin | Name | Description | 
|---|---|---|
| 1 | VDD | Power supply input (2.4V to 3.6V) | 
| 2 | GND | Ground connection | 
| 3 | SDA | I2C data line | 
| 4 | SCL | I2C clock line | 
| 5 | INT | Interrupt output (active low) | 
| 6 | LDR | LED driver pin for external IR LED (optional use) | 
The APDS-9960 V2 is straightforward to use in a circuit, especially with microcontrollers like the Arduino UNO. Below are the steps to get started:
Below is an example Arduino sketch to read proximity data from the APDS-9960 V2:
#include <Wire.h>
#include <Adafruit_APDS9960.h>
// Create an instance of the APDS-9960 sensor
Adafruit_APDS9960 apds;
// Setup function
void setup() {
  Serial.begin(9600); // Initialize serial communication
  while (!Serial);    // Wait for the serial monitor to open
  // Initialize the APDS-9960 sensor
  if (!apds.begin()) {
    Serial.println("Failed to initialize APDS-9960 sensor!");
    while (1); // Halt execution if initialization fails
  }
  Serial.println("APDS-9960 initialized successfully!");
  // Enable proximity sensing
  apds.enableProximity(true);
}
// Loop function
void loop() {
  uint8_t proximity = apds.readProximity(); // Read proximity value
  // Print proximity value to the serial monitor
  Serial.print("Proximity: ");
  Serial.println(proximity);
  delay(500); // Wait for 500ms before the next reading
}
Sensor Not Detected on I2C Bus
Proximity Readings Are Inaccurate
Gesture Recognition Not Working
Ambient Light or Color Readings Are Incorrect
Q: Can the APDS-9960 V2 be used with 5V microcontrollers?
A: Yes, but you must use a logic level shifter to step down the I2C signals to 3.3V, as the APDS-9960 V2 operates at 3.3V logic levels.
Q: How do I enable gesture recognition?
A: Use the appropriate library (e.g., Adafruit_APDS9960) and call the enableGesture() function. Ensure the INT pin is connected for interrupt-based gesture detection.
Q: What is the maximum I2C clock speed supported?
A: The APDS-9960 V2 supports I2C clock speeds up to 400 kHz (Fast Mode).
Q: Can I use the sensor without an external IR LED?
A: Yes, the APDS-9960 V2 has a built-in IR LED, but using an external IR LED may improve performance in low-light conditions.
By following this documentation, you can effectively integrate the APDS-9960 V2 into your projects and take advantage of its powerful sensing capabilities.