AED 21.00
Description
The APDS-9960 is an RGB and Gesture sensor that uses 4 directional photodiodes to detect reflected IR energy from its built-in IR LED. It provides ambient light, RGB color, proximity sensing, and gesture recognition for distances up to 8" (20cm). The chip's gesture engine converts the photodiode signals to physical motion information and interprets these values as UP, DOWN, LEFT, RIGHT, NEAR, and FAR gestures. The sensor is commonly used in applications that require gesture recognition, and it has been used in the Samsung Galaxy S5 for this purpose.
Package Includes:
- 1 x The APDS-9960 is an RGB and Gesture sensor
Features:
- Gesture detection: The module uses 4 directional photodiodes and an IR LED to detect hand and finger movements and interpret them as various types of gestures, such as up, down, left, and right swipes, and near/far motions.
- Ambient light sensing: The module includes an ambient light sensor that can measure the intensity of ambient light in its environment.
- RGB color sensing: The module includes an RGB color sensor that can detect the red, green, and blue components of light.
- Communication interface: The module can communicate with the host microcontroller through either the I2C or SPI interface.
- Operating voltage range: The module operates at a wide range of voltages (2.4V - 3.6V).
- Low power consumption: The module consumes very little power, making it suitable for use in battery-powered devices.
- Compact form factor: The module is available in a compact surface-mount package, making it easy to integrate into various electronic devices and systems.
- Programmable: The module includes a set of control registers that can be used to configure its behavior and performance.
- High sensitivity: The module is highly sensitive to changes in IR energy, ambient light, and color, allowing it to detect even subtle movements and changes.
- Wide range of applications: The module is commonly used in a wide range of applications, including mobile devices, wearables, smart home automation systems, and industrial control systems.
Description:
The APDS-9960 is an advanced sensor module that combines several different sensing capabilities in a single package. It is designed to detect hand and finger movements, as well as changes in ambient light and color. The module includes an IR LED and 4 directional photodiodes, which allow it to detect reflected IR energy from different directions. By analyzing the signals from these photodiodes, the module's gesture engine can determine the velocity, direction, and distance of hand and finger movements, and interpret them as various types of gestures, such as up, down, left, right swipes, and near/far motions. In addition to gesture recognition, the APDS-9960 also includes ambient light and RGB color sensing capabilities. The ambient light sensor allows the module to measure the intensity of ambient light in its environment, which can be useful for adjusting the brightness of displays or backlighting. The RGB color sensor allows the module to detect the red, green, and blue components of light, which can be used for color sensing and identification applications. The APDS-9960 communicates with the host microcontroller through either the I2C or SPI interface, depending on the specific module variant. It operates at a wide range of voltages (2.4V - 3.6V) and can be configured using a set of control registers that are accessible over the communication interface. The module is available in a compact surface-mount package, making it easy to integrate into various electronic devices and systems.
Principle of Work:
The APDS-9960 module uses an IR LED and 4 directional photodiodes to detect reflected IR energy from different directions. When the IR LED emits light, it reflects off nearby objects, and some of that reflected light is picked up by the photodiodes. By analyzing the signals from these photodiodes, the module's gesture engine can determine the velocity, direction, and distance of hand and finger movements, and interpret them as various types of gestures, such as up, down, left, right swipes, and near/far motions. The photodiodes are arranged in a specific pattern to detect light from different directions. The signals from the photodiodes are amplified, filtered, and processed by the module's analog front-end and digital signal processing circuits to extract the desired motion information. The module's gesture engine uses a complex set of algorithms to detect and interpret hand and finger movements, taking into account factors such as speed, direction, and distance.
In addition to gesture recognition, the APDS-9960 module also includes an ambient light sensor and an RGB color sensor. The ambient light sensor measures the intensity of ambient light in its environment, while the RGB color sensor detects the red, green, and blue components of light. These sensors work in a similar way to the photodiodes, but with different types of light. The module communicates with the host microcontroller through either the I2C or SPI interface, depending on the specific module variant. The microcontroller can read the motion and sensing data from the module and use it to perform various tasks, such as adjusting the brightness of displays or controlling smart home devices.
Pinout:
- GND: Ground connection.
- VCC: Power supply connection (3.3V - 5V).
- SDA: I2C data line for communicating with the host microcontroller.
- SCL: I2C clock line for communicating with the host microcontroller.
- INT: Interrupt output pin for indicating when new data is available or a gesture has been detected.
- VL: Not connected
Applications:
- Gesture recognition: The module's gesture engine can detect hand and finger movements, such as swipes, taps, and waves, and interpret them as various types of gestures. This makes it useful for controlling electronic devices hands-free, such as in gaming, automotive, and home automation applications.
- Proximity sensing: The module can detect the presence of nearby objects, such as hands or obstacles, and trigger actions based on their proximity. This makes it useful for touchless interfaces, such as automatic faucets, doors, and dispensers.
- Ambient light sensing: The module can measure the intensity of ambient light in its environment and adjust the brightness of displays or lighting systems accordingly. This makes it useful for energy-saving and comfort-enhancing applications, such as smart lighting and automotive interior lighting.
- Color sensing: The module can detect the red, green, and blue components of light and use them to identify and distinguish different colors. This makes it useful for color detection and identification applications, such as in the printing, painting, and textile industries.
Circuit:
Library:
- Download the SparkFun_APDS9960 library from the SparkFun GitHub repository: https://github.com/sparkfun/SparkFun_APDS9960_Arduino_Library
- Extract the downloaded zip file to a location on your computer.
- Open the Arduino IDE and select "Sketch" from the menu bar.
- Select "Include Library" and then "Add .ZIP Library" from the dropdown menu.
- Navigate to the location where you extracted the SparkFun_APDS9960 library zip file and select it.
- The library will now be added to the Arduino IDE
Code:
Example Arduino sketch that uses the APDS-9960 library to read gesture data from the APDS-9960 sensor and output it to the serial monitor:
#include "Wire.h" #include "SparkFun_APDS9960.h" // Pin definitions #define APDS9960_INT 2 // Needs to be an interrupt pin // Global Variables SparkFun_APDS9960 apds = SparkFun_APDS9960(); int isr_flag = 0; void setup() { // Initialize Serial port Serial.begin(9600); while(!Serial); // Wait for user to open Serial monitor // Initialize interrupt service routine attachInterrupt(0, interruptRoutine, FALLING); // Initialize APDS-9960 if ( apds.init() ) { Serial.println(F("APDS-9960 initialization complete")); } else { Serial.println(F("APDS-9960 initialization failed")); } // Start gesture recognition if ( apds.enableGestureSensor(true) ) { Serial.println(F("Gesture sensor is now running")); } else { Serial.println(F("Gesture sensor initialization failed")); } } void loop() { if( isr_flag == 1 ) { detachInterrupt(0); handleGesture(); isr_flag = 0; attachInterrupt(0, interruptRoutine, FALLING); } } void interruptRoutine() { isr_flag = 1; } void handleGesture() { if ( apds.isGestureAvailable() ) { int gesture = apds.readGesture(); switch (gesture) { case DIR_UP: Serial.println("UP"); break; case DIR_DOWN: Serial.println("DOWN"); break; case DIR_LEFT: Serial.println("LEFT"); break; case DIR_RIGHT: Serial.println("RIGHT"); break; case DIR_NEAR: Serial.println("NEAR"); break; case DIR_FAR: Serial.println("FAR"); break; default: Serial.println("NONE"); } } }
This sketch uses the SparkFun_APDS9960 library to communicate with the APDS-9960 sensor and read gesture data. It initializes the sensor, starts the gesture recognition engine, and waits for interrupts triggered by the sensor. When an interrupt is received, the sketch handles the gesture data and outputs it to the serial monitor. The sketch recognizes six types of gestures: UP, DOWN, LEFT, RIGHT, NEAR, and FAR.
Technical Details:
-
Electrical Characteristics:
- Operating voltage: 3.3V - 5V
- Supply current: 100 mA (max)
- Communication interface: I2C (up to 400 kHz)
Optical Characteristics:
- Proximity detection range: up to 20 cm
- Gesture detection range: up to 10 cm
- Ambient light sensing range: 0.01 lux to 22000 lux
Gesture Recognition:
- Six gesture directions: UP, DOWN, LEFT, RIGHT, NEAR, FAR
- Operating conditions: Low light (< 188 lux) to bright sunlight ( > 10,000 lux)
- Detection speed: up to 10 inches/second
- Detection angle: ±15 degrees
RGB Color Sensing:
- Color sensing with IR-blocking filter
- Red, green, and blue color channels
- 16-bit resolution for each color channel
- Ambient light rejection up to 80k lux
Proximity Detection:
- Detection range up to 20 cm
- Programmable LED drive current for IR emitter
- Smart persistence prevents false triggers
- 8-bit proximity detection data output
Environmental and Physical:
- Operating temperature range: -40°C to +85°C
- Package dimensions: 2.36 x 2.36 x 0.76 mm
- Lead-free, RoHS, and WEEE compliant
Resources:
Comparisons:
the APDS-9960 and the CJMCU-7620 are gesture recognition sensors that use optical sensing technology to detect hand and finger movements. However, there are some differences between the two sensors:
- Sensing capabilities: The APDS-9960 is capable of detecting four different types of gestures (up, down, left, and right swipe) as well as proximity and ambient light. In addition to these, the CJMCU-7620 can detect more complex gestures such as clockwise and counterclockwise circles and "wave" gestures.
- Operating voltage: The APDS-9960 operates at a wider range of voltages (2.4V - 3.6V) compared to the CJMCU-7620 (3.3V).
- Communication protocol: Both sensors use I2C to communicate with the host microcontroller, but the APDS-9960 also supports the SPI interface.
- Availability: The APDS-9960 is a widely-used gesture recognition sensor that is readily available from many different manufacturers, whereas the CJMCU-7620 is a less common sensor that may be harder to find.
- Price: The CJMCU-7620 is generally less expensive than the APDS-9960, which may make it a more attractive option for cost-sensitive projects.