OSRAM TMD2621 Proximity Sensor Module User Guide
- June 9, 2024
- OSRAM
Table of Contents
OSRAM TMD2621 Proximity Sensor Module
Introduction
The TMD2621 features an advanced proximity measurement. The device integrates an IR VCSEL and an advanced VCSEL driver within a compact 4.65 mm × 1.86 mm × 1.3 mm OLGA package.
No. | Item | Description |
---|---|---|
1 | TMD2621 Daughter Card | PCB with TMD2621 sensor installed |
2 | EVM Controller Board | Used to communicate USB to I2C |
3 | USB Cable (A to Micro-B) | Connects EVM controller to PC |
4 | Flash Drive | Include application installer and documents |
Ordering Information
Ordering Code | Description |
---|---|
TMD2621 EVM | Evaluation Kit for TMD2621 |
Getting Started
The software should be installed prior to connecting any hardware to the computer. Follow the instructions found in the Quick Start Guide (QG001016). This loads the required driver for the USB interface and the device’s graphical user interface (GUI). The balance of this document identifies and describes the controls available on the GUI. In combination with the TMD2621 datasheet, the QSG and application notes available on the website, www.ams.com, there should be enough information to allow evaluation of the TMD2621 device.
Hardware Description
The hardware consists of the EVM Controller, the TMD2621 EVM daughter card, and a USB interface cable. The EVM controller board provides power and I2C communication to the daughter card through a seven-pin connector. When the EVM controller is connected to the PC through USB, a green LED lights to indicate the system is receiving power. The LED will be turned off when the GUI program is started. For schematics, layout and BOM information please see the documents located in the TMD2621 EVM folder (All Programs → ams-OSRAM → TMD2621 EVM → Documents).
Software Description
The main window (Figure 3) contains the system menus, system level controls, device information and logging status. The box on the left side of the window controls various system-wide parameters and functions. The Configuration tab contains controls to setup Proximity detection parameters. Configuration changes are disabled when the device is running (Power On box checked). The Prox tab displays proximity data and contains a plot area in which the proximity data is drawn. The application polls the raw proximity data, at a user-defined rate, and displays the result.
Connect Software to Hardware
On startup, the software automatically connects to the hardware. On successful initialization, the software displays a main window, containing controls pertinent to the connected device. If the software detects an error, an error window appears. If “Device not found or is unsupported” appears, verify the correct daughterboard is properly connected to the EVM controller board. If “Cannot connect to EVM board” appears, verify the USB cable is connected. When the EVM controller board is connected to the USB, a green LED lights to indicate the USB cable is connected and providing power to the system. The LED will remain lit until the any software application opens the controller. The light will then be switched off so that it will not interfere with any light measurements. If the EVM board disconnects from the USB bus while the program is running, it displays an error message and then terminates. Reconnect the EVM board and restart the program.
System Menus
At the top of the window there are pull-down menus labeled File, Prox Log, and Help. The File menu provides basic application-level control. The Log menu controls the logging of Prox data, and the Help menu provides version and copyright information for the application.
File Menu
The File menu contains the following functions
The Reread Registers function forces the program to re-read all of the control registers from the device and display them on the screen. This does not read the output data, because the program reads those registers continually while it is running. Click on the Exit command to close the main window and terminate the application. Any unsaved log data is cleared from memory. The application can also be closed by clicking the red “X” in the upper right hand corner.
Prox Log Menu
The Prox Log menu controls the logging of Proximity data and saves the log data to a file. Log data accumulates in memory until discarded or written to a data file.
Click Start Logging Prox to start the logging function. Each time the program polls the output information from the device, it creates a new log entry showing the raw data values, the values of various control registers, and the values entered by the user into the text fields near the bottom rightcorner of the window. Click Stop Logging Prox to stop the logging function. Once logging stops, the user may store the data in a file, or continue collecting additional data by clicking Start Logging again. The Log a Single Prox Entry command causes logging to start, collect one single entry, and immediately stop again. This function is not available when logging is already running.
Click Clear Prox Log to discard any previously collected data. If there is data in memory, which has not been saved to disk, this function displays a prompt asking to verify it is OK to discard the data. If the log is active when this function executes, the log continues running after the existing data is discarded. Click Save Prox Log to save the collected log data to a csv file. This stops the logging function, if it is active, and displays a file dialog box to specify where to store the logged data. The Log Status and Control Information section below describes the default file name, but you may change the file name if desired.
Help Menu
The Help menu contains a single function: About.
The About function displays a dialog box (Figure 7) showing version and copyright information for the application and library. Click the OK button to close this window and continue.
System Level Controls
Immediately below the top menu bar there are checkboxes used to control the system level functions of the TMD2621 device. The Power On checkbox controls the PON function of the TMD2621. When this box is checked, the oscillator is on and the device is running measurements according the settings in the System Level Controls and the Configuration tab. When the device is running, the Configuration tab and System Controls are disabled to prevent changing the settings while the measurement is ongoing. When this box is unchecked, the oscillator is off and the device does not operate. The Configuration tab and System Controls are then enabled and you can change the controls to setup the parameters for next run.
The Enable box contains checkboxes to enable the Prox and Temperature functions. Check a box to enable the function and uncheck it to disable the function. Note that, even though it may be enabled independently, the Temperature function does not operate unless the Prox function is also enabled. If Temperature is enabled but Prox is not, a red error indicator will be displayed beside the Temperature checkbox. The Internal VSYNC checkbox enables the VSYNC signal to be generated internally when an external VSYNC signal is not received at the expected time. Setting the Prox VSYNC checkbox allows Prox processing to be synchronized with the VSYNC signal. Clicking on the Soft Reset or Hard Reset buttons will perform the soft or hard reset operations as described in the datasheet.
Auto Polling
The application automatically polls the TMD2621 raw Prox data. The Poll Interval at the upper right corner of the form displays the actual time between reads of the device. At the bottom center of the screen is a control, Polling Interval, which specifies the time to wait between each poll of the hardware. This control may be set from 15 ms to 10000 ms (10 seconds).
Device ID Information
The lower left corner of the window displays the ID number of the EVM Controller board, identifies the device being used. It also specifies the part number and I2C address of the device and a unique identifier which is stored with any logged data so that you may associate it back to this device.
Log Status and Control Information
The lower right corner of the window contains status information and controls for the logging function
This section contains text boxes that are stored in the log file data and used to build the file name for the log file. If the data in these fields are changed, the new values are stored with any new data logged. The default file name is based on the value in the right-hand textbox, at the time the log file is written. If nothing is entered in the boxes they default to a period (“.”).
The Count value displayed is a count of the number of samples currently in the Prox log buffer.
“Configuration” Tab
The main portion of the screen contains a tab labeled Configuration.
Configuration Controls
The Configuration Tab contains controls that affect operation of the Prox function. The PPULSE control controls the number of pulses that are used for each prox integration. The actual number of pulses is one more than the value of this control and is displayed to the right of the control.The valid settings for this control are from 0 – 63 which corresponds to 1 – 64 pulses. The PPULSE_LEN control sets the length in microseconds of each prox pulse. The length of the actual puse is two more than the value of this control and is displayed to the right of the control. The valid settings for this control are from 0 – 1023, corresponding to 2 μs – 1025 μs. The PGAIN1 and PGAIN2 controls set the value of the Prox Gain stages. The stage 1 gain can be set to 1x, 2x, 4x, 8x, or 16x. The stage 2 gain can be set to 2.5x, 5x, or 10x. The PGAIN2 control includes a setting labeled “Unused”. This value should not be selected and will produce indeterminate results. The PLDRIVE box contains a group of controls which set the drive current for the VCSEL.
- Step specifies the step size in milliamps for the VCSEL driver. You may select 0.5 mA, 1.0 mA, 1.5 mA, or 2.0 mA.
- LDR control sets the drive current based on the step size. The selected step size is multiplied by (LDR + 1) to determine the resulting current. The current is displayed to the right of this control. The LDR control has a range of 0 – 15, providing a current ranging from 0.5 mA to 32 mA based on the setting of the Step control.
- The LDR control also has an associated Enable checkbox. When this box is checked, the driver is active and will be used during prox measurements. If the box is not checked, the driver will be disabled during prox measurements.
The PTIME control sets the rate at which each prox cycle begins when hardware averaging is enabled. The actual time is (PTIME + 1) × 88 μs, and is displayed to the right of this control. If PTIME is set to be less than the actual prox time (determined by PPULSE and PPULSE_LEN), the prox time will override this value. The PTIME control can be adjusted from 0 to 255 which provides times ranging from 88 μs to 22.528 ms. The PWEN control enables the insertion of a wait time between normal prox integration cycles. The PWTIME and PWLONG controls determine the length of the optional prox wait time. If PWLONG is unchecked, the prox wait time is defined as (PWTIME + 1) × 2.779 ms. If PWLONG is checked, the wait time is multiplied by 12. PWTIME can be set from 0 to 255, providing a range from 2.779 ms to 711.424 ms. If PWLONG is enabled, this time extends from 33.348 ms to 8.537 s.
The Binsrch Target control selects the target PDATA value that the calibration function will attempt to reach when calibrating the prox response. The POFFSET control sets the offset value which is applied to the PDATA value to remove the effects of electrical and system crosstalk. POFFSET is set by the device, during the calibration function, or may be manually set to any value within a range of ±255. Clicking on the Cal button will cause the device to perform a calibration. The device will use a binary search method to adjust the POFFSET value so that it produces a PDATA result that is as close as possible to the selected Binsrch Target value. Checking the Auto Offset Adjust checkbox, will cause the device to examine every PDATA value generated. If a PDATA value of 0 is detected, the current POFFSET value will be reduced by 1. When Auto Offset Adjust is selected, the POFFSET control will be disabled and will be read from the device and displayed each time it polls for the normal Prox data results.
The Auto Pulse Control (APC) function can be turned off by checking the Disable checkbox. The APC function should normally be disabled in high crosstalk configurations. The Prox Delay control is used along with the Prox VSYNC control to set a time delay between the VSYNC signal and the beginning of the Prox cycle. The delay time is Prox Delay × 1.357 μs. The value can be set from 0 to 65535 meaning the delay can be up to 88.931 ms. The HW Average control causes the device to average multiple prox integrations for each PDATA output. Using this pull-down menu, you can select to average 2, 4, 8, or 16 values, or disable the hardware averaging function. If enabled, the hardware will use the PTIME value to control how fast the selected number of cycles is collected and will then set PDATA to the average of the collected data.
“Prox” Tab
The main portion of the screen contains a tab labeled Prox. The controls in this tab are divided into two sections, each performing a separate function.
Prox Output Data
The left side of the Prox Tab displays output and status data. This data is polled from the device at the user-specified interval. The actual polling interval is shown in the upper right-hand corner of the screen.
- PDATA displays the latest polled Proximity channel count. Note that the TMD2621 can be configured to run much faster than this program can run, so this field will not display every PDATA value from the device.
- SW Avg is an average of the most recent 32 values polled from the device.
- StDev is the standard deviation of the last 32 values polled from the device.
- Temp is the current temperature reading from the device. This value is only valid if both prox and Temperature are enabled.
- VSYNC indicates the most recent VSYNC period detected. This value is only valid if a VSYNC signal is present.
- VSYNC Lost will be marked when the device detects a missing VSYNC signal
- VSYNC LOST Int will be marked when the VSYNC LOST Interrupt is active.
- Saturation is marked to indicate that some saturation condition has occurred in the prox processing. The Stage 2, Amb Lvl Comp, Stage 1 Amb, and Stage 1 Pulse indicators provide further information regarding the saturation condition. See the Datasheet for an explanation of the meaning of each of these status bits.
Prox Data Plot
The remaining portion of the Prox tab is used to display a running plot of the collected PDATA values. The last 350 values are collected and plotted on the graph. As additional values are added, the old values will be deleted from the left side of the graph. To start the plotting function, check the Enable Plot checkbox.
The scale of the Y-axis of the plot can be adjusted by clicking on the small up and down arrows at the top left corner of the plot. The scale can be set to any power of 2 from 16 to 16384. The Prox and ProxAvg checkboxes control which data is displayed on the plot. Click the Clear Plot button to discard the current data and continue plotting the new data. Note if the Clear Plot button is clicked while the plot is disabled, the data is discarded, but the actual plot will not be updated until the plot function is re-enabled.
Resources
For additional information regarding the TMD2621, please refer to the datasheet. For information regarding the installation of the TMD2621 EVM host application software please refer to the TMD2621 EVM Quick Start Guide.
Designer’s Notebooks dealing with various aspects of optical measurement and optical measurement applications are available. All content is available on the website www.ams.com.
For further information, please refer to the following documents
- TMD2621 Datasheet
- TMD2621 EVM Quick Start Guide (QG001016)
- TMD2621 EVM User’s Guide (this document)
- TMD2621 EVM Schematic Layout
Revision Information
Changes from previous version to current revision v1-00 | Page |
---|---|
Initial version |
- Page and figure numbers for the previous version may differ from page and figure numbers in the current revision.
- Correction of typographical errors is not explicitly mentioned.
Legal Information
Copyrights & Disclaimer
Copyright ams-OSRAM AG, Tobelbader Strasse 30, 8141 Premstaetten, Austria- Europe. Trademarks Registered. All rights reserved. The material herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner.
Demo Kits, Evaluation Kits and Reference Designs are provided to recipient on an “as is” basis for demonstration and evaluation purposes only and are not considered to be finished end-products intended and fit for general consumer use, commercial applications and applications with special requirements such as but not limited to medical equipment or automotive applications. Demo Kits, Evaluation Kits and Reference Designs have not been tested for compliance with electromagnetic compatibility (EMC) standards and directives, unless otherwise specified. Demo Kits, Evaluation Kits and Reference Designs shall be used by qualified personnel only. ams-OSRAM AG reserves the right to change functionality and price of Demo Kits, Evaluation Kits and Reference Designs at any time and without notice.
Any express or implied warranties, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. Any claims and demands and any direct, indirect, incidental, special, exemplary or consequential damages arising from the inadequacy of the provided Demo Kits, Evaluation Kits and Reference Designs or incurred losses of any kind (e.g. loss of use, data or profits or business interruption however caused) as a consequence of their use are excluded. ams-OSRAM AG shall not be liable to recipient or any third party for any damages, including but not limited to personal injury, property damage, loss of profits, loss of use, interruption of business or indirect, special, incidental or consequential damages, of any kind, in connection with or arising out of the furnishing, performance or use of the technical data herein. No obligation or liability to recipient or any third party shall arise or flow out of ams-OSRAM AG rendering of technical or other services.
RoHS Compliant & ams Green Statement
RoHS Compliant: The term RoHS compliant means that ams-OSRAM AG products fully comply with current RoHS directives. Our semiconductor products do not contain any chemicals for all 6 substance categories plus additional 4 substance categories (per amendment EU 2015/863), including the requirement that lead not exceed 0.1% by weight in homogeneous materials. Where designed to be soldered at high temperatures, RoHS compliant products are suitable for use in specified lead-free processes.
ams Green (RoHS compliant and no Sb/Br/Cl): ams Green defines that in addition to RoHS compliance, our products are free of Bromine (Br) and Antimony (Sb) based flame retardants (Br or Sb do not exceed 0.1% by weight in homogeneous material) and do not contain Chlorine (Cl not exceed 0.1% by weight in homogeneous material). Important Information: The information provided in this statement represents ams-OSRAM AG knowledge and belief as of the date that it is provided. ams-OSRAM AG bases its knowledge and belief on information provided by third parties, and makes no representation or warranty as to the accuracy of such information. Efforts are underway to better integrate information from third parties. ams-OSRAM AG has taken and continues to take reasonable steps to provide representative and accurate information but may not have conducted destructive testing or chemical analysis on incoming materials and chemicals. ams-OSRAM AG and ams-OSRAM AG suppliers consider certain information to be proprietary, and thus CAS numbers and other limited information may not be available for release.
- Headquarters: Please visit our website at www.ams.com
- ams-OSRAM AG: Buy our products or get free samples online at www.ams.com/Products
- Tobelbader Strasse 30: Technical Support is available at www.ams.com/Technical-Support
- 8141 Premstaetten: Provide feedback about this document at www.ams.com/Document-Feedback
- Austria, Europe: For sales offices, distributors and representatives go to www.ams.com/Contact
- Tel: +43 (0) 3136 500 0: For further information and requests, e-mail us at ams_sales@ams.com
UG001026 • v1-00 • 2022-Mar-21
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>