APDS-9960

A single-chip I2C optical sensor from Broadcom that combines ambient light, RGB color, proximity, and gesture detection in one package.

APDS-9960: Proximity and gesture

What is the APDS-9960?

The APDS-9960 is a digital optical sensor from Broadcom (formerly Avago) that packs four functions into one part: ambient light sensing, RGB color sensing, proximity detection, and gesture recognition. Everything reports over I2C at the fixed address 0x39, so no analog front-end or ADC of your own is needed. It is the same sensor Samsung used for proximity and gesture in the Galaxy S5.

An integrated IR LED lit against four directional photodiodes lets the part sense an object approaching (proximity) and decode simple gestures (up, down, left, right, near, and far) from the timing of the signal across those diodes. The color and ambient-light path uses UV and IR blocking filters feeding separate red, green, blue, and clear channels, each with 16-bit output. An active-low INT pin flags proximity, gesture, or light-threshold events so the host does not have to poll.

This Adafruit breakout adds an onboard 3.3V regulator, I2C level shifting, and bus pull-ups, so it accepts a 3-5V supply on VIN and talks to both 3.3V and 5V logic. That is a meaningful difference from the bare APDS-9960 die, which is a strict 3.3V part. Proximity works out to roughly 10-20 cm and gestures are read at a similar swipe distance.

APDS-9960 pinout

PinFunctionType
VIN VIN (3-5V)PowerPower in
3V3 3V3 (out)PowerPower out
GND GNDPowerPower in
SCL SCLI²C SCLBidirectional (GPIO)
SDA SDAI²C SDABidirectional (GPIO)
INT INTDigital active-low interrupt outputDigital output

Specifications

Operating voltage
3.3 V (max 5 V)
Interface
I²C
I²C address
0x39
I²C pull-ups
On-board (no external resistors)
Dimensions
25.4 × 5 × 17.8 mm

Verified from the Tinkered component library · Adafruit (Broadcom / Avago APDS-9960).

Circuit requirements

  • Power VIN from 3-5V: the breakout's onboard regulator drops it to the 3.3V the APDS-9960 die needs (chip operating range 2.4-3.6V). The 3V3 pin is a regulated output you can borrow for other 3.3V parts, not a second input.
  • I2C runs in Fast Mode up to 400 kHz at the fixed 7-bit address 0x39; the address is not selectable, so only one APDS-9960 can share a bus.
  • This board level-shifts SDA and SCL, so it is safe on 5V microcontrollers like the Uno. Bare GY-9960 style modules are 3.3V-only and will be damaged by 5V logic or supply.
  • Onboard pull-ups sit on SDA and SCL, so you do not need to add your own on a short bus; avoid stacking many pulled-up boards on one long bus.
  • INT is an open-drain, active-low interrupt output. Wire it to an interrupt-capable host pin, configure the proximity/ALS/gesture thresholds, and clear the interrupt in software or it will stay asserted.
  • After power-up you must enable the specific engines in the ENABLE register (power on, then ALS, proximity, and gesture as needed) and set the integration and wait times; the chip boots into a low-power sleep and senses nothing until configured.

Board compatibility

The APDS-9960 connects to any of the microcontrollers supported in Tinkered. Mind the 3.3 V logic level on 3.3 V boards.

Common APDS-9960 mistakes

Assuming every APDS-9960 module tolerates 5V

This Adafruit board is 5V-friendly because of its regulator and level shifter, but the bare sensor and most cheap GY-9960 boards are 3.3V-only. Feeding 5V straight to a bare module's VCC or I2C lines destroys it.

Powering the board but never enabling the engines

The APDS-9960 wakes into sleep and reports nothing until you write the ENABLE register and turn on the proximity, gesture, or ALS engines individually. A silent sensor is usually an unconfigured one, not a wiring fault.

Swiping too fast, too slow, or lingering in range

The gesture engine expects a hand to enter and fully exit the sensor's field. Very fast swipes, very slow ones, or a hand left hovering in range produce missed or garbled gestures.

Ignoring the interrupt setup

INT is active-low and open-drain and only fires once you set thresholds and persistence. Forgetting to clear the interrupt flag leaves the line stuck low, and forgetting to set thresholds means it never fires at all.

Using the sensor in strong ambient IR

Direct sunlight or a nearby IR source saturates the proximity and gesture photodiodes and corrupts readings. Shield the sensor or account for high-IR environments when placing it.

APDS-9960 datasheet

Official APDS-9960 datasheetAdafruit (Broadcom / Avago APDS-9960)

Popular APDS-9960 projects

Touchless gesture control

Map up, down, left, and right swipes to control media playback, page through a menu, or dim lights without touching anything.

Non-contact proximity switch

Use the proximity reading to wake a display, trigger a relay, or turn on an LED strip when a hand approaches within a few centimeters.

RGB color detector or sorter

Read the red, green, blue, and clear channels to identify surface color for a simple color-matching game or an object-sorting machine.

Adaptive ambient-light dimming

Read the ambient light channel to auto-adjust a screen or LED backlight so it brightens in daylight and dims in the dark.

Build with the APDS-9960.

Drop the APDS-9960 into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.