ams TCS3408 ALS Color Sensor with Selective Flicker Detection User Guide
- June 13, 2024
- ams
Table of Contents
- ams TCS3408 ALS Color Sensor with Selective Flicker Detection
- Product Information
- Kit Content
- Ordering Information
- Product Usage Instructions
- Introduction
- Getting Started
- Hardware Description
- Software Description
- Resources
- Revision Information
- Legal Information
- ABOUT COMPANY
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
ams TCS3408 ALS Color Sensor with Selective Flicker Detection
Product Information
The TCS3408 is an ALS/Color Sensor with Selective Flicker Detection. It comes with an evaluation kit that includes the TCS3408 sensor, an EVM Controller Board, a USB Cable, and a Flash Drive. The sensor features ambient light and color (RGB) sensin and selective flicker detection.
Kit Content
The evaluation kit includes the following items:
- TCS3408 Daughter Card: PCB with TCS3408 sensor installed
- EVM Controller Board: Used to communicate USB to I2C
- USB Cable (A to Mini B): Connects EVM controller to PC
- Flash Drive: Includes application installer and documents
Ordering Information
- Ordering Code: TCS3408 EVM
- Description: TCS3408 ALS/Color Sensor with Selective Flicker Detection
Product Usage Instructions
- Install the software by following the instructions in the Quick Start Guide (QSG). This will load the required driver for the USB interface and the device’s graphical user interface (GUI).
- Connect the hardware after installing the software. The hardware consists of the EVM Controller, the TCS3408 EVM daughter card, and a USB interface cable.
- Power up the system by connecting the EVM controller to the PC through USB. The green LED on the board will flash once to indicate power.
- Refer to the GUI for controls and functionalities. The GUI, along with the TCS3408 datasheet, QSG, and application notes available on the ams website, provide sufficient information for evaluating the TCS3408 device.
- For detailed schematics, layout, and BOM information, refer to the documents included with the installation located in the TCS3408 EVM folder (All Programs -> ams -> TCS3408 EVM > Documents).
Introduction
The TCS3408 evaluation kit comes with everything needed to evaluate the TCS3408 . The device features ambient light and color (RGB) sensing and selective flicker detection.
Kit Content
No. | Item | Description |
---|---|---|
1 | TCS3408 Daughter Card | PCB with TCS3408 sensor installed |
2 | EVM Controller Board | Used to communicate USB to I2C |
3 | USB Cable (A to Mini B) | Connects EVM controller to PC |
4 | Flash Drive | Includes application installer and documents |
Ordering Information
Ordering Code | Description |
---|---|
TCS3408 EVM | TCS3408 ALS/Color Sensor with Selective Flicker Detection |
Getting Started
- The software should be installed prior to connecting any hardware to the computer. Follow the instructions found in the Quick Start Guide (QSG). This loads the required driver for the USB interface and also 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 TCS3408 datasheet, the QSG and application notes available on the ams website, there should be enough information to allow evaluation of the TCS3408 device.
Hardware Description
- The hardware consists of the EVM Controller, the TCS3408 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 on the board flashes once on power up to indicate the system is getting power.
- For schematics, layout and BOM information, please see the documents included with the install located in the TCS3408 EVM folder (All Programs -> ams -> TCS3408 EVM > Documents).
Software Description
The main window (Figure 3) contains the system menus, system level controls, device information and logging status. The ALS tab contains controls for the light sensing function. The Prox tab contains settings for the proximity function. The application polls the ALS and proximity raw data continuously and calculates the Lux, CCT, and prox standard deviation values.
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 on the board flashes once on power up to indicate the USB cable is connected and providing power to the system.
- If the EVM board is disconnected 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”, “Log”, and “Help”. The File menu provides basic application-level control. The Log menu is used to control the logging function, 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 those registers are continually read while the program is running.
- The Lux Coefficients menu allows the user to Display, Load or Save the lux coefficients used to calculate lux. See the ALS Lux Coefficients section for more details.
- 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 close by clicking the red “X” in the upper right hand corner.
- Log Menu
- The Log menu is used to control the logging function and to save the log data to a file. Log data is accumulated in memory until it is discarded or written to a data file.
- Click Start Logging 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 right corner of the window.
- Click Stop Logging to stop the logging function. Once logging is stopped, the data can be written to a file, or the user can continue collecting additional data by clicking Start Logging again.
- The Log a Single 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 Log to discard any data that has already been collected. 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 running when this function is clicked, the log continues running after the existing data is discarded.
- Click Save 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 default file nameis described in the Log Status and Control Information section, but the file name may be changed if desired.
- Help Menu
- The Help menu contains a single function: About.
- The About function displays a dialog box (Figure 7) showing the 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 TCS3408 device.
- The Power On checkbox controls the PON function of the TCS3408 . When this box is checked, the power is on and the device can operate. When this box is unchecked, the power is off and the device does not operate (The control registers can still be written, but the device does not function).
- The ALS Enable checkbox controls the AEN function of the TCS3408. When this box is checked, the device collects and report ALS data as programmed. When this box is unchecked, the ALS functions do not operate.
Automatic Polling
The application automatically polls the TCS3408 raw data of ALS and Prox if
enabled. The Poll Interval displays the time between reads of the device.
Device ID Information
The lower left corner of the window displays the ID number of the EVM
Controller board, identifies the device being used and displays the ID of the
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 log file name is based on these values at the time the log file is written. If nothing is entered in these boxes they default to a period (“.”).
- The Count value displayed is a count of the number of samples currently in the log buffer.
- The Elapsed Time value indicates the elapsed time since data logging was started.
“ALS” Tab
The main portion of the screen contains a tab labeled ALS. The controls in this tab are divided into 3 sections, each performing a separate function.
-
ALS Controls
- The left side of the ALS tab contains controls to set various ALS settings.
- The ATIME control sets the steps of the ALS/color integration from 1 to 256.
- The ASTEP control sets the integration time per step in increments of 2.778µs.
- The AGAIN control is a pulldown menu which sets the analog gain of the ALS sensor. The values available are 1/2x, 1x, 2x, 4x, 8x, 16x, 32x, 64x, 128x, 256x, 512x, and 1024x. If the ALS AGC is enabled, this pulldown is disabled so that it
- cannot be updated manually, but will be updated to reflect the most recent automatic gain setting (see ALS Automatic Gain Control, below).
- The WEN checkbox controls the ALS Wait feature. When this box is checked, the values for WTIME and ALS_TRIGGER_LONG are used to determine the time between ALS cycles. When this box is unchecked, there is no wait period between ALS cycles and the values of WTIME and ALS_TRIGGER_LONG are ignored.
- The WTIME control sets the time to wait between ALS cycles. WTIME can be adjusted in 2.778ms steps.
- The ALS_TRIGGER_LONG checkbox control sets the WTIME factor. When this box is checked, the wait time between ALS cycles is multiplied by a factor of 16.
- The left side of the ALS Tab contains a box titled Flicker Detection. This box controls the Selective Flicker Detection function of the TCS3408.
- The Enable checkbox will activate the Flicker Detection function.
- The FD_GAIN field will display the gain value used for the most recent Flicker Detection. This gain value will update automatically as the device adjusts the gain setting for each Flicker cycle.
- The 100 Hz and 120 Hz boxes indicate whether the specified frequency has been detected. Note that, because of the nature of alternating current light sources, the resulting flicker is two times the frequency of the source, so 50 Hz and 60 Hz current sources produce 100 Hz and 120 Hz flicker frequencies, respectively.
- The Disable FD AGC checkbox will disable the automatic gain control for the flicker detection function. The gain level for flicker detection will remain at the current setting as long as it is disabled.
- For the Flicker detection function, AGC is enabled by default.
- The PhotoDiodes control allows you to select which of the photodiodes are used for the flicker function. The default is to use only the F1 photodiode. You can select to use only the F2-IR photodiode, which has a narrower bandwidth (see the datasheet for more information), or you may use both of the photodiodes.
- The lower left corner of the ALS Tab contains a box titled ALS Automatic Gain Control. This allows you to enable the automatic gain function for ALS.
- The Enable checkbox allows you to Enable the ALS AGC function. For the ALS function, AGC is disabled by default, and is set by the AGAIN control.
- The Current AGAIN field will display the gain value used for the most recent ALS cycle. If AGC is enabled, it will display the automatically selected gain. If AGC is disabled, this value will reflect the setting of the AGAIN control when the ALS cycle runs.
-
ALS Lux Coefficients
- The TCS3408 supplies information that is used to calculate Lux (unit of illumination). The Lux equation for the TCS3408 uses a combination of data from the sensor and various coefficients to calculate the Lux value. The software is pre-configured with coefficients for an open-air configuration. When the sensor is placed behind glass, different coefficients should be loaded into the software to update the Lux equation. The coefficients can be loaded or saved to an XML file using the File menu. To ensure the proper XML format first save the current coefficients using File > Lux Coefficients > Save. Once the file is saved locate the XML file created and edit with a text editor such as notepad to change the coefficients. Then go to File > Lux Coefficients > Load and select the XML file that was updated.
- The software can also automatically load new coefficients upon starting the GUI. To do this save the XML file as TCS3408_luxeq.xml in the system documents directory (%USERPROFILE%\Documents, also known as My Documents).
- When GUI is started, you will see a dialog appear with the new coefficients displayed.
- If you are experiencing trouble loading new coefficients, this may indicate a problem with the file format. The XML file must contain all the required Lux equation elements to be loaded. The format of the file follows the standard XML format and is as follows:
-
ALS Output Data
The top right corner of the ALS tab displays the output data. This data is continuously polled. The polling interval is shown above the tab.-
Clear 0 displays the Clear Channel data count.
-
Red 1 displays the Red Channel data count.
-
Green 2 displays the Green Channel data count or the IR Channel counts if IR Mux is checked.
-
Blue 3 displays the Blue Channel data count.
-
Wide 4 displays the Wideband Channel data count.
-
Flicker displays the Flicker Channel data count only if Flicker Detection function is disabled. If
Flicker Detection is enabled, the data is routed to the Flicker function and this field will display 0. -
Lux displays the calculated lux.
-
CCT displays the calculated correlated color temperature.
-
-
ALS Data Plot
- The remaining portion of the ALS tab is used to display a running plot of the collected ALS values and calculated Lux. 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 and select any of the 0, 1, 2, 3, 4, or 5 checkboxes.
- 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 64 through 65536.
“SW Flicker” Tab
- The main portion of the screen contains a tab labeled SW Flicker. This tab controls a software-based demonstration which uses raw flicker data collected by the TCS3408 and a software FFT to detect flickering light and calculate its frequency.
- The data collection that is performed for this demonstration always consists of 128 points of data, collected at a 1 kHz rate (1 data point per millisecond) and processed using a 128-point FFT.
- SW Flicker Controls
- The Go button, when pressed, runs one Flicker detection cycle.
- The Continuous checkbox, when checked, causes the Go button to run Flicker detection continuously, one cycle after another. To stop the cycles, uncheck this box. The dection will stop at the completion of the current collection.
- The FD_GAIN control is a pulldown menu which sets the analog gain of the Flicker sensor. The values available are 1/2x, 1x, 2x, 4x, 8x,16x, 32x, 64x, 128x, 256x, 512x, and 1024x.
- When the Auto control is checked, the software will examine the raw that was collected and determine whether increasing or decreasing the FD_GAIN value is necessary. If a new FD_GAIN value is chosen, it is displayed immediately, but the new FD_GAIN value will not actually be used until the next dataset is collected (either by pressing the Go button, or because the Continuous box is checked).
- The field labeled Flicker Freq will display the frequency of any flicker that is detected. Before the Software Flicker function is run this field will display “n/a”. If no flicker is detected, the field will read “No Flicker Detected.”
- Flicker Data Plot
- The Flicker data plot area will display the 128 raw Flicker data points collected for the Software Flicker. When the Show FFT control is checked, the FFT of these 128 data point will display in red.
- The FFT data consists of 64 magnitude points, but the DC Point is omitted.
- 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 through 512. Setting this scale affects the display of the raw data only – the FFT data, if shown, is scaled differently for every collection. This is because the FFT magnitude data varies greatly from collection to collection and the detected frequency is determined from the highest peak and the relative ratio of the FFT magnitude data, not by its absolute value.
Resources
- For additional information regarding the TCS3408, please refer to the datasheet. For information regarding the installation of the TCS3408 EVM host application software please refer to the TCS3408 EVM Quick Start Guide.
- Designer’s Notebooks dealing with various aspects of optical measurement and optical measurement applications are available.
- Additional Resources:
- TCS3408 Datasheet
- TCS3408 EVM Quick Start Guide (QSG)
- TCS3408 EVM User’s Guide (this document)
- TCS3408 EVM Schematic Layout
- TCS3408 Optical Design Guide
- TCS3408 Proximity Design Guide
Revision Information
- 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 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 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 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 AG rendering of technical or other services.
RoHS Compliant & ams Green Statement
- RoHS Compliant: The term RoHS compliant means that ams AG products fully comply with current RoHS directives. Our semiconductor products do not contain any chemicals for all 6 substance categories, 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): 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).
- Important Information: The information provided in this statement represents ams AG knowledge and belief as of the date that it is provided. ams 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 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 AG and ams AG suppliers consider certain information to be proprietary, and thus CAS numbers and other limited information may not be available for release.
ABOUT COMPANY
- Headquarters
- ams AG
- Tobelbader Strasse 30
- 8141 Premstaetten
- Austria, Europe
- Tel: +43 (0) 3136 500 0
- Please visit our website at www.ams.com
- Buy our products or get free samples online at www.ams.com/Products
- Technical Support is available at www.ams.com/Technical-Support
- Provide feedback about this document at www.ams.com/Document-Feedback
- For sales offices, distributors and representatives go to www.ams.com/Contact
- For further information and requests, e-mail us at ams_sales@ams.com
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>