The APDS-9960 theory of operation

The APDS-9960 has four directional photodiodes, which are used to detect the reflected infrared light that is generated by integrated IR LEDs. The reflected light can be used to sense motion, such as distance, direction, and even velocity. The APDS-9960 is broken up into several different states that provide capabilities, such as proximity detection, a gesture engine, and color detection. The features that are most relevant to a gesture controller are the proximity and gesture states, which can be used to first sense a hand and then provide relevant data to determine which gesture motion was given to the system.

The most important state included in the APDS-9960 is the gesture engine. The gesture engine is quite flexible and can be triggered either manually or automatically. Automatic triggering is performed by initializing the proximity engine and setting a trigger level that, once exceeded, kicks off the gesture engine. Developers are able to fine-tune the gesture controller by utilizing features such as the following:

  • Ambient light subtraction
  • Cross-talk cancellation
  • Amplifying gain and LED output
  • Energy management
  • Gesture conversion delay

Each application and environment may require minor modifications to these settings in order to fine-tune the APDS-9960 to sense gestures. You can get a feel for the overall hardware capabilities of the APDS-9960 by reviewing the following block diagram:

Interfacing to the APDS-9960 only requires three signal lines. Two signals are used by the I2C for bidirectional communication to set up the APDS-9960 registers and then to read the result registers. The third signal, which is optional, is an interrupt signal that notifies the connected microcontroller that there is gesture data ready to be analyzed. The data is stored as four 8-bit signals that correspond to how much IR energy was reflected and detected by the photodiodes. The data is stored in a first in first out (FIFO) queue, which can store at most 32 readings.

The photodiodes are arranged so that the readings correspond to up, down, left, and right. While you may believe that these correspond to the gesture, they are really just the arrangement of the photodiodes in the APDS-9960. In order to tease a gesture result out of the device, numerous readings need to be acquired and then analyzed based on the readings in all four photodiodes over time.

When the APDS-9960 is first powered up, it enters a low-power sleep mode. It's up to the developer to configure the registers and then power up the device. The I2C can wake the device but it will return to sleep unless the Power ON (PON) bit is set to 1.

At this point, the device enters an idle state but still doesn't run any of the analog engines until its corresponding enable bit is set to 1. Once the APDS-9960 is initialized, it will traverse a state machine based on the way that it is configured. The state diagram for the APDS-9960 is as follows. During each cycle, the APDS-9960 will potentially run each engine, provided that it is enabled:

The datasheet for the APDS-9960 contains several useful diagrams that provide the register settings necessary to get the device up and running in different modes. In general, a developer will want to review the flowchart from the Avago datasheet, which can be seen in the following diagram. The flowchart demonstrates the flow of the code and settings that need to be configured in order to allow each engine to execute:

The Avago APDS-9960 operational flowchart shows how to initialize the device and what settings are necessary to get it to transition into various operational engines.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.135.224