Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit APDS9960 Proximity Sensor: Examples, Pinouts, and Specs

Image of Adafruit APDS9960 Proximity Sensor
Cirkit Designer LogoDesign with Adafruit APDS9960 Proximity Sensor in Cirkit Designer

Introduction

The Adafruit APDS9960 Proximity Sensor is a multifunctional sensor capable of detecting proximity, gestures, and ambient light. It offers a simple yet effective way to add touchless interaction to your projects. This sensor is commonly used in applications such as gesture-controlled interfaces, touchless switches, and user presence detection.

Explore Projects Built with Adafruit APDS9960 Proximity Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Proximity and Ambient Light Sensor with APDS-9930
Image of APDS-9930 sensor: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
This circuit interfaces an Arduino UNO with an APDS-9930 Proximity and Ambient Light Sensor. The Arduino reads proximity data from the sensor via I2C communication and prints the values to the Serial Monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Smart Sensor Hub with Adafruit QT Py RP2040
Image of wearable final: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
This circuit features an Adafruit QT Py RP2040 microcontroller interfaced with an APDS9960 proximity sensor, an MPU6050 accelerometer and gyroscope, and an OLED display via I2C communication. It also includes a buzzer controlled by the microcontroller and is powered by a 3.7V LiPo battery with a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled Ambient Light Sensing and NeoPixel Display
Image of GuesturLED: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
This circuit features an Arduino Nano microcontroller interfaced with an APDS-9930 Proximity and Ambient Light Sensor for sensing environmental light and proximity. The Arduino Nano also controls an Adafruit Quarter 60 NeoPixel Ring, likely for visual feedback or display purposes. The sensor communicates with the Arduino via I2C (SDA and SCL connections), and the NeoPixel Ring is driven by a digital output (D8) from the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with APDS-9930 Sensor and NeoPixel Ring Light Control
Image of Burglar: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
This circuit features an Arduino UNO microcontroller connected to an APDS-9930 Proximity and Ambient Light Sensor for sensing environmental light and proximity, and an Adafruit Quarter 60 NeoPixel Ring for visual output. The Arduino provides power to both the sensor and the NeoPixel Ring, and communicates with the sensor via I2C (SDA and SCL) and controls the NeoPixel Ring through a digital data input (D8). The provided code skeleton suggests that the Arduino is programmed to interact with these components, although the specific functionality is not implemented in the given code.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit APDS9960 Proximity Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of APDS-9930 sensor: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
Arduino UNO Proximity and Ambient Light Sensor with APDS-9930
This circuit interfaces an Arduino UNO with an APDS-9930 Proximity and Ambient Light Sensor. The Arduino reads proximity data from the sensor via I2C communication and prints the values to the Serial Monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wearable final: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
Battery-Powered Smart Sensor Hub with Adafruit QT Py RP2040
This circuit features an Adafruit QT Py RP2040 microcontroller interfaced with an APDS9960 proximity sensor, an MPU6050 accelerometer and gyroscope, and an OLED display via I2C communication. It also includes a buzzer controlled by the microcontroller and is powered by a 3.7V LiPo battery with a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GuesturLED: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
Arduino Nano Controlled Ambient Light Sensing and NeoPixel Display
This circuit features an Arduino Nano microcontroller interfaced with an APDS-9930 Proximity and Ambient Light Sensor for sensing environmental light and proximity. The Arduino Nano also controls an Adafruit Quarter 60 NeoPixel Ring, likely for visual feedback or display purposes. The sensor communicates with the Arduino via I2C (SDA and SCL connections), and the NeoPixel Ring is driven by a digital output (D8) from the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Burglar: A project utilizing Adafruit APDS9960 Proximity Sensor in a practical application
Arduino UNO with APDS-9930 Sensor and NeoPixel Ring Light Control
This circuit features an Arduino UNO microcontroller connected to an APDS-9930 Proximity and Ambient Light Sensor for sensing environmental light and proximity, and an Adafruit Quarter 60 NeoPixel Ring for visual output. The Arduino provides power to both the sensor and the NeoPixel Ring, and communicates with the sensor via I2C (SDA and SCL) and controls the NeoPixel Ring through a digital data input (D8). The provided code skeleton suggests that the Arduino is programmed to interact with these components, although the specific functionality is not implemented in the given code.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Voltage: 3.3V to 5V
  • Current: 100 μA (typical)
  • Proximity Sensor Range: Up to 100 mm
  • Ambient Light and Color Sensor: Yes
  • Gesture Detection: Yes
  • I2C Interface: Yes
  • Operating Temperature Range: -30°C to 85°C

Pin Configuration and Descriptions

Pin Number Name Description
1 VIN Power supply (3.3V to 5V)
2 GND Ground
3 SCL I2C clock
4 SDA I2C data
5 INT Interrupt output (active low)

Usage Instructions

Integration with a Circuit

To use the APDS9960 sensor in a circuit:

  1. Connect the VIN pin to a 3.3V or 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the SCL and SDA pins to the I2C clock and data lines, respectively.
  4. Optionally, connect the INT pin to an interrupt-capable GPIO pin on your microcontroller.

Best Practices

  • Ensure that the power supply is stable and within the specified voltage range.
  • Use pull-up resistors on the I2C lines if they are not provided on the microcontroller board.
  • Avoid placing objects too close to the sensor during startup, as this may affect calibration.
  • Keep the sensor away from direct sunlight and other strong light sources to prevent false readings.

Example Code for Arduino UNO

#include <Wire.h>
#include <Adafruit_APDS9960.h>

Adafruit_APDS9960 apds;

void setup() {
  Serial.begin(9600);
  if (!apds.begin()) {
    Serial.println("Failed to initialize sensor!");
    while (1);
  }
  apds.enableProximity(true);
}

void loop() {
  uint8_t proximity_data;
  if (!apds.readProximity(proximity_data)) {
    Serial.println("Failed to read proximity value!");
    return;
  }
  Serial.print("Proximity: ");
  Serial.println(proximity_data);
  delay(250);
}

This example initializes the sensor and continuously reads the proximity data, printing it to the serial monitor.

Troubleshooting and FAQs

Common Issues

  • Sensor not responding: Ensure that the sensor is correctly wired and that the power supply is within the specified range.
  • Inaccurate readings: Verify that the sensor is not exposed to direct light or obstructed by nearby objects during startup.
  • I2C communication errors: Check the pull-up resistors on the I2C lines and ensure there are no shorts or open connections.

FAQs

Q: Can the APDS9960 sensor work with both 3.3V and 5V systems? A: Yes, the sensor can be powered with 3.3V to 5V, making it compatible with a wide range of microcontrollers.

Q: How can I use the interrupt feature? A: Connect the INT pin to an interrupt-capable pin on your microcontroller and configure an interrupt service routine to handle events.

Q: What is the maximum range of the proximity sensor? A: The proximity sensor can detect objects up to 100 mm away.

Q: Can the sensor detect color and light intensity? A: Yes, the APDS9960 includes ambient light and color sensing capabilities.

For further assistance, consult the Adafruit APDS9960 datasheet and the library documentation for advanced features and functions.