AS7221 AMSOSRAM | Alldatasheet
Document overview
- Manufacturer or author: Provided By alldatasheet.com(free datasheet download site)
- PDF pages: 56
Technical content
CCT Tuning Smart Lighting Manager v4-00 • 2019-Jun-28
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 2 Content Guide
10 Smart Lighting Command
14 Soldering & Storage Information 51
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 3
1 General Description
The AS7221 CCT Tuning Smart Lighting Manager device is part of the ams AS722x/1x Smart Lighting Manager/Director family of products that simplify tunable and environmentally responsive lighting designs, enable lights to be “aware” and adapt to their surroundings, and to autonomously serve human-centered lighting and energy conservation needs. The device is equipped with an advanced Cognitive Lighting Engine (CLE) to optimize, chromatic white tuning, daylight harvesting and lumen maintenance via a combination of PWM and/or 0-10 V controls with dimming ballasts. Direct connection to a local I/O network enables connectivity with standard occupancy sensors, dimmers or communications bridges. The AS7221 is designed for use directly in tunable white luminaires, replacement lamps (bulbs) and light-engines/modules, or with a simple lightguide implementation, it can be incorporated directly into an LED driver to enable a highly cost-competitive, high-accuracy warm/cool CCT tuning solution. AS7221 XYZ chromatic white sensing provides mapping to x, y (z) of the CIE 1931 2-dimensional color gamut coordinates and scales the coordinates to the CIE 1976 u’v’ coordinate system. The AS72211’s silicon via nano-optic deposited interference filters deliver high-stability over both time and temperature. The Manager’s integrated intelligence enables ams factory CCT calibration, which mitigates chip to chip variation. By combining this factory calibration with a supported luminaire design-level “application matrix”, an end luminaire design can often eliminate the need for light-by-light calibration while delivering lifetime color control. With such a system calibration, accuracies within 2-4 Macadam steps are possible. The LGA package includes a built in aperture to control light entering the sensor array. No additional optics are required. The AS7221 connects to standard 0-10 V dimmers inputs and drives 0-10 V dimming ballasts/drivers to enable a highly cost-effective white tunable current-steering luminaire design with a single-channel constant current ballast. Direct PWM inputs can also interface to standard PWM-dimmable LED drivers or multi-channel ballasts for constant voltage LED lighting architectures. An UART interface is provided for configuration, control and management via a driverless, high-level text base Smart Lighting Command Set.
1.1 Key Benefits & Features
The benefits and features of AS7221, CCT Tuning Smart Lighting Manager, are listed below: Figure 1: Added Value of Using the AS7221 Benefits Features Lowers overall manufactured costs and adds precision to tunable white luminaires and lamps Intelligent controller with integrated, calibrated XYZ Tristimulus Sensor (CIE 1931 Standard Observer Color Function)
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 4 Benefits Features Enables cost-optimized single channel drivers to deliver a precise tunable white result. Selectable drive modes, including PWM- switched current steering, 0-10 V or PWM dimming or PWM-based duty cycle management Supports legacy IO approaches, as well as digital deep dimming Built-in 0-10 V analog or PWM digital dimming output generator for precise 1% dimming Direct serial interface for connection to standard networks UART interface for connection to network hardware clients for protocols such as Bluetooth, ZigBee and WiFi Simple lamp or luminaire configuration and commissioning using defined command set Smart Lighting Command Set (SLCS) uses simple text-based commands to control and configure a wide variety of functions Compact lighting-capable package with no added optics required 20-pin LGA package 4.5mm x 4.7mm x 2.5mm with integrated aperture -40 °C to 85 °C
1.2 Applications
- Commercial, retail, and residential CCT tunable LED lighting systems
- Cost-optimized tunable white LED drivers
- Higher precision replacement lamps/bulbs
- Intelligent, networked solid-state lighting management for variable CCT and daylight harvesting
- Integrated smart lighting control of variable CCT white lighting solutions
- Luminaires intended to meet California Title 24 daylighting requirements
- Networked lighting systems with IoT sensor expandability
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 5
1.3 Block Diagram
The AS7221 provides closed loop chromatic white sensing and PWM tuning while interfacing to local and network controls. The functional blocks of this device are shown below. Figure 2 : Functional Blocks of AS7221 SPI Master PWM Generator Dimming & Auxiliary Mode I²C Master UART Cognitive Light Engine (CLE) OSC
16 MHz
SDA_M SCL_M RX TX GND PWM_1/ 0_10V_O PWM_2 PWM_3 SYNC/ RESN MODE LED_IND MISO MOSI CSN VDD VDDHV Optional Inputs Network Access Setup Outputs SCK X Y Z Chromatic White XYZ Sensor
Ordering Information
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 6
2 Ordering Information
Code Description Package Marking Delivery Form Delivery Quantity AS7221 – BLGT CCT Tuning Smart Lighting Manager – Standard Reel 20-Pin LGA AS7221 13-inch Tape & Reel 2000 pcs/reel AS7221 – BLGM CCT Tuning Smart Lighting Manager – Mini Reel 20-Pin LGA AS7221 7-inch Mini Tape & Reel 500 pcs/reel
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 7
3 Pin Assignment
3.1 Pin Diagram
Figure 3: Pin Diagram for AS7221 (Top View) AS7221 Top View 20 19 18 17 16 6 7 8 9 10 PWM_3 SYNC/ RESN SCK MOSI MISO MODE VDDHV DIM TX RX PWM_2 PWM_1 0_10V_O LED_IND VDD GND CSN NC AUX SCL_M SDA_M
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 8
3.2 Pin Description
Figure 4: Pin Description of AS7221 (20-Pin LGA) Pin Number Pin Name Pin Type(1) Description
1 PWM_3 AO Digital PWM 3
2 SYNC/RESN DI Active low (with internal pull-up to VDD)
3 SCK DI SPI serial clock
4 MOSI DO SPI MOSI
5 MISO DI SPI MISO
6 CSN DO Chip select for the required external serial flash
memory, active low
7 NC - Not connected
8 AUX AI Auxiliary mode input pin
9 SCL_M DI/O I²C master clock pin
10 SDA_M DI/O I²C master data pin
11 RX DI UART RX pin
12 TX DO UART TX pin
13 DIM AI 0-2 V or 0-10 V input dimming pin
14 VDDHV P High voltage supply
15 MODE AI Mode selection pin
16 GND P Ground
17 VDD P Low voltage supply
18 LED_IND AO LED Driver output for Indicator LED, current
PWM_1 AO Digital PWM 1 0_10V_O AO 0-10 V output pin
20 PWM_2 AO Digital PWM 2
(1) Explanation of abbreviations: DI Digital Input DO Digital Output DI/O Digital In Out AO Analog Out AI Analog In P Power Pin
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 9
4 Absolute Maximum Ratings
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only. Functional operation of the device at these or any other conditions beyond those indicated under “Operating Conditions” is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. The device is not designed for high-energy UV (ultraviolet) environments, including upward looking outdoor applications, which could affect long-term optical performance. All voltages with respect to GND. Device parameters are guaranteed at VDD = 3.3 V and TAMB = 25 °C unless otherwise noted. Figure 5 Symbol Parameter Min Typ Max Unit Comments Electrical Parameters VDD_MAX Supply Voltage VDD -0.3 5 V Pin VDD to GND, Low Voltage pin VDDHV_MAX Supply Voltage VDDHV -0.3 20 V Pin VDDHV to GND, High Voltage pin VDD_IO Input/Output Pin Voltage -0.3 VDD +
0.3 V Low Voltage pins to GND
VDDHV_IO Input/Output Pin Voltage -0.3 VDDHV + 0.3 V High Voltage pins to GND ISCR Input Current (latch-up immunity) ± 100 mA JESD78D Electrostatic Discharge ESDHBM Electrostatic Discharge HBM ±1000 V JS-001-2014 ESDCDM Electrostatic Discharge CDM ±500 V JEDEC JESD22-C101F Oct 2013 Temperature Ranges and Storage Conditions TSTRG Storage Temperature -40 85 °C Temperature 260 °C IPC/JEDEC J-STD-020 (1) RHNC Relative Humidity (non- condensing) 5 85 % MSL Moisture Sensitivity Level 3 Represents a 168 hour max. floor lifetime Bump Temperature (soldering) TPEAK (1) Peak Temperature 235 245 °C Solder Profile (1) The reflow peak soldering temperature (body temperature) is specified according to IPC/JEDEC J-STD-020 “Moisture/Reflow Sensitivity Classification for no hermetic Solid State Surface Mount Devices.” The lead finish for Pb-free leaded packages is “Matte Tin” (100 % Sn)
Electrical Characteristics
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 10
5 Electrical Characteristics
All limits are guaranteed with VDD = 3.3 V, VDDHV = 12 V, TAMB = 25 °C. The parameters with min and max values are guaranteed with production tests or SQC (Statistical Quality Control) methods. If VDD and VDDHV are to be the same voltage, they must be sourced by the same 2.97 V to 3.6 V supply. All voltages with respect to GND. Figure 6: Symbol Parameter Conditions Min Typ Max Unit General Operating Conditions VDD Low Voltage Operating Supply 2.97 3.3 3.6 V VDDHV High Voltage Operating Supply VDD 12 15 V TAMB Operating Temperature -40 25 85 °C IVDD Operating Current Excluding LED driver current 5 mA Internal RC Oscillator FOSC Internal RC Oscillator Frequency 15.7 16 16.3 MHz tJITTER(1) Jitter @25 °C 1.2 ns 0-10 V Output (0_10V_O pin) ROUT_10 Resistive Load 1 kΩ IS_10 Source Current 10 mA ISINK_10 Sink Current -10 mA ILEAK_HV HV Output Leakage Current VIN=12 V, DAC & PWM1 both disabled -1.6 -0.73 mA CLOAD_10 Capacitive Load 100 pF VOUT_10(2) Output Swing 0 10 V AUX Input AUXIN AUX Input Voltage For 100% AUX A/D conversion 3.0 V RIN_AUX Analog Input Resistance 168 240 312 kΩ 0-10 V Input RIN_HV Analog Input Resistance VDDHV ≥ 12 V 138 200 315 kΩ
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 11 Symbol Parameter Conditions Min Typ Max Unit Temperature Sensor DTEMP Absolute Accuracy of the Internal Temperature Measurement -8.5 8.5 °C Indicator LED IIND LED Current 1 8 mA IACC Accuracy of Current -30 30 % VLED Voltage Range of Connected LED VDS of current sink 0.3 VDD V Digital Inputs and Outputs IIH, IIL Logic Input Current Vin=0 V or VDD -1 1 µA IIL SYNC/RESN Logic Input Current (SYNC/RESN pin) Vin=0 V -1 -0.2 mA VIH CMOS Logic High Input 0.7 × VDD VDD V VIL CMOS Logic Low Input 0 0.3 × VDD V VOH CMOS Logic High Output I=1 mA VDD - 0.4 V VOL CMOS Logic Low Output I=1 mA 0.4 V tRISE (1) Current Rise Time C(Pad)=30 pF 5 ns tFALL (1) Current Fall Time C(Pad)=30 pF 5 ns (1) Guaranteed, not production tested (2) For VDDHV>10.5, output max is 10 V, else output max tracks VDDHV
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 12
6 Optical Characteristics
The XYZ chromatic white/color sensor, part of the AS7221 Cognitive Light Engine (CLE), is a next- generation digital color sensor device. The sensor contains an integrating analog-to-digital converter with 16-bit resolution ADC, which integrates current from photodiodes. Upon completion of the conversion cycle, the result is transferred to the corresponding data registers to drive internal tuning algorithms. Transfers are double-buffered to ensure integrity of the data is maintained. Standard observer tri- stimulus (XYZ) interference filters are applied to the SLM’s optical channels as part of the CMOS process. This unique process enables filter responses that mimic the human eye and is extremely stable over both operating temperature and time. This in turn allows lifetime correlated color temperature (CCT) calibration to be performed as part of the manufacturing process. Calibration is accomplished using standard white LEDs at a variety of CCTs to deliver high accuracy and typically eliminate the need for light-by-light calibration in most designs. Note that any change of the precalibrated measurement conditions have an impact on the accuracy of the measurement results. In such cases a design-level diffuser or color brightness calibration is recommended to achieve highest accuracies. The AS7221 provides 2 calibration matrices, a factory calibration and a second application specific matrix to optimize the measurement performance. The additional calibration values will be set using the Smart Lighting Command Set directives ATNORMGAIN and ATNORMINTT. These settings will be saved in the external flash and reloaded automatically by the sensor firmware. See Section 10 for description of the complete Smart Lighting Command Set. The AS7221 LGA package contains an internal aperture that provides a package field of view (PFOV) of ± 20.5°. External optics can be used as needed to expand or reduce this built in PFOV. Sensor data readout to the maximum count value range is limited by the ADC. The maximum count range value of 65535 is only reached with an integration time tINT of approximately 177.92 ms. Below that value, the FSR will be less than the maximum 16-bit/65536 count maximum as described in the chart below. Figure 7: Overview Signal Resolution Bit Resolution tINT in ms Maximum Counts 10 2.78 1024 11 5.56 2048 12 11.12 4096 13 22.24 8192 14 44.48 16384 15 88.96 32768 16 177.92 65536
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 13 Figure 8: AS7221 Optical Characteristics Symbol Parameter Conditions Min Typ(1) Max Unit Color_m(2) Color Measurement Accuracy White Light CCT=2700 K,
3500 K, 4500 K and
0.002 du’v’ Z_count Z Channel Count Accuracy White light CCT = 5700 K 3.375 4.5 5.625 counts/ (W/cm2) (1) Typical values at Lux ≥50, Integration time=400.4 ms, Gain=1x, TAMB = 25 ºC. (2) Calibration and measurements were made at diffused light. Figure 9: Normalized Spectral Responsivity (all filters are normalized to 1) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.1 350 400 450 500 550 600 650 700 750 800 850 900 950 1000 1050 1100 TYPICAL SENSOR RESPONSIVITY (NORMALIZED TO "1") WAVELENGTH (NM) S ENS O R F UNCTI ON BAS ED O N CI E 1 9 31 2 ° CMF X Y Z NIR C
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 14 Figure 10: AS7221 LGA Average Field of View
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 15
7 Functional Description
7.1 Smart Lighting Manager – Overview
The Cognitive Light Engine (CLE) is the “brains” of the Smart Lighting Manager (SLM). The CLE constantly processes information from the calibrated XYZ chromatic white/color sensor, Smart Lighting Command Interface and control inputs to adjust and control PWM and 0-10 V channel outputs to deliver the targeted light characteristics. AS7221 initial setup and ongoing parameter storage is automatically done by software within the required external serial Flash memory, via SPI bus. Only ams-verified models of Flash devices can be supported. A subset of supported devices is noted in the UART Command Interface section of this document, which also provides a reference to the current list of supported Flash memory devices. For the Flash memory overview please refer to Figure 30. A SPI Flash device is a required operating companion to the AS7221. Figure 30 includes a partial list of supported devices, which have been tested by ams. Using non-verified devices can cause communication issues and may not be compatible. Flash timing is provided in Figure 28 and Figure 29 for debug purposes. By sensing a sample of the mixed warm and cool CCTs as either a reflection from the diffuser or other light-guide/optical light gathering technique, the AS7221 can support high precision multi-channel tuning results from a lower cost dual- or single channel LED driver architecture. Please note, that non- diffused applications require some form of reflective or other light gathering that delivers an adequate sample of mixed light to the sensor. Care should be taken to fulfill the angle of incidence requirements of the nano-optic filter set. To support the growing need for more personalized or circadian-rhythm supportive lighting systems, up to 16 scenes can be preset into flash memory to support autonomous CCT and brightness adjustments, including programmable ramp/transition timing. Scene timing, targets and ramps are programmable via the high-level Smart Lighting Command Set described in Section 10.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 17 For daylight operation, the AS7221 can be used two ways. As a standalone device pointing out of the luminaire, or if pointing inward for white color, it can support daylighting operation by using an I2C master connected to ams TSL25721 or TSL45315 for ambient light sensing. Figure 12: Solution Chart Chromatic Color Maintenance Lumen Maintenance Chromatic Color Maintenance Lumen Maintenance Daylighting AS7221 TSL25721 or TSL45315 (optional) ✔ ✔ ✖ (into luminaire) (not required) ✔ ✖ ✔ (into luminaire) (into room) TSL25721 device combines a channel 0 (CH0) which is responsive to both visible and infrared light, and channel 1 (CH1) which is responsive primarily to infrared light. Therefore, to get the LUX, a calibration is necessary. In this calibration, both channels has to be considered. First counts per lux (CPL) needs to be calculated in this calibration method. Counts per LUX (CPL): 𝐶𝑃𝐿 = 𝐶𝐻0−(1.87∗𝐶𝐻1) 𝐿𝑈𝑋 Calibration Scalar: 𝐿𝑈𝑋 = 𝐾0∗𝐴𝐷𝐶0−𝐾1∗𝐴𝐷𝐶1 Default setting K0 is 0.2178 (normal sunlight conditions in Europe in May, 1 m distance to a window). If K0=0, the result for K1 will be inverted to prevent negative LUX values. At different light conditions, this value has to adjust. Example: Spectrometer value = 9764 Lux, CH0 = 22870, CH1 = 2734 → CPL = 1.8186 K0 = 1/CPL = 0.549855, K1 = 1.87/CPL = 1.028228 To save the values, write in the console tab, ATLXSL0=0.549855 and ATLXSL1= 1.028228 Overall AS7221 timing generation uses an on chip 16 MHz temperature compensated oscillator for master clock timing.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 18
7.2 XYZ Chromatic White Color Sensor
The XYZ chromatic sensor, part of the AS7221 Cognitive Light Engine (CLE), is a next-generation digital color sensor device. The sensor contains an integrating analog-to-digital converter (16-bit resolution ADC), which integrates current from photodiodes. Upon completion of the conversion cycle, the result is transferred to the corresponding data registers. Transfers are double-buffered to ensure integrity of the data is maintained. Standard observer tri-stimulus (XYZ) interference filters are applied to the SLM’s optical channels as part of the CMOS process. This unique process enables filter responses that mimic the human eye and are extremely stable over both operating temperature and time. This in turn allows lifetime correlated color temperature (CCT) calibration to be performed as part of the manufacturing process. Calibration is accomplished using standard white LEDs at a variety of CCTs to deliver high accuracy; eliminating the need for light-by-light calibration in most designs. The Smart Lighting Command Set (SLCS) also includes provisions for application level calibration to provide a mechanism for additional design-specific calibration and compensation. Note the AS7221 LGA package contains an internal aperture that provides a package field of view (PFOV) of ± 20.5°. External optics can be used as needed to expand or reduce this built in PFOV. Scalar commands supported in the SLCS enable a level of compensation for added optics.
7.3 Inputs
Figure 13: VDDHV Based Settings for Inputs VDDHV Dimming 10.5-15 V Direct input for DIM, dimming input 2.97-10 V (1) External 5:1 resistor divider for DIM, dimming input (2) (1) For VDDHV ≤ 3.6 V, VDDHV and VDD should be tied together. (2) With external dividers connected to 0-10 V inputs, the max voltage to the device input is 2 V.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 20 The AUX input is a multifunction pin that is configured via SLCS commands into one of several modes. It can be used as a secondary input to allow additional control, in addition to the 0-10 V slider dimming function of the DIM pin. In AUX mode, the sensed AUX voltage is scaled and used to multiply the dimming scale. The auxiliary sensor input (AUX) has a 0-3 V range for its default analog sensing mode. With this 0-3 V range, external ranges such as 0-10 V can be accommodated using external resister divider networks such as a 10:3 network for a 0-10 V occupancy sensor. The AUX pin can also be configured for digital sensing (0,1 where 1=VDD). In the OCC mode an occupancy event from an external digital occupancy sensing device will trigger a timer restart, enabling the occupancy sensing function. An occupancy event enables the PWM output and resets the OCC timer. If the OCC signal falls below a detecting threshold (50%), the OCC timer restarts a countdown. The OCC timer counting time is set by the ATOCCT command. A value up to 10 minutes can be stored. After finishing the countdown without an occupancy event re-occurring, the PWM output is dimmed to 0 output (lights off). In CCT_Tune mode, the analog pin input will be interpreted to linearly tune between min and max CCT values that are set via smart lighting commands. In this mode, all lights on a single CCT-tuning circuit will see the same CCT_Tune input value for light-to-light CCT consistency. In CCT_SEL mode, a preselected CCT target value can be set via the provided voltage at the AUX pin. The selected CCT target values will be configured in 300 mV step width. Figure 16: CCT_SEL Targets CCT (K) Vmin (mV) Vnorm (mV) Vmax (mV) Default configured target value 0 150 300 2700 300 450 600 3000 600 750 900 3500 900 1050 1200 4000 1200 1350 1500 4100 1500 1650 1800 5000 1800 1950 2100 5700 2100 2250 2400 6500 2400 2550 2700 CT off 2700 2850 3000 If the AUX pin is not used, an external resistor pull-up connecting it to VDD is recommended.
7.4 Synchronization and Reset
AS7221 provides optional synchronization of the PWMs. This sync signal can be derived from the AC mains to enable all luminaires in a room to be synchronized to prevent beat frequency flicker. If the
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 21 SYNC pin is left open, synchronization is automatically disabled by the internal pull-up connected to the SYNC/RESN pin. Refer to Figure 17 below. When pulled down for more than 100 ms the SYNC/RESN pin will reset the AS7221 Smart Lighting Manager. In this case, the push button “overrides” the output of the opto- coupler. Therefore, a resistor should be placed in series with the opto-coupler. Figure 17: Synchronization and Reset
7.5 PWM Outputs
The AS7221 outputs, used to control dimming and LED warm/cool strings can be configured as either three PWM outputs, two PWMs and one analog output, or two PWMs. The PWMs are 7-bit for direct configuration, 12-bit for automatic scaling (daylight and color tune algorithm) and factory set to 886 Hz. Refer to Figure 18. If necessary, an adjustment of the PWM output frequency from 100 Hz up to 4 kHz is possible. The three PWM outputs, PWM_1, PWM_2 and PWM_3 all switch with the same frequency, but are not simultaneous for better EMI performance. The PWM_1 output can be set to either analog (0-VDDHV) or digital (0-VDDHV) dimming. Analog dimming range is 0-100%. Digital Dimming range is 0-100%. PWM2 and PWM3 are used for cool white and warm white LED color controlling. The cool white LED string needs to be connected to PWM2 and the warm white LED string to PWM3 accordingly. Range is 0-100% for both PWM2 and PWM3. If the external dimming device does not support the full range 0-100% it is possible to adjust the low end of the dimming range via the ATDMLTL smart lighting command. For test and scene configuration purposes 2 direct PWM AT-commands are available. ATXPWMx can be used for scene confiruations. It allows a direct PWM input at the scene ramp generator and override all PWM values calculated by the AS7221. ATPWMx can be used for hardware tests. It Opto Coupler VDD AC Main CLE SYNC/ RESN 10k optional SYNC and Reset Push > 100ms
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 22 allows a direct PWM input at the end of the sensor line and override all PWM values calculated by the AS7221 and all ATXPWMx values as well. To set the desired device operation MODE use the appropriate RMODE resistor, also shown in Figure 18. Figure 18: Outputs MODE RMODE Setting Outputs PWM_1/0_10V_O PWM_2 and PWM_3 0 100 Ω 0-10 V analog Analog 0-VDDHV (1) Digital PWMs (0-VDD) 1 470 Ω 0-10 V digital Digital PWM (VDDHV)(2) Digital PWMs (0-VDD) 2 1000 Ω Digital 2-CH color tuning Analog 0-VDDHV, not used for dimming Digital PWMs (0-VDD), w/Dimming (1) For VDDHV>10.5 V, output max is 10 V, else output max tracks VDDHV. (2) Digital PWM output is following VDDHV and it not limited to 10 V in digital PWM mode.
7.6 Indicator LED
An LED, connected to pin LED_IND, is used to indicate boot and programming progress of the device. If an error occurs with the memory access the indicator LED starts blinking operation. When programming is finished and programming tool disconnected the indicator LED turns on (default setting). The LED_IND pin is set for 1 mA operation by the AS7221 factory firmware. This is not under user control. The indicator LED can be enabled or disabled by using the ATLED0 command. Consideration should be taken with respect to any final product design to avoid light intrusion from the indicator LED into the direct or reflected field of view of the sensor.
I²C Master Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 23
8 I²C Master Interface
External sensors with native support by the AS7221 can be added via the I²C master interface. For example the ams current TSL25721 or legacy TSL45315 can be used to add daylighting operation to the AS7221. Once the supported ambient light sensor is detected by the AS7221, and the daylighting is activated by using the ATDL=1 command, daylighting operation begins. Native support is provided for selected ams environmental sensors including temperature, humidity and air quality/VOC. The I2C Master interface uses I2C serial protocol for communication with 7+1-bit chip addressing mode and full-speed clock frequency. Read and Write transactions comply with the standard set by Philips (now NXP).The I2C master interface can be used as a UART to I2C Bridge to connect to other I2C external sensors that do not have native support in the smart lighting firmware. Supporting smart lighting commands enable pass-through communications with non-natively supported devices.
8.1 I²C Protocol
Figure 19: I2C Symbol Definition Symbol Definition RW Note S Start condition after stop R 1-bit Sr Repeated start R 1-bit SW Slave address for write R Slave address SR Slave address for read R Slave address WA Word address R 8-bit A Acknowledge W 1-bit N No acknowledge R 1-bit Data Data/write R 8-bit Data (n) Data/read W 8-bit P Stop condition R 1-bit WA++ Slave increment word address R During acknowledge The above I²C symbol definition table describes the symbols used in the following Read and Write descriptions.
I²C Master Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 24
8.2 I²C Write Access
Byte Write and Page Write formats are used to write data to the slave. Figure 20: I2C Byte Write Figure 21: I2C Page Write The transmission begins with the START condition, which is generated by the master when the bus is in IDLE state (the bus is free). The device-write address is followed by the word address. After the word address any number of data bytes can be sent to the slave. The word address is incremented internally, in order to write subsequent data bytes on subsequent address locations. For reading data from the slave device, the master has to change the transfer direction. This can be done either with a repeated START condition followed by the device-read address, or simply with a new transmission START followed by the device-read address, when the bus is in IDLE state. The device-read address is always followed by the 1st register byte transmitted from the slave. In Read mode any number of subsequent register bytes can be read from the slave. The word address is incremented internally.
8.3 I²C Read Access
Random, Sequential and Current Address Read are used to read data from the slave. Figure 22: I2C Random Read
I²C Master Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 25 Random Read and Sequential Read are combined formats. The repeated START condition is used to change the direction after the data transfer from the master. The word address transfer is initiated with a START condition issued by the master while the bus is idle. The START condition is followed by the device-write address and the word address. In order to change the data direction a repeated START condition is issued on the 1st SCL pulse after the acknowledge bit of the word address transfer. After the reception of the device-read address, the slave becomes the transmitter. In this state the slave transmits register data located by the previous received word address vector. The master responds to the data byte with a not-acknowledge, and issues a STOP condition on the bus. Figure 23: I2C Sequential Read(1) (1) Shows the format of an I²C sequential read access. Sequential Read is the extended form of Random Read, as more than one register-data bytes are transferred subsequently. In difference to the Random Read, for a sequential read the transferred register-data bytes are responded by an acknowledgement from the master. The number of data bytes transferred in one sequence is unlimited (consider the behavior of the word-address counter). To terminate the transmission the master has to send a not-acknowledge following the last data byte and generate the STOP condition subsequently. The AS7221 is compatible to the NXP two wire specifications. http://www.nxp.com/documents/user_manual/UM10204.pdf Version 4.0 Feb 2012 for standard mode and fast mode
I²C Master Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 26
8.4 Timing Characteristics
Figure 24 : AS7221 I²C Master Timing Characteristics Symbol Parameter Conditions Min Typ Max Unit fSCL SCL Clock Frequency 400 400 kHz tBUF Bus Free Time Between a STOP and START 1.3 µs tHD:STA Hold Time (Repeated) START 0.6 µs tLOW LOW Period of SCL Clock 1.3 µs tHIGH HIGH Period of SCL Clock 0.6 µs tSU:STA Setup Time for a Repeated START 0.6 µs tHD:DAT Data Hold Time 0 0.9 µs tSU:DAT Data Setup Time 100 ns tR Rise Time of Both SDA and SCL 20 300 ns tF Fall Time of Both SDA and SCL 20 300 ns tSU:STO Setup Time for STOP Condition 0.6 µs CB Capacitive Load for Each Bus Line CB — total capacitance of one bus line in pF 400 pF CI/O I/O Capacitance (SDA, SCL) 10 pF
I²C Master Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 27
8.5 Timing Diagrams
Figure 25: I²C Master Timing Diagram
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 28
9 UART Command Interface
The UART block implements the TX and RX signals as defined in the RS-232 / V.24 standard communication protocol. A SPI Flash is a required operating companion device for the AS7221 to function or to communicate via the UART interface. Using non-verified flash devices can cause communication issues and may not be compatible. See Figure 30 for a subset of supported devices, which are tested by ams. The “xx” in the serial flash name stands for alternative packages and a reference is provided to the current list of verified flash devices. Flash timing is provided in Figure 25 for debug purposes.
9.1.1 UART Feature List
- Full Duplex Operation (Independent Serial Receive and Transmit Registers)
- Factory set to 115.2 kBaud
- Supports Serial Frames with 8 Data Bits, no Parity and 1 Stop Bit.
9.1.2 Operation
If data is available, it will be moved into the output shift register and the data will be transmitted at the Baud Rate, starting with a Start Bit (logic zero) and followed by a Stop Bit (logic one). Reception At any time, with the receiver being idle, if a falling edge of a Start Bit is detected on the input, a byte will be received. The following Stop Bit will be checked to be logic one.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 29
9.2 UART Protocol
Figure 26: UART Protocol
9.3 SPI Timing Characteristics
The AS7221 contains a serial UART interface to connect to a Flash memory. An Overview can be found in Figure 30. The required timing characteristics for a serial interface is shown in Figure 28 and in Figure 29 accordingly. If a Flash memory is used for debug purposes which is not listed in Figure 30 it should be ensured that the SPI timing is achieved. Contact ams for requests to support/verify additional Flash devices beyond those listed in the most current device verification listing. Figure 27: AS7221 SPI Timing Characteristics Symbol Parameter Conditions Min Typ Max Unit fSCK Clock Frequency 0 16 MHz tSCK_H Clock High Time 40 ns tSCK_L Clock Low Time 40 ns tSCK_RISE SCK Rise Time 5 ns tSCK_FALL SCK Fall Time 5 ns TCSN_S CSN Setup Time Time between CSN high-low transition to first SCK high transition 5 ns tCSN_H CSN Hold Time Time between last SCK falling edge and CSN low-high transition 5 ns tCSN_DIS CSN Disable Time 10 ns tDO_S Data-Out Setup Time 5 ns After Tbit/2: Sampling of Start Bit Start Bit Stop BitData Bits Start Next Start Start Bit detected Tbit=1/Baud Rate Always Low Always High After Tbit: Sampling of Data Sample Points
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 30 Symbol Parameter Conditions Min Typ Max Unit tDO_H Data-Out Hold Time 5 ns tDI_V Data-In Valid 10 ns
9.4 SPI Timing Diagrams
Figure 28: SPI Master Write Timing Diagram Figure 29: SPI Master Read Timing Diagram
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 31
9.5 Serial Flash
A SPI Flash device is a required operating companion to the AS7221. See Figure 30 for supported devices, which are tested by ams. Using other devices can cause communication issues and may not be compatible Flash timing is provided in Figure 25 for debug purposes. Figure 30: Flash Memory Overview Serial Flash Manufacturer AT25SF041xx Adesto Technologies AT25DF041xx Adesto Technologies MX25L4006ExxI-12G Macronix SST25PF040C Microchip Technology W25X40CLSNIG Winbond Electronics LE25U40CMD ON Semiconductor GD25Q40C GigaDevice FS25Q004F1 Foresee Additional devices may have been added to this list after publication of this datasheet. See “AS72xx External Flash program and update” application note available on the ams AS7221 product document section of the ams website.
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 32
10 Smart Lighting Command Interface
The Smart Lighting Manager supports a high-level, driverless text control interface using its Smart Lighting Command Set (SLCS) communicated through the UART interface. The SLCS provides a rich configuration and control interface to speed the time-to-design and time-to-market for luminaire, replacement lamp and driver manufacturers. The Smart Lighting Manager uses a variation of an “AT command model” as popularized by early Hayes modems. The SLCS is integrated into the required binary operating image that is included on the USB memory stick provided with an AS722x/1x Smart Lighting Demo Kit. Updates or the latest version of the SLCS can be downloaded via https://download.ams.com. Login is required and a login can be obtained through the email address provided on the download site. A configuration tool is available from ams to allow the luminaire, lamp or driver manufacturer to create their own “factory default” conditions that will be integrated with the ams -supplied initial binary image to create a ready-to-program default Flash image. The configuration tool is also available from https://download.ams.com. Write commands are constructed in the format “ATcmd=xxx” with the SLM returning the requested data value followed by the “OK” text reply. Commands that are unsuccessfully interpreted or are otherwise invalid will return an “ERROR” text reply. For example:
- Set the desired daylight LUX level target: ATLUXT=500 <OK>
- Read current lux target set point: ATLUXT <500 OK>
- Read current calibrated lux level as observed by the sensor: ATLUXC <497 OK> The “Smart Lighting Command Interface”, shown below between the network interface and the core of the system, provides access to the Smart Lighting Manager’s lighting control and configuration functions.
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 33 Figure 31: Smart Lighting Command Interface
10.1 AT Commands
The command interface to control the AS7221 is via the UART, using AT commands across the UART interface. The AT command interface block diagram, shown in Figure 31 between the network interface and the core of the system, provides access to the AS7221’s Cognitive Light Engine’s control and configuration functions (see also chapter UART ). In the command description below, numeric values may be specified with no leading prefix, in which case they will be interpreted as decimals, with leading “0x” to indicate that they are hexadecimal numbers, or with a leading “b” to indicate, that they are binary numbers. The commands are grouped into functional areas Texts appearing between angle brackets (‘<’ and ‘>’) are commands or response argument. A carriage return character, a linefeed character, or both may terminate commands to the SLM. The SLM command output is a response followed by a linefeed character. Note that any command that cannot interpreted or which encounters an error will generate “ERROR” response. Figure 32: AT Commands Command Direction Description Format Value Range Default Status and Basic Initialization AT R NOP - - - ATLIGHT R/W Enables/disables the light (PWM output) DEZ 1:ON, 0:OFF 1 UART CLE AS7221 Smart Lighting Command Interface Network Bridge Smart Lighting Command BLE WiFI ZigBee BacNet KNX etc.
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 34 Command Direction Description Format Value Range Default ATINTTIME R/W Set sensor integration time. Integration time = <value> x ~2.8 ms DEZ 1 – 255 20 ATGAIN R/W Set sensor gain: 0=1x gain, 1=3.7x, 2=16x, 3=64x DEZ 0 – 3 1 ATLED0 R/W Enables or disables the indication led DEZ 0: LED off / 1: LED on 1 ATLAI R/W Read lower light address identifier DEZ 0 – 65535 65535 ATLAIE R/W Read higher light address identifier DEZ 0 – 65535 65535 ATTEMP R Read the current device temperature in degrees Celsius DEZ - - ATEVENT R Read the 16-bit EVENT register, clearing the entire register after the read HEX Bit0: OCC An occupancy (OCC) event has occurred since the last register read Bit1: DIM An adjustment to the dimming level (DIM) has occurred since the last register read. Bit2: LED23M An adjustment to the color tune level (LED23M) has occurred since the last register read. Bit3: Not used Bit4: SCENE A scene has triggered since the last register read Bit5: DL_LIMIT The lumen controller has reached a limit, target value cannot reached Bit6: CT_LIMIT The color temperature controller has reached a limit, target value cannot reached 0x0000 ATPERSMEM R/W Enable/Disable writing to persistent memory DEZ 0: Disabled, 1: Enabled 0 ATSRST W Software Reset - - - ATFRST W Factory Reset. Stored values are reset to ‘Factory’ defaults. Afterwards a software reset is started. - - - Basic CCT Tuning Control and Color Data ATCT R/W Enables/disables color tuning DEZ 1: ON, 0: OFF 0 ATCCTT R/W Set the color control target value in integer (in K) DEZ 400 – 15000 2700 ATCCTC R Return the calibrated CCT value DEZ 400 – 15000 - ATDUVC R Read delta uv values DEZ XXXX.XXXX -
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 35 Command Direction Description Format Value Range Default ATXYZC R Read calibrated X, Y, and Z data DEZ <XXX.X, YYY.Y, ZZZ.Z> - ATSMALLXYC R Read calibrated x and y for CIE 1931 color gamut DEZ <xxxxx.xxxx, yyyyy.yyyy> - ATUVPRIMEC R Read calibrated u’, v’ and u, v for CIE 1976 color gamut DEZ <u'u'u'u'u'.u'u'u'u',v'v'v'v'v'.v'v'v'v', uuuuu.uuuu,vvvvv.vvvv> - Daylight Harvesting / Illumination Control ATDL R/W Enables/disables daylight harvesting DEZ 1: ON, 0: OFF 0 ATLUXT R/W Set illumination target LUX value DEZ 0 – 64000 400 ATLUXS R/W Switch between lux values from internal sensor and external ambient light sensor DEZ 0: Auto detect (higher priority is external sensor) 1: Internal sensor 2: External ambient light sensor ATLUXC R Read the illumination of the internal sensor in lux DEZ 0 – 64000 65535 – LUX value is in saturation - ATDMLTL R/W Configures the low-end DIM output to support also dimmers without full range dimming (e.g. 10%-100%) DEZ 0 – 50 0 DIM Input Pin and Mapping ATDE R/W Enable/disable DIM pin DEZ 1: ON, 0: OFF 0 ATDMD R/W Set DIM pin mode. Only used if ATDE enabled! DEZ 0: DIM mode Range from 0% to 100%, direct regulation of the brightness of the PWM outputs 1: LUX mode Range from 0% to 100%, direct regulation of the illumination [LUX]. Ranges can be set via ATDMINLUX and ATDMAXLUX. Overwrites the ATLUXT command ATDMIN R/W ATDMIN sets low end of DIM pin, using an integer percentage of 10V. For example ATDMIN=20 sets the lower DIM pin range to
2.0 V (10V x 20%) for
0% brightness. DEZ 0: ATDMAX 0 ATDMAX R/W ATDMAX sets high end of DIM pin, using an integer percentage of 10 V. For example ATDMAX=80 sets the higher DIM pin range to
8.0 V (10V x 80%) for
100% brightness. DEZ ATDMIN – 100 100 ATDMINLUX R/W Set the current min LUX target value for the DIM pin range. DEZ 0: ATDMAXLUX 0
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 36 Command Direction Description Format Value Range Default ATDMAXLUX R/W Set the current max LUX target value for the DIM pin range. DEZ ATDMINLUX – 64000 64000 ATPCTLUX R/W Set the lux target value in percentage between ATDMINLUX and ATDMAXLUX DEZ 0 – 100, can read back also 101, which means that the internal set target value is out of range ATDVAL R Reads the current analog value of the DIM pin in digits DEZ 0 – 1023 - AUX Input Pin and Mapping ATXE R/W Set AUX input function enable. When set to 0, all ATXMD operations are held in default mode. DEZ 1: ON, 0: OFF 0 ATXMD R/W Set AUX pin mode. When ATXE=0, all ATXMD operations are disabled. DEZ 0: AUX mode This is for AUX pin usage as a 0 – 3 V input that can scale the DIM pin input. 1: OCC mode This is for the AUX pin to act as a digital occupancy input (50% threshold) for the OCC timer. 1 = Occupancy, 0 = No occupancy. See also ATOCCT 2: CT_TUNE mode This is for AUX pin usage as CCT target. Overwrites the ATCCTT command 3: CT_SEL mode Selected CCT target values, configured in 300 mV step width ATXMIN R/W Sets lower end of 0-3 V AUX pin, using an integer percentage of 3 V. For example if ATXMIN=25 sets an AUX pin range from
0.75 V (25% x 3v) to
3 V for 0-100% scaling. DEZ 0: ATXMAX 0 ATXMAX R/W Sets higher end of 0-
3 V AUX pin, using an
3 V. For example if ATXMAX=75 sets an AUX pin range to
2.25 V (25% x 3v) to
3 V for 0-100% scaling. DEZ ATXMIN – 100 100 ATXMINCCT R/W Sets min CCT for minimum AUX value in K in AUX CCT_TUNE mode DEZ 400 – ATXMAXCCT 400 ATXMAXCCT R/W Sets max CCTT for AUX pin=3 V in K in AUX CCT_TUNE mode DEZ ATXMINCCT – 15000 15000 ATXVAL R Reads the current analog value of the AUX pin in digits DEZ 0 – 1023 - ATOCCT R/W Set Occupancy timeout value for ATXMD = 1 DEZ 1 – 10 [minutes] 10
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 37 Command Direction Description Format Value Range Default PWM Configuration and Overrides ATDIM R/W Set dim level in percent (0% off, 100% full brightness) DEZ 0 – 100 0 ATBLINK R/W Starts the light on a low-high-low output blink to allow identification during a commissioning or maintenance process DEZ 1: ON, 0: OFF 0 ATLOG R/W Set alternate dimming curve (DALI approximation) DEZ 1: Logarithmic 0: Linear 0 ATRAMP R/W Set ramp time for lighting adjustments in percent. Time configuration is used for ATXPWM, ATDIM, ATLED23M, occupancy and Light on/off DEZ 0: No ramp used 1 – 100: Ramp time in percent (1s - 10s) Example: DIM 50% – 0% with ATRAMP=50 takes 2.5 s ATPWMFREQ R/W Set/Get the PWM frequency in Hertz, SYNC-Input is only at
886 Hz enabled
DEZ 100 – 4000 Hz 886 ATPWMx R/W Set PWMx Duty Cycle target as an integer percentage value between 0 and 100, removing it from any control loop. Returns always the current configured PWM value in percent (x = 1 … 3) DEZ 0 – 100 102 - Release PWM back into loop control PWM1: 0 PWM2: PWM3: ATXPWMx R/W Set PWMx Duty Cycle target as an integer percentage value between 0 and 100, removing it from any control loop. Returns always the current configured PWM value in percent. Note: A PWM in an XPWM override mode will be affected by the DIM pin value when AUX is in DIM mode. In AUX mode it is also affected by the AUX pin value. (x = 1 .. 3) DEZ 0 – 100 102 - Release PWM back into loop control PWM1: 0 PWM2: PWM3: ATPWMOVR R Read the single 16-bit sum of PWMs to identify which have been over-ridden and removed from any closed-loop control loop HEX Bit0: ATXPWM1 active Bit1: ATXPWM2 active Bit2: ATXPWM3 active Bit4: ATPWM1 active Bit5: ATPWM2 active Bit6: ATPWM3 active 0x00
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 38 Command Direction Description Format Value Range Default ATLED23M R/W Set the value for PWM2 as a percentage to drive manual LED string mixing. PWM3 = 100 - PWM2. The sum is 100 DEZ PWM2: 0 – 100 50 Scene Configuration and Management ATTIMENOW R/W Set the current time with 1 minute resolution (update every 30min recommended for best scene synchronization) DEZ 0 – 1439, 65535 - Disabled 65535 ATDOW R/W Set day of week DEZ 0 (Monday) – 6 (Sunday) 255 - Disabled 255 ATCCLR W Restores scene command defaults in the specified scene. HEX One bit for each scene. 1 = Reset - ATSnDAY R/W Set scene n day(s) of week for scene operation, as a decimal sum HEX A 1 in a bit location activates that day. lsb=1=Monday operation, etc. (e.g. 07 hex=Wed,Tue, Mon) 0x00 - Days not configured 0x00 ATSnTIME R/W Set scene n start time DEZ 0 – 1439: 1 minute steps from Midnight 65535 - Scene time not configured 0xFFFF ATSnCCT R/W Calls the ATCCTT command at scene trigger time DEZ See command ATCCT, 65535 – Value not used 65535 ATSnLUX R/W Calls the ATLUXT command at scene trigger time DEZ See command ATLUXT, 65535 – Value not used 65535 ATSnDIM R/W Calls the ATDIM command at scene trigger time DEZ 0 – 100, 255 – Value not used 255 ATSnLED23M R/W Calls the ATLED23M command at scene trigger time DEZ 0 – 100, 255 – Value not used 255 ATSnPWMx R/W Calls the ATXPWMx command at scene trigger time DEZ 0 - 100, 255 – Value not used 255 ATSnRAMP R/W Sets ramp duration time in minutes for the command: - ATSnPWMx, ATSnDIM, ATLED23 – ramp will be handled by RAMP-generator - ATSnLUX, ATSnCCT – ramp is handled by scene loop (every second) and can be stopped by configuration of new target values This command acts only for the scene trigger time and not global like the ATRAMP command DEZ 0 – 240 255 – Value not used 255
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 39 Command Direction Description Format Value Range Default ATSnFLAGS R/W This command is used to enable/disable configuration flags like daylight control, color tuning, dimming, auxiliary and calls directly the related commands: ATDL, ATCT, ATDE, ATXE HEX 0x0001 – Enable DL 0x0002 – Enable CT 0x0004 – Enable DIM pin 0x0008 – Enable AUX pin functions 0xFFFF - Value not used 0xFFFF ATSnON W Set scene n to be on/off. DEZ 1: ON, 0: OFF 0 ATTSON R Read scenes on/off status. HEX Each bit for one scene 0x0000 I2C Configurations and UART-I2C Data Bridge ATESP R Read the single 16-bit sum to determine availability of natively supported I2C devices HEX Bit0: ams TSL4531 or TSL2572 Bit1: ams ENS210 Bit2: HTU20D (ESP1 only- obsolete) Bit3: ams CCS811 ATTEMPX R Read the external temperature in degrees Celsius DEZ -40 – 125°C (format: XXX.XX) - ATRHX R Read the external humidity in percent DEZ 0 – 100% (format: XXX.XX) - ATECO2 R Reads the eCO2 [in ppm] value from the external gas sensor, if available DEZ 400 ppm – 64000 ppm 0 - Means that values will be measured, but internal calibration is not finished (wait 1min) ATTVOC R Reads the TVOC [in ppb] value from the external gas sensor, if available DEZ 0ppb – 64000ppb - ATI2C W Perform a single write to the I2C bus at the specified 7-bit device using the 8 bits of specified data. Supports also a single register set (without value) ATI2C=<7-bit_address>, <8-bit_reg>, [<8-bit_data>] - [<8-bit_data>] is optional Examples: - ATI2C=50,0x12, 0xFF: Writes value 0xFF to register 0x12 on device address - ATI2C=50,0x12,: Set register 0x12 on device address 50 ATI2C R Perform a single read from the I2C bus at the specified 7-bit device address and 8-bit register, returning 8 bits of data or ERROR HEX ATI2C=<7-bit_address>, <8-bit_reg> -
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 40 Command Direction Description Format Value Range Default ATI2CB W Starts a burst transfer up to 10 bytes for writing and reading. At first the data will be written and after then read sequence will be started HEX ATI2CB=<7- bit_address>,<read_length>[,<write_data> ] - first two parameter can be hex or dez, - <write_data> must be hex without leading 0x, but is optional examples: ATI2CB=<7- bit_address>,<read_length>[,<write_data> - first two parameter can be hex or dez, - <write_data> must be hex without leading 0x, but is optional examples: ATI2CB=0x49,2: reads two byte from addr 0x49 ATI2CB=50,4,5BF3: writes 0x5B and 0xF3 to address 50 and read 4 bytes after this Calibration Management ATDATA R Read all six raw values: X, Y, Z, IR, dark, clear DEZ <X, Y, Z, ir, d, c> - ATAMxy R/W Write 3x3 application matrix to flash, x,y = [0..2] DEZ - 1,0,0 0,1,0 0,0,1 ATNORMGAIN R/W Set/Get the gain which the calibration values were measured DEZ 0 – 3 1 ATNORMINTT R/W Set/Get the integration time which the calibration values were measured DEZ 1 – 255 59 ATIRXS R/W Write IR scalar for value X DEZ - p2ram value 0.0 ATIRYS R/W Write IR scalar for value Y DEZ - p2ram value 0.0 ATIRZS R/W Write IR scalar for value Z DEZ - p2ram value 0.0 ATPMxy R/W Write 3x3 color matrix to flash, x,y = [0..2] DEZ - p2ram value 1,0,0 0,1,0 0,0,1 ATLXSL0 R/W Reads and writes the calibration scalar K0 for external ambient light sensor (TSL2572 only); Formula: LUX=K0*ADC0- K1*ADC1 DEZ ≥0 0.2178
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 41 Command Direction Description Format Value Range Default ATLXSL1 R/W Reads and writes the calibration scalar K1 for external ambient light sensor (TSL2572 only); Formula K0>0: LUX=K0*ADC0- K1*ADC1 K0=0: LUX=K1*ADC1 DEZ ≥0 0 Firmware and Firmware Update ATVERSW R Return the current software version number DEZ <MAJOR.MINOR.PATCH> - ATVERHW R Returns the system hardware as a HEX value of the form PRDTx where P=PartID and R=ChipRevision and DT= DeviceType HEX <0xPRDT> PR: 40 DT: 15 (AS7221) 0x4015 ATFWU W Starts firmware update process and transfer the bin file checksum - - - ATFW W Download new firmware Up to 10 bytes of FW image at a time (20 hex bytes with no leading or trailing 0x) Repeat command till all 56Kbytes of firmware are downloaded - HEX STRING (without 0x) - ATFWS W Tests the checksum on the non-active FW partition and, if correct, switches active partition. This is a toggle and can be used to toggle between the 2 FW partitions. Note: the first 5 bytes in page 0 are not touched. It is only a temporary switch and must be used to check the new firmware whether the communication works! - - - ATFWL W This command locks the current firmware to starts on power cycles. It rewrites the first five bytes in page0! - - -
Smart Lighting Command Interface Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 42 Command Direction Description Format Value Range Default ATFWC R This command gives information about the current firmware state Bit0: Checksum of non-active firmware OK Bit1: Error occurred Bit2: Is bank 1 active Bit3: Not used Bit4: Current firmware is locked Bit5: 56 kBytes transferred Bit6: Not used Bit7: Firmware update active ATFWA W Only for backward compatibility to support old firmware update mechanism. Always returns with OK. Because of flash devices it is not possible to increment the address separately (Page erase necessary!) - - -
Application Information
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 43 Figure 33, Figure 34 and Figure 35 showing typical application schematics for the AS7221. Figure 37 illustrates a routing example for the device and Figure 38 gives the recommended pad layout for the LGA package.
11.1 Schematic
Figure 33: Chromatic Color Tuning with Networking and Spectral Sensing (page 1)
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 44 Figure 34: Chromatic Color Tuning with Networking and Spectral Sensing (page2)
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 45 Figure 35: Chromatic Color Tuning with Networking and Spectral Sensing (page3)
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 46
11.2 PCB Layout
Figure 36: Typical Layout Reading In order to prevent interference, avoid trace routing feedthroughs with exposure directly under the AS7221. An example routing is illustrated in the diagram. The AS7221 Smart Lighting Integration Kit (SLIK) demo board with schematic and PCB layout documentation is available from ams for additional design information.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 47
11.3 PCB Pad Layout
Suggested PCB pad layout guidelines for the LGA package are shown. Flash Gold is recommended as a surface finish for the landing pads. Figure 37: Recommended PCB Pad Layout (Top View) (1) Unless otherwise specified, all dimensions are in millimeters. (2) Add 0.05mm all around the nominal lead width and length for the PCB pad land pattern. (3) This drawing is subject to change without notice.
Package Drawings & Markings Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 48 Figure 38: 20-Pin LGA Package Outline Drawing (Front Side Marking) 10x 2.025 PIN1 CORNER INDEX AREA (BOTTOM VIEW) 20x 0.45 ±0.10 4x 0.26 4x 1.30 20 16 6 10 20x 0.30 ±0.1010x 1.925 20x 0.10 ±0.05 0.30 2.20 2.50 ±0.20 aaa C Seating plane C AS7221 XXXXX 4.70 4.50 0.388 Ø0.75 ±0.05 0.01 PIN1 CORNER INDEX AREA 6 10 20 16 aaa C (TOP VIEW) A0.1 BCM A B A0.1 BCM A0.1 BCM (1) All dimensions are in millimeters. Angles in degrees. (2) Dimensioning and tolerancing conform to ASME Y14.5M-1994. (3) XXXXX = tracecode (4) This package contains no lead (Pb). (5) This drawing is subject to change without notice. RoHS Green
Package Drawings & Markings Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 49 Figure 39: (1) All dimensions are in millimeters. Angles in degrees. (2) Dimensioning and tolerancing conform to ASME Y14.5M-1994. (3) XXXXX = tracecode (4) This package contains no lead (Pb). (5) This drawing is subject to change without notice. 10x 2.025 PIN1 CORNER INDEX AREA (BOTTOM VIEW) 20x 0.45 ±0.10 4x 0.26 4x 1.30 20 16 6 10 20x 0.30 ±0.1010x 1.925 20x 0.10 ±0.05 0.30 2.20 2.50 ±0.20 aaa C Seating plane C AS7221 XXXXX 4.70 4.50 0.388 Ø0.75 ±0.05 0.01 PIN1 CORNER INDEX AREA 6 10 20 16 aaa C (TOP VIEW) A0.1 BCM A B A0.1 BCM A0.1 BCM
Tape & Reel Information Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 50
13 Tape & Reel Information
Figure 40: Tape Dimensions (1) All dimensions are in millimeters. Angles in degrees. (2) Geometric dimensioning and tolerancing conform to ASME Y14.5M-1994. (3) This drawing is subject to change without notice. T Do 1.5 +0.1 2.0 ±0.05 Po 0.0 Y 1.50 MIN. X X R0.3 TYP. Ko SECTION Y-Y Y SECTION X-X 4.0 ±0.1 5.0 ±0.1 1.75 ±0.1 5.5 ±0.1 12.0 ±0.1 0.3 ±0.03
Soldering & Storage Information Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 51
14 Soldering & Storage Information
The module has been tested and has demonstrated an ability to be reflow soldered to a PCB substrate. The solder reflow profile describes the expected maximum heat exposure of components during the solder reflow process of product on a PCB. Temperature is measured on top of the component. The components should be limited to a maximum of three passes through this solder reflow profile. Figure 41: Solder Reflow Profile Graph Figure 42: Solder Reflow Profile Parameter Reference Device Average temperature gradient in preheating 2.5°C/s Soak time tsoak 2 to 3 minutes Time above 217°C (T1) t1 Max 60s Time above 230°C (T2) t2 Max 50s TPEAK Temperature in °C Time in seconds tSOAK Not to scale
Soldering & Storage Information Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 52 Parameter Reference Device Time above Tpeak – 10 °C (T3) t3 Max 10s Peak temperature in reflow Tpeak 260°C Temperature gradient in cooling Max - 5°C/s
14.1 Manufacturing Process Considerations
The AS7221 package is compatible with standard reflow no-clean and cleaning processes including aqueous, solvent or ultrasonic techniques. However, as an open-aperture device, precautions must be taken to avoid particulate or solvent contamination as a result of any manufacturing processes, including pick and place, reflow, cleaning, integration assembly and/or testing. Temporary covering of the aperture is allowed. To avoid degradation of accuracy or performance in the end product, care should be taken that any temporary covering and associated sealants/debris are thoroughly removed prior to any optical testing or final packaging.
14.2 Storage Information
Moisture sensitivity optical characteristics of the device can be adversely affected during the soldering process by the release and vaporization of moisture that has been previously absorbed into the package. To ensure the package contains the smallest amount of absorbed moisture possible, each device is baked prior to being dry packed for shipping. Devices are dry packed in a sealed aluminized envelope called a moisture-barrier bag with silica gel to protect them from ambient moisture during shipping, handling, and storage before use.
14.2.1 Shelf Life
The calculated shelf life of the device in an unopened moisture barrier bag is 12 months from the date code on the bag when stored under the following conditions:
- Shelf Life: 12 months
- Ambient Temperature: <40 °C
- Relative Humidity: <90% Rebaking of the devices will be required if the devices exceed the 12 month shelf life or the Humidity Indicator Card shows that the devices were exposed to conditions beyond the allowable moisture region.
Soldering & Storage Information Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 53
14.2.2 Floor Life
The module has been assigned a moisture sensitivity level of MSL 3. As a result, the floor life of devices removed from the moisture barrier bag is 168 hours from the time the bag was opened, provided that the devices are stored under the following conditions:
- Floor Life: 168 hours
- Ambient Temperature: <30 °C
- Relative Humidity: <60% If the floor life or the temperature/humidity conditions have been exceeded, the devices must be rebaked prior to solder reflow or dry packing.
14.3 Rebaking Instructions
When the shelf life or floor life limits have been exceeded, rebake at 50 °C for 12 hours.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 54 Document Status Product Status Definition Product Preview Pre-Development Information in this datasheet is based on product ideas in the planning phase of development. All specifications are design goals without any warranty and are subject to change without notice Preliminary Datasheet Pre-Production Information in this datasheet is based on products in the design, validation or qualification phase of development. The performance and parameters shown in this document are preliminary without any warranty and are subject to change without notice Datasheet Production Information in this datasheet is based on products in ramp-up to full production or full production which conform to specifications in accordance with the terms of ams AG standard warranty as given in the General Terms of Trade Datasheet (discontinued) Discontinued Information in this datasheet is based on products which conform to specifications in accordance with the terms of ams AG standard warranty as given in the General Terms of Trade, but these products have been superseded and should not be used for new designs Changes from previous version to current revision v4-00 Page Update Figure 2 Block Diagram 5 Update Figure 5, format 9 Update Optical Characteristic 12 Added diffusor functionality 15 Added scene ramps 15 Added Figure xx AS7221 workflow abstract 16 Update ALS, replacement TSL25911 due to TSL2572 16, 17, 23, 39 Added calibration TSL2572 17 Update dimming input 19 Added CCT_SEL mode 20 Update PWM output frequency 21 Update indicator LED behavior 22 Added fSCL max in Figure 22 24 Update intro UART command interface 28 Update Figure 27 SPI Timing Characteristic 29, 30 Update Figure 30 Serial Flash Overview 31 Update Figure 32 AT Command List 33-42 Added Figure 39 Backside Marking 49
- 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.
Datasheet • PUBLIC DS000479 • v4-00 • 2019-Jun-28 55 │ 55
16 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. Devices sold by ams AG are covered by the warranty and patent indemnification provisions appearing in its General Terms of Trade. ams AG makes no warranty, express, statutory, implied, or by description regarding the information set forth herein. ams AG reserves the right to change specifications and prices at any time and without notice. Therefore, prior to designing this product into a system, it is necessary to check with ams AG for current information. This product is intended for use in commercial applications. Applications requiring extended temperature range, unusual environmental requirements, or high reliability applications, such as military, medical life-support or life-sustaining equipment are specifically not recommended without additional processing by ams AG for each application. This product is provided by ams AG “AS IS” and any express or implied warranties, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. 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 ams_sales@ams.com