User Guide UG000400 AS7341 11-Channel Spectral Sensor Evaluation Kit v1 AS7341 EVAL KIT v3-00 • 2019-Mar-08
User Guide
UG000400
AS7341 11-Channel
Spectral Sensor
Evaluation Kit v1
AS7341 EVAL KIT
v3-00 • 2019-Mar-08
Document Feedback AS7341 11-Channel Spectral Sensor Content Guide
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 2
Content Guide
1 Introduction .................................... 3
1.1 Kit Content .................................................... 3 1.2 Ordering Information .................................... 4
2 Getting Started ............................... 5
3 Hardware Description .................... 6
3.1 Hardware Architecture ................................. 6 3.2 Power Supply ............................................... 7 3.3 Connector Pinout Description ...................... 7 3.4 Schematic ..................................................... 9
4 Optical Diffuser ............................ 11
5 Software ....................................... 12
5.1 Software Installation ................................... 12 5.2 Initialization files ......................................... 13 5.3 AS7341 EVM Graphical User Interface ..... 16
5.4 Sensor Board Test ..................................... 17 5.5 Tab File ...................................................... 18 5.6 Tab Log ...................................................... 18 5.7 Menu Flicker Log ....................................... 19 5.8 Main Page .................................................. 19 5.9 Light Detection by Spectral Light
Comparison ................................................ 22 5.10 Flicker Detection ........................................ 25 5.11 Register Mapping ....................................... 27 5.12 Tracer ......................................................... 28
6 Error Messages List .................... 31
7 Revision Information ................... 33
8 Legal Information ........................ 34
Document Feedback AS7341 11-Channel Spectral Sensor Introduction
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 3
1 Introduction
AS7341 EVAL KIT is a platform to evaluate ams AS7341 11-channel spectral Sensor’s applications
and to demonstrate different use cases based on spectral sensing. The EVAL KIT realizes basic
functions to get sensor’s ADC counts based on alternative setups and includes special functions to
demonstrate application specific tasks (Ambient Light Sensing, Flicker measurement and Reflection
mode). Some of these functions need a hardware adaptation (e.g. LED on board for reflection) and/or
mechanical interface which must be ordered separately or adapted by customer.
This user guide describes the features, functions of Windows 10 based Evaluation Kit AS7341 with
GUI, its standard, and application specific functions and gives details for required adaptations.
1.1 Kit Content
The AS7341 Evaluation Kit exists from following items.
Figure 1 :
Kit Content
Item No.: Item Comment
1 FTDI - USB Cable USB – I²C Cable with 10 pol IDC Connector, Variant 3.3V
2 a0013a0_CSS EVAL KIT AS7341
Evaluation Kit with pre-mounted adapter and diffuser
3 USB Data Stick Documents, software, firmware and drivers
4 Special Aperture Diff 25
Optional: CSS 25 mm adapter for LINOS – must be ordered separately
Item 1
FTDI
Item 2
EVAL KIT with Diffuser
Item 3
USB Stick
Item 4 Optional
Special Apertures
Item 5 Optional
Special Adapter
Document Feedback AS7341 11-Channel Spectral Sensor Introduction
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 4
Item No.: Item Comment
5
Special Adapter
EVAL Linios 16
EVAL Linos 16-25
Optional 3D-Printing part, used to adapt the 16mm holder into
● 16mm Linos-Nanobank (above)
● 25mm Linos-Bank (below)
1.2 Ordering Information
Ordering Code Description
AS7341 EVAL KIT AS7341 11-Channel Spectral Sensor Evaluation Kit v1
Aperture Diff 25 Optional CSS 25 mm Adapter plus Diffuser for Evaluation Kit(1)
a001aa_CSS EVAL KIT Linos 16 Optional 3D-Printing part, used to fit the CSS EVAL KITAS7341 into the 16mm Linos-Nanobank(2)
a001ba_CSS EVAL KIT Linos 16-25 Optional 3D-Printing part, used to adapt the 16mm holder into the 25mm Linos-Bank(3)
(1) This special adapter replaces the standard adapter on front of the Sensor board by loosening the screws at the mounted
adapter, removing the old adapter and mounting the new adapter on the board. Be careful with the single optical parts
like diffuser and holders and observe our notes at the package inserts.
(2) Must be mounted at the backside of the Sensor board - observe our notes at the package inserts
(3) Accessories of a001aa_CSS EVAL KITEVAL-Linos 16, must be ordered together - observe our notes at the package
inserts
Attention
Order optional parts separately.
Information
It is also possible to print or modify the a001aa0_CSS EVAL KIT Linos 16.STEP and the
a001ba0_CSS EVAL KIT Linos 16-25.STEP. See the document path of the USB Stick.
Document Feedback AS7341 11-Channel Spectral Sensor Getting Started
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 5
2 Getting Started
The Evaluation Kit exists from the FTDI USB cable and the Evaluation board with pre-mounted
adapter for diffuser, which is necessary to fulfil the optical requirements of the AS7341 filter
specification.
The Evaluation board has an I²C interface. A FTDI cable and adapter converts I²C to UART with USB
interface.
Figure 2:
AS7341 EVAL KIT with Sensor and Evaluation Board and Pre-Mounted Diffuser
Plug the FTDI cable into the socket of the Evaluation board and connect the kit via USB to PC.
The Evaluation Kit requires a onetime installation of FTDI Virtual COM Port Driver for the USB cable.
The installation files for the FTDI adapter were on the USB Data Stick in the setup directories. Please
install it as an administrator.
If there is an issue about the installation, please read our AS7341 Quick_Start_Guide on USB stick or
refer to www.ftdichip.com for more information.
Install the AS7341 Software from the AS7341_Software.msi on the USB Data Stick.
Please see chapter 0 for the software handling and description.
Document Feedback AS7341 11-Channel Spectral Sensor Hardware Description
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 6
3 Hardware Description
The Evaluation Kit was designed to work as an attachment board for a 1/10inch hole-grid-plate, or it is
mounted with an adapter to an optical bench. Adapters for 16mm/25mm systems are available as
accessories from ams.
3.1 Hardware Architecture
The Evaluation Kit includes an LDO to provide the 1.8V supply voltage for the AS7341. ESD
protection diodes for the I²C bus and GPIO lines. Placeholder for optional LEDs. The LEDs (optional,
must be soldered by customer) can be supplied either from the FTDI adapter or externally via
connector TLP1. A 10 pol. IDC socket for connecting the FTDI adapter cable (J1) and 1/10 inch rows
of holes for mounting on a 1/10inch hole-grid-plate or to directly contact signals (TLP1...2).
Figure 3 :
Board Block Diagram
Document Feedback AS7341 11-Channel Spectral Sensor Hardware Description
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 7
3.2 Power Supply
Power supply is provided in general by the FTDI cable version 3.3 V. This adapter is part of the
original AS7341 Evaluation Kit. Alternative power supplies are prepared on board.
Information
Make sure to use the original adapter before connecting the hardware to USB.
3.3 Connector Pinout Description
The following chapter describe the pinout of the a0013a0_CSS EVAL KITAS7341.
Figure 4 :
Connector Pinout Description
Figure 5:
Overview Connectors and Interfaces (see Figure 4)
Designator Comment
J1 10 pol. IDC Socket, connect to a personal computer via FTDI Adapter (3.3 V Version)
TLP 1 VEXT, LDR, GND
TLP 2 3V3 (5V0), I²C, INT, GPIO
TLP 3 GND
Document Feedback AS7341 11-Channel Spectral Sensor Hardware Description
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 8
Figure 6:
Connectors in Detail
Pin Number Net Name Function
TLP1
1 VEXT Supply the optional fitted LEDs from an external source
2 GND Ground
3 LDR Constant current sink from AS7341
4…9 NC Not connected
10 1V8 External power supply for AS7341. Before using this pin, disassemble the LDO.
TLP 2
1 GND Ground
2 NC Not connected
3 3V3 3V3 power input if there is no power on J1 (FTDI adapter) or 3V3 power output, if the power comes over J1
4 GND Ground
5 SDA I²C Data Signal
6 SCL I²C Clock Signal
7 INT AS7341 Interrupt Signal
8 GPIO 2 GPIO signal, bridged to the FTDI adapter
9 GND Ground
10 GPIO 3 GPIO signal, bridged to the FTDI adapter and the AS7341
11 SDA2 Is normally bridged to SDA, only needed for FTDI adapter
TLP 3
1..5, 7..10 NC Not connected
6 GND Ground
J1
1 NC Not connected
2 3V3 3V3 power input from the FTDI adapter
3 GND Ground
4 SDA I²C Data Signal
5 SCL I²C Clock Signal
6 INT AS7341 Interrupt Signal
7 GPIO 2 GPIO signal, bridged to TPL 2
8 GND Ground
9 GPIO 3 GPIO signal, bridged to the AS7341
10 SDA2 Is normally bridged to SDA, only needed for FTDI adapter
Document Feedback AS7341 11-Channel Spectral Sensor Hardware Description
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 9
3.4 Schematic
Figure 7 shows the schematic and the assembly of the AS7341 EVAL KIT.
Figure 7 :
Schematic
Document Feedback AS7341 11-Channel Spectral Sensor Hardware Description
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 10
Document Feedback AS7341 11-Channel Spectral Sensor Optical Diffuser
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 11
4 Optical Diffuser
For optimal performance, an achromatic bulk diffuser is recommend. The diffuser should be placed
directly above the Sensor device.
Note that the diffuser specification is depending on the customer application. Therefore, check the
technical parameters of the standard diffuser (see Figure 8 for technical details) before you start
any tests. The diffuser can be changed very fast and easy. Be careful and do not touch the
diffuser and try to omit any contamination on it in case in case of any mounting activities or other
operation. The surface of diffusers is very sensitive and any touches or other mechanical stress or
dirt can change the optical behavior dramatically.
A recommend diffuser1 mounted on the AS7341 Evaluation kit board is direct above the Sensor by
using two simple plastic shells, which are fixed on the evaluation kits by screws.
Figure 8 displays the recommend diffuser parameters.
Figure 8:
Diffuser Parameters
Parameter Value
Diffuser Material Kimoto 100 PBU
Diffuser Thickness 125 microns
Transmission 66%
Haze 89.5%
Half-Angle 35.5°
1 Contact our Support/sales team for alternative diffuser and adapters and/or see Chapter 1.1.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 12
5 Software
5.1 Software Installation
The GUI AS7341 is for Windows 10 based systems where .net Framework 4.5.2 or later versions is
pre- installed. Before connecting the FTDI adapter to the computer, the FTDI driver must installed.
Start the CDM21216_Setup.exe and follow the instructions. Then connect the Evaluation board to the
computer via the FTDI adapter. Start the GUI Installation software from USB stick AS7341_Demo_
Software.exe (*.msi) and then the GUI from the program directory. Now, it should show the Main
Window and the successful connection to the EVAL board in the status bar and footer line. The GUI
needs some initialization files, which will be installed during the installation process in the user
directory c:\Users\xxx\AppData\Roaming\ams AG\AS7341 Demo\. For more details, see chapter 5.2.
Figure 9 :
Main Window in GUI and Status Bar
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 13
5.2 Initialization files
The initialization files supply important parameters for the GUI, which can be adapted by customer. A
changing of any specified parameters can change the Sensor results and accuracy. Therefore, we
recommend making a copy from the initialization files before changing. Change the parameters step-
by-step to see the effects of each adaptation.
The following initialization files2 are in the directory C:\Users\xxx\AppData\Roaming\ams AG\AS7341
Demo after installation the GUI:
● init_file.txt - necessary for all GUI functions. It includes values to control functions and
limitations, e.g. Sensor signal correction, light detection.
● // comments - are not considered by the GUI and can be done as any comment
● xxxxxFiles = “xxxxxx” – are the standard or user defined files for calibration, spectral compare
and other functions which are used by the GUI
● OffSet: can be used to adapt RawCounts. The specified factors for the single channels F1…F8,
Clear and NIR in the init_file will be subtracted from the measured RawCounts (results from the
analog-to-digital converter) before they will be calculated into BasicCounts. Use the offset
correction for example to compensate ambient light. These factors affects direct the spectral
calibration, reconstruction, comparison and all CIE1931 calculations.
● CorrectionFactor - can be used to adapt RawCounts. The specified factors for the single
channels F1…F8, Clear and NIR in the init_file will be multiplied with BasicCounts. Use this
correction factor for customized calibration or to compensate effects of diffusers. These factors
affect direct the spectral calibration, reconstruction, comparison and all CIE1931 calculations.
● corr_lx: conversion factor from Y (based on the calculated XYZ from corrected spectrum) to
Y(lx). This factor affects only the output of the results for Y(lx).
● limit_Compare: in percent is to stop the spectral comparison in case of no spectral mask was
found with a difference smaller than the specified value compared with the actual measured
Sensor results.
● Delta_uv / LowerLimit_u / UpperLimit_u / UpperLimit_v / minCCT / maxCCT:specifies the
parameters which are the conditions and limitations for CCT calculations based on MacCamy
algorithm (see Figure 10). These values affect direct the CCT calculation.
2 Change the AppData directory properties in case of the directory or subdirectories are not visible or readonly
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 14
Figure 10 :
Limitations in init_file for CCT Calculations Based On McCamy Algorithm
The CM_L1_v1_0_0.csv file includes the Correction Matrix CM for light detection. The matrix is part of
the software setup and represents a general solution for demonstration AS7341 EVAL Kits. It is based
on the specified AS7341 filter definitions and does not consider any real existing series deviations.
Therefore, deviations in the sensor results compared with spectrometers are possible3.
The correction matrix converts the BasicCounts (Sensor results F1…F8+NIR) to an interpolated
spectrum between 380nm and 700nm. This spectrum can be used to detect the type of luminary in
front of Sensor or in combination with the CIE1931 standard to calculate xy, u’v’, Y (lux), CCT and
CRI. Note, the functions ‘spectral compare’ and ‘CIE1931 calculations’ are highly depending on the
application, calibration, external conditions, etc. The higher the deviations from calibration, the lower
the accuracy. Therefore, the Correction Matrix CM as part of the delivery is only to demonstrate the
process of correction in the GUI. This matrix must be adapted by the customer to get a high accuracy
but should fulfil the form and mask of the existing CSV file (e.g. min and max wavelength, numeric
formats, number of columns and number of lines). The Correction Matrix CM will correct the
BasicCounts and affects all results of the light detection and spectral comparison. Its result is the
Sensor spectrum as basic for CIE1931 calculations and for light detection.
3 Calibration, effort and accuracy is always depending on the customer specific requirements. Use alternative calibration methods to increase accuracy in general. A device to target calibration, where sensor and reference values are calculated to get the device specific correction matrix, will achieve the highest accuracy. A good compromise between effort and accuracy is use the general calculation matrix with a peak adjustment to a Golden device before.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 15
Mask_L_v1_0_0_.csv - is used for spectral comparison. The spectral masks are initialized which are
compared with the corrected Sensor results. Each mask will be checked for deviations to the actual
Sensor spectrum. The recognized luminary is the mask with the smallest deviation in the mask file or
the process will stop without recognition in case of all calculated deviations are greater than
‘limit_Compare’ (see 5.2 init_file). It is possible to create or adapt the mask file in the GUI. The
dimensions of the mask file is depending on the corrected Sensor values and Correction Matrix CM. In
general, they are a unit and are only valid together. Changings in the Correction Matrix CM will result
an adaptation of the mask file.
Figure 11:
Example for INIT_FILE.TXT
//Light detection calibration matrix file
LightDetectionCalibrationMatrixFile = "CM_L1_v1_0_0.csv"
//Light detection mask file
LightDetectionMaskFile = "Mask_L_v1_0_0.csv"
//OffSet values decreases Basic values - reflection - daylight balance
//OffSet=14.68701168,4.431111111,1.7441773,1.493510912,0.831476535,0.575966812,0.534881552,0.522365412
// Correction factor of Raw values lighting based on Golden Device
//CorrectionFactor=1.220252502,1.192227764,1.156684339,1.035860414,1.088654536,0.932603294,0.982070346,1.101085787,1.138610071,1.25934616
CorrectionFactor=1,1,1,1,1,1,1,1,1,1
//Correction factor for gain error
//0.5x,1x,2x,4x,8x,16x,32x,64x,128x,256x,512x
//CorrectionGain= 1.000,0.998,0.995,1.001,0.969,0.994,0.990,0.988,0.998,0.977,0.958
//correction factor to correct Y as Lux from CIE1931 Y
corr_lx = 683.0
//distance du'v' spec and sensor
Delta_uv= 0.2000
//Lower Limit of u'
LowerLimit_u= 0.1807
//Lower Limit of v'
LowerLimit_v= 0.3988
//Upper Limit of u'
UpperLimit_u= 0.3624
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 16
//UpperLimit of v'
UpperLimit_v= .5408
// Minimum CCT
minCCT= 2000
// Maximum CCT
maxCCT= 7500
//Stop Spectral compare in case of error(%) is greater than
limit_Compare= 50
5.3 AS7341 EVM Graphical User Interface
Connect the AS7341 hardware to the system via a FTDI cable and double-click the software icon to
open the software GUI. If there are more than two FTDI cables connected to the computer, it would
popup the window as below Figure 12.
Figure 12 :
Window for FTDI Cable Selection if Multiple FTDI Cable Connected
Please select the correct cable used for the evaluation board and click “OK”. If there is only one FTDI
cable, the software will automatically select the connected cable.
When everything with the connection is fine, a GUI window will launch automatically with the Sensor
connected to the PC as in below Figure 13. The GUI consists of different parts as marked in colored
rectangles. The bottom section will display the status of FTDI connection, FTDI cable series number,
Sensor auxiliary ID, revision and part number.
Check the part number includes any 0x-code in case of any issues. A code 0x zero will point to a not
connected Sensor hardware. In case of an issue, check the USB driver installation and connections
start the software again or use the scan function in menu File.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 17
5.4 Sensor Board Test
To check the function of the EVAL KIT AS7341, set (see Figure 9) AGAIN = 256x, ATIME = 0, ASTEP
= 65534 (TINT = 182 ms) and start the measurement by pressing the "Read Once" button under
"Measurement" on the "Main" tab. Now one measurement step is running and it should show
measured values in the table based on Sensor’s location to a luminary in front of the Sensor. Change
integration time (ATIME ad ASTEP) and AGAIN to change the digits based on application
requirements.
More details about Sensor functions and the parameters are listed in Sensor’s data sheet or later in
this manual.
Figure 13 :
First Sensor Board Test
Select one of the Plot options Line Graph or Spectrum to see the results as graphical output. You can
adapt and correct the spectral result by using ‘CorrectionFactor’ or “OffSet’ (see 5.2 init_file). A second
(BasicCounts) and third graph (corrected counts) is shown in case of any corrections.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 18
Figure 14 :
Sensor Results as Spectrum
5.5 Tab File
The GUI will automatically open, when launching the software. If no device is connected, an error
message will pop up.
The GUI starts showing a red indicator at the bottom section of the FTDI connection. Now connect a
device, navigate to the file tab in top corner of the GUI and click “Scan and Connect”. The GUI will
relaunch with the device connected. Use the “Disconnect” button to terminate the connection. “Exit”
button to end the GUI application.
5.6 Tab Log
The ‘Log file’ is to store Sensor setup and data in a CSV data Excel format. Click ‘Start Logging’
and/or ‘Stop Logging’ to select the samples and close up the process by ‘Save Log’ to store the CSV
file and/or ‘Clear Log’ to delete the sampled Log data.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 19
Figure 15 :
Example CSV Logfile
5.7 Menu Flicker Log
The Flicker Log functions are identical to the menu Log functions. The only difference is that they
solely store the Hardware Flicker data.
5.8 Main Page
The main page (see Figure 9) contains the user interface with control buttons, fields, selection boxes
and output values for the identified device connected.
The main page allows configuring the AS7341 device and initializes the default setting to the devices.
It allows the user to modify and configure the Integration time setting, Gain setting, LED setting, Auto
zero, SMUX Configuration, Optimized gain control and some application specific AS7341 functions
and demos.
Integration Time: Integration time is one parameter to affect the Sensor result = digital counts or
digits. The higher the counts, the better the’. Note, the integration time affects direct the saturation
(FSR 16 bit = 2^16 is reached for first time at 182 ms = 2.78 µs * 2^16).
The integration time is set using ATIME (0x81) and ASTEP (0xCA, 0xCB) registers. The integration
time is in millisecond. It is calculated using the equation -
𝑡𝑖𝑛𝑡 = (𝐴𝑇𝐼𝑀𝐸 + 1) × (𝐴𝑆𝑇𝐸𝑃 + 1) × 2.78 μ𝑠
The integration time parameter like the ATIME and ASTEP can be set by clicking the up or down
arrow button. ATIME sets the number of integration steps from 0 to 255. Sets the integration time per
step in increments of 2.78 μs. ASTEP sets the integration time from 1 to 65534 steps.
The default configuration in GUI for these two registers are ASTEP = 0 and ATIME = 65534, which
results in an integration time of 182ms. The sensor specification does not allow both settings –ATIME
and ASTEP – are set to “0”.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 20
Gain Setting: Gain is the second parameter to affect the Sensor result = digital counts.
Information
The higher the counts, the better the accuracy. Therefore, select always between changings of Gain
and TINT in the parameter setup to get an optimized result and avoid measurements nearly in noise
or with risk of saturation. The optimized working range is between 40% and 80% of FSR depending
on TINT.
The gain control allows the user access to the gain settings in the 0xAA Register (4:0 bits). The gain
amplifies the 6 integrated ADCs signal to increase sensitivity. The gain options include 0.5x, 1x, 2x,
4x, 8x, 16x, 32x, 64x, 128x, 256x, and 512x. These can be selected from the list box when the down
arrow is pressed.
Enable “Optimized Gain” to switch on an algorithm of the GUI, which analyzes an optimal gain setting,
based on the pre-selected integration time. The algorithm starts always with the highest gain and
check with this setup for saturation depending on the SMUX configuration. The algorithm will decrease
gain in case of any saturation and start the check again until no saturation is achieved. In this case,
the algorithm fixes the actual gain as optimized gain. Otherwise, an error message will printed out in
case of no gain without saturation was found with the selected integration time. So happen, adapt
integration and starts the process again.
Information
A higher integration makes the Sensor response lower. The Sensor must measure n-times to find
an optimized gain. Therefore, do not increase integration time (result from multiplying ATIME and
ASTEP) too much or accept longer a response time.
User can also set a maximum gain value to consider for the Optimized Gain control in Max GAIN list
box.
Wait Time: WTIME enable check box enables or disables the WEN bit in ENABLE register (0x80).
When it is checked, the wait time between two consecutive spectral measurements is enabled.
Unchecking disables WTIME. WTIME can be set by using the up or down control button.
Wait time is calculated as
Wait time = (W𝑇𝐼𝑀𝐸 + 1) × 2.78 μ𝑠
WTIME is 8-bit value sets the number of steps from 0 to 255. Sets the wait time per step in increments
of 2.78 ms with a maximum value of 711 ms.
The measurement after enabling will be also depended on the WLONG.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 21
WLONG: Enable or disable the WLONG bit (bit 2) in 0XA9 register. When asserted, the wait time
WTIME is increased by a factor 16x.
LED Setting4: Check Enable for switch on the LED and set LED currents. Enabling or disabling the
LED_ACT bit (bit 7) of register 0x74. The current can be set using the up-down control on
LED_DRIVE bits (6:0) of register 0xB1. It has a range from 4 mA to 258 mA.
SMUX Configuration: The device integrates a multiplexer (SMUX). With the SMUX, it is possible to
map all available photo diodes to one of the six available light to frequency converter (ADC0 to ADC5).
After power up of the device, the SMUX needs to be configured before a spectral measurement is
started. Here the SMUX configured to three different modes where user can see the corresponding
selected channels in the selected mode.
Measurement Setting: Select ‘Read once’ or ‘Read Continuous’ to measure step by step or in
continuous mode (alternative with a specified number of steps) and/or to stop a continuous mode after
n steps. The ADC results are printed after each measurement as numeric values presenting RAW or
calculated BasicCounts or CorrectedValue.
RawCounts are represent the counts from the ADC depending on the used setup (SMUX
Configuration, Gain, Integration time, LED-current etc). The basic value is calculated on base of the
RAW measurement values and the corresponding again and integration time at that time to get
Sensor results not depend on the parameter setup (gain, TINT).
BasicCounts = (RawCounts) / (gain * tint_ms)
Note, the BasicCounts values must be considered/defined/calculated application specific, especially in
case of a dynamic conversion and during algorithm’s for Sensor corrections.
4 The standard delivery form of the AS7341 EVAL KIT does not include a LED on board but allows a soldering of suitable LEDs on pre-designed pads. Then the GUI supports all required LED functions like switch on/off and driver settings. More details are given in the documents for the reference design and or contact direct our supplication team.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 22
5.9 Light Detection by Spectral Light Comparison
Light detection identifies type of light, peak, CCT, lx and other spectral and color results based on a
reconstructed spectrum of the spectral Sensor results. The function opens a new pop-up window and
includes the calibration of the adapted and corrected BasicCounts, the output of the Sensor spectrum
as vector and graphic, the light detection and the output of the calculated CIE1931 based results.
Figure 16 shows the pop-up window, which can be closed by deactivating this function.
Figure 16 :
Pop-Up Window Light Detection by Spectral Light Comparison
The left side of the pop-up window shows a vector with wavelength and Sensor results. They
represent the spectral curve of the measured light. Data’s from the vector can be copied direct to
another window tools but check the used Windows notation for “,” or “.” in conjunction with their
Windows format. The Correction Matrix CM determines the wavelength and step size of this vector
and following matrices e.g. masks for spectral comparison. On the top of the pop-up windows are the
results of all CIE1931 calculations. All results are depending on application, its conditions, deviations
and other effects. For more details, see chapter 5.2 or our application specific notes for Sensor
calibration.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 23
Figure 17 :
Process Flow Light Detection
Setup
Measure Dark
or other effects
Corrected
BC NIR
ADC RAW
Counts
Basic
Counts
Mapped
with CM
Mapped
Sensor
results
Corrected
Offset
CM files
CIE1931
CCT
XYZ
Xy
CCT
...
= Mask? Mask file
Light type
Peak
...
Teach
Initial list
Measure
Step /
continues
ProtocolSpectral graph
repeat
Process Flow Light Detection
Setup
Gain / TINT
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 24
The block Detection shows the identified light source and its deviation in percent (based on “1”
normalized curves). The diagram inserts the Sensor spectrum and the spectrum of the identified
mask.
Light Detection will not recognize a light source in case of none existing mask file but works for the
CIE1931 calculations. The diagram will show the reconstructed spectral curve. Pressing ‘Add Mask’
will add spectrum as new mask by given name. This new mask will be active temporary and can be
used until program end. The mask will only be inserted to the mask file by using the ‘Save’ button.
Non-overlapping curves indicate deviations. There reasons are deviations of luminaries or mixed light
sources, any tolerances, drifts over time or shifts over temperature, different field of views and others.
Add a mask by adding the new spectral curve under the same name.
Figure 18 :
Spectral Light Comparison
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 25
5.10 Flicker Detection
Light sources may modulate at different frequencies as their power supply this cause the flicker of the
light source. Usually, light sources such as fluorescent tubes or incandescent bulbs flicker at the
frequencies proportional to their power supply. AC flicker caused by an alternating current power
supply that has supplied power varies at a frequency of 50 or 60Hz. Since the brightness of the light is
strongest at the positive and negative extremes of the power supply, the frequency of the light
flickering is doubled to 100 or 120Hz. The AS7341 device is integrated ambient light flicker detection
on chip. In the GUI, two types of flicker detection methods are implemented – Hardware and FIFO
methods as shown in the figure below. This window pop up when clicking the Flicker detection in main
window. This disables in the same time the ALS measurements in main window.
Figure 19 :
Flicker Detection - FIFO
By default, the FIFO method of flicker detection is selected and Flicker detection default integration
time, gain and threshold are configured. The FD Integration Time can be set by clicking the up and
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 26
down arrow or by setting a value and pressing enter. The respective integration time is calculated
based on the formula ((Fd_time +1)*2.78) and displayed in ms. The Gain can be picked by choosing
one of values 0.5x, 1x, 2x, 4x, 8x, 16x, 32x, 64x, 128x, 256x, and 512x from the selection list.
Similarly, FD Threshold can be selected as 1, 4, 8 and 16. FD Time and FD Gain defines the sampling
rate, amplitude of counts and the maximum number of counts.
Click the “Read Once” button and Flicker detection graph is updated with current samples of FIFO
data bytes. The output of the flicker channel in counts (raw data) is plotted against the corresponding
sample the number in the primary Y-axis (left) and X-axis respectively (bottom) as the red colored
graph. Clicking the “Read Continuous” button will keep updating the FD samples. If the “Stop after”
checkbox selected and number of samples mentioned, then the mentioned samples are measured
beginning with pressing “Read Continuous”. The phrase “Samples taken” shows the number of
finished measurements. In a single cycle, Fifo_Lvl samples gives the maximum number of FIFO
entries (each 2 Bytes) read out either before the overflow flag goes high or the maximum sample
taken is less than 250. The sample levels added up back to back on consecutive measurement.
Sampling Frequency is the reciprocal of the Flickering integration time. FD Saturation flags shows the
status of the saturation flag bit like FiFo overflow, FD trigger, FDSat_Analog and FDSat_Digital.
Fourier analysis converts a signal from its original domain (often used) to a representation in the
frequency domain. Selecting the FFT checkbox computes the Fast Fourier Transformation and
enumerates the discrete results graphically. The FFT plot represented in blue with the amplitude of
FFT in secondary Y-axis (top) and Frequency represented in the secondary X-axis (right). The
“Refresh” button clear out the last measurement data and plot. Selecting the “Flicker Detection -
Hardware” checkbox enables the hardware flicker detection and disables the FIFO method of flicker
detection as shown in figure below
Figure 20 :
Flicker Detection - Hardware
Hardware flicker detection detects the presence of 100Hz and 120 Hz flickering. “Read Once” button
displays the status of flicker in “Flicker status”. The corresponding bit in FD status register exhibited
as “FD Status Bits”. Clicking the “Read Continuous” button will keep updating the FD samples. If the
“Stop after” checkbox selected and number of samples mentioned, then the mentioned samples are
measured upon pressing “Read Continuous”. Samples taken shows the number of finished
measurements.
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 27
5.11 Register Mapping
The “Register Table” page lists and allows writing all I2C registers values with the address, the name
and information about authorization to read or write.
Figure 21 :
Register Mapping Table
Click the “Read values from Sensor” button to update the whole table. It is recommend updating the
table when coming to or leaving this page. Write a value to a register by clicking the “Current Value”
cell that corresponds to the register and typing a new value into the cell. Then click the “Write values
to Sensor” button to program value into the device. After the update, by clicking the “Read values from
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 28
Sensor” button the value in the register is refreshed and confirmed. Use the “Save register table” to
make an external copy of all register and values into a csv-file.
Information
The application synchronizes the changes on the Main Page and the Register Table Page
automatically.
5.12 Tracer
The Tracer controls the software process by using pre-designed scripts in txt format. Such scripts can
be loaded, saved, proceeded or cleared. Log is a protocol function and cab be saved or cleared.
Figure 22 and following show the Window Tracer with an example code for a pre-designed script with
log.
The following commands are implemented in the actual Tracer function:
Load Script: read the pre-designed text file or saved script
Save Script: save the current script
Run Script: execute the current script,
Clear Script: delete the text of the script text box,
Save Log: save the current log (right text box) file,
Clear Log: delete the text of the log text box.
Execute read, write commands and pauses by using the following syntax:
Read: "R Register_Address" or "r Register_Address" (e.g. "R 80")
Write: "W Register_Address Register value" or "r Register_Address Register value" (e.g. "R 80 00")
Pause: "PAUSE Time_ms" (e.g. "PAUSE 1000" -> A pause of 1000 ms)
#Comment: -> e.g. "# Reading register 0x80"
Information
Register address and register value are always specified as hexadecimal numbers without 0x.
Comments can be placed directly behind a command or in a new line. Upper and lower case is
neglected
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 29
Figure 22:
Tracer Window with Example Code
Document Feedback AS7341 11-Channel Spectral Sensor Software
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 30
Figure 23:
Sample Script
Figure 24:
Sample Script Log
R 80 #Initial read of register 0x80
#Write 0 to register 0x80
W 80 0
PAUSE 2000
R 80
#Write 3 to register 0x80
W 80 3
PAUSE 2000
R 80
# R 80 03
# W 80 00
# PAUSE 2000 ms
# R 80 00
# W 80 03
# PAUSE 2000 ms
# R 80 03
Document Feedback AS7341 11-Channel Spectral Sensor Error Messages List
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 31
6 Error Messages List
Error Message
Explanations
Error during connecting the device:
An error occurred during connecting the FTDI device
Need to check the FTDI connection between the sensor and the USB port and make sure that the FTDI cable or sensor are not faulty
An error occurred during scanning for FTDI devices
Need to check the FTDI connection between the sensor and the USB port and make sure that the FTDI cable or sensor are not faulty
Analog Saturation: Intensity of ambient light has exceeded the max int level for the spectral analog circuit
Indicates analog saturation, reduce the light intensity, integration time or gain to overcome the saturation
Digital Saturation: The maximum counter value has been reached
Indicates digital saturation, reduce the light intensity, integration time or gain to overcome the saturation. The maximum value range 65635 is reached
Digital and analog saturation has been reached Indicates both digital and analog saturation reached, reduce the light intensity, integration time or gain to overcome the saturation
Status SP_TRIG Error: WTIME is too short for the selected TINT
Spectral Trigger error: Indicates that there is a timing error. WTIME is too short for the selected ATIME. Increase the WTIME to overcome this issue
Error during reading the register value While reading the register value from the sensor an error has been occurred
Error during setting Power On Error occurred set the PON bit in the Enable register (0x80). Disconnect the device and try again
Error during enabling or disabling the spectral measurement
Error during enabling or disabling the spectral Enable bit in Enable register (0x80)
Error during writing the configuration Error while writing the SMUX configuration
Error while starting the SMUX command Error while starting the SMUX command
An error occurred during enabling or disabling external LED
Setting the LED current produces an error
Status Over Temperature Detected: Device temperature is too high.
Over temperature detected, the device temperature is too high
Cannot detect the optimal gain. Please change the settings
The optimal gain was out of range, need change the settings for an optimal gain
Unequal number of Correction factor in init_file.txt The entered number of correction factor should be cross checked in init_file
Document Feedback AS7341 11-Channel Spectral Sensor Error Messages List
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 32
Error reading light detection light source matrix file:<file location >
Input string was not in a correct format
Crosscheck the corresponding file data. The data entered may be not in correct format or mismatching in the index
File Opened Error! Another process opens the log file to which the data is saved. Do not open the file between the measurement logging.
The init file: init_file.txt was not found! Make sure that the init_file is in directory where the software is installed
Error opening the init file: init_file.txt Make sure that the Init_file is closed while operating the GUI. The changes made to init_file should be saved and the software should be reopen to see the effect of changes
Error opening <filename><file location> because it is used by another process
File not found or Save the changes made to file and close the file. In order to see the effects of change, close and reopen the GUI. Do not open the file while the software is running
CCT Out of Range During light detection, if the CCT calculated is out of range from the value defined in the init_file.txt
Calculated Delta u'v' greater than given Delta u'v' During light detection, if the Delta u'v' calculated is greater than given Delta u'v' in the init_file.txt
u' and v' not in limit During light detection, if the u' and v' calculated is not in the limit which is in init_file.txt
An error occurred during writing the Smux configuration for Fifo Flicker detection
There was an error while configuring the SMUX for flicker detection
An error occurred during enabling or disabling Flicker Detection
Error occurred during the Fden bit in Enable register (0x80)
No samples were logged Take measurements for the process or saving data to log file
An overflow detected. Data has been lost in continuous measurement
Warning - An overflow detected. Data has been lost in continuous measurement
Document Feedback AS7341 11-Channel Spectral Sensor Revision Information
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 33
7 Revision Information
Changes from previous version to current revision v3-00 Page
V1-00 Initial version for release all
V2-00 Chapter 1.1 Aperture for diffuser 3
V2-00 Chapter 3.5 Software installation 11
V2-00 Tracer function 28
V2-00 Chapter 1.1 / 2 New Diffuser and adapter 3, 5
V3-00 Chapter 1.1,1.2,5.2,5.3,5.8,5.9.5.10 3-29
● 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.
Document Feedback AS7341 11-Channel Spectral Sensor Legal Information
Demo Kit Manual • PUBLIC UG000400 • v3-00 • 2019-Mar-08 34 │ 34
8 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.
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 [email protected]