<<

TI Designs Backlight and Smart Control by Ambient Light and Noise-Immune Proximity Sensor Reference Design

TI Designs Design Features This TI Design conserves power and extends LCD • Demonstrates EMI-Resistant Proximity Detection backlight life by dynamically adjusting the LCD Using Copper PCB Material backlight brightness relative to the environment's • Excellent Human Eye Spectral Response Matching ambient light levels. A capacitive proximity sensor With a Strong IR Rejection (< 1%) saves power and increases the LCD backlight life by waking up the system from sleep or standby mode • Dynamically Adjusts Backlight Brightness on when a person approaches. Logarithmic Scale Based on How Human Eye Perceives Brightness Design Resources • Integrated UV Filter Enables Good Performance for Outdoor Applications TIDA-00754 Design Files OPT3001 Product Folder Featured Applications FDC2212 Product Folder • Building Automation HDC1000 Product Folder • Proximity Detection MSP430FR5969 Product Folder • Smart Thermostat TLV713P Product Folder LM3630A Product Folder • Smart Lighting TPD2E2U06 Product Folder • Control Panels TIDA-00466 Tools Folder • Intrusion HMI Keypad TIDA-00220 Tools Folder

ASK Our E2E Experts

USB TLV71333 3.3 V 5-V input Linear regulator

Capacitive bezel USB or sensor UART FDC2212 data Capacitance-to-digital sensor

MSP430FR5969 I2C Microcontroller HDC1000 Humidity and SPI temperature sensor

LCD OPT3001 Ambient light sensor EM connector LM3630 LCD backlight controller

An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other important disclaimers and information.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 1 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Key System Specifications www.ti.com 1 Key System Specifications

Table 1. Key System Specifications

PARAMETER SPECIFICATION DETAILS 4×5-in bezel sensor with a 1-in width System dimensions See Section 2.3 10.2×12.7-cm bezel sensor with a 2.54-cm width Sensor type Copper PCB sensor See Section 2.3 Input voltage 5 V nominal (VBUS from USB wall wart power supply) See Section 6.1 Lux sensing range 0.01 lux to 83k lux See Section 8.1.2 powered: 8.8 in (22.2 cm) See Section 4.2 Proximity detection range Wall wart powered: 8.5 in (21.6 cm) and Section 8.2 Sample rate 10 Hz for proximity detection See Section 5 Calibration method User button for offset calibration Operating temperature –20°C to 70°C (limited by LCD screen) Working environment Indoor and outdoor Debugging communication port UART / EM connector See Section 6.2

2 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com System Description 2 System Description Many industrial and building automation user interface systems employ smart sensing to increase user comfort, to conserve power, or to increase system longevity by extending the life of the backlight elements. The Backlight and Smart Lighting Control by Ambient Light and Noise-Immune Proximity TI Design addresses these important design considerations by using an ambient light sensor and a capacitive proximity sensor. The ambient light sensor dynamically adjusts an LCD backlight's brightness in reference to the ambient light in the surrounding environment, enabling a more comfortable viewing experience for the end user. The capacitive proximity sensor saves power and increases the LCD backlight life by waking up the system from sleep or standby mode when a person approaches. The optical light sensor made by Texas Instruments has good human eye spectral matching, which allows the system to adjust the backlight brightness to be most comfortable when viewed by the human eye. A simple algorithm determines the ideal backlight brightness when the backlight is activated. Proximity wake up is enabled by Texas Instruments’ capacitive-to-digital converter. A capacitive sensor located around the edge of the board provides a 360-degree sensing field around the board. Proximity detection works best when approaching the front of the device. This design guide covers component selection, measurement theory, system calibration, and environmental compensation.

2.1 Ambient Light Sensor An ambient light sensor enables the system to measure and react to changes in the environment's ambient light level. An optimal viewing experience for the user can be easily implemented by adjusting the backlight brightness based on the environment. A simple relationship between backlight brightness and ambient light can be programmed in software. In other systems, the collected ambient light data can be used in other ways like adjusting building lighting based on daylight (see TIDA-00488) The OPT3001 is ideally suited for sensing lighting due to its ambient light linearity of 2% and rejection rate of infrared (IR) light greater than 99%. This device provides an extremely accurate ambient light measurement that closely matches the spectrum of the human eye as shown in Figure 1. Furthermore, the OPT3001 has extremely low power consumption with an average current of 1.8 µA and average shutdown current of 0.3 µA. Connecting the wireless MCU to this device is straightforward using an I2C interface.

1 OPT3001 0.9 Human Eye 0.8 0.7 0.6 0.5 0.4 0.3 Normalized Response Normalized 0.2 0.1 0 300 400 500 600 700 800 900 1000 Wavelength (nm) D001 Figure 1. Spectral Response of OPT3001 and Human Eye

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 3 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated System Description www.ti.com 2.2 Capacitance-to-Digital Converter Using a capacitance-based proximity detection, a subsystem requires high-resolution and low-noise measurements to detect proximity using capacitance-to-digital technology. To determine if a person is close to the sensor, the proximity detection subsystem must be able to detect any capacitive changes above the baseline measurements. As the resolution for the capacitance measurement increases and the noise decreases, the proximity detection range and repeatability increases. Another consideration for the selection of the capacitance-to-digital converter is the ability to handle measurement changes due to varying environmental conditions. This TI Design uses two methods to mitigate environmental variations: a separate environmental sensor (Section 2.3) and software filtering (Section 5.1). The FDC2212 sensor AFE contains innovative EMI-resistant architecture to maintain performance even when in high-noise environments. The two-channel FDC2212 capacitance-to-digital converter combines unique features and functions with low power, high resolution, and EMI-resistant performance over a 250-nF range to make it easy for designers to use capacitive sensing to increase the intelligence and awareness of their systems.

2.3 Proximity and Environmental Sensor Design The capacitance-to-digital converter technology from TI can operate with a wide variety of sensor geometries and conductive materials. Sensor design is critical for proximity sensing because proximity sensing requires detecting and processing small changes in capacitance from a baseline measurement. Several factors that affect sensitivity of a sensor are: • Sensor size area • System and environment noise • Size and location of the nearest ground source or plane Additional discussions on capacitive sensor geometries and sensitivity comparisons can be found in Section 4.3 of the TIDA-00466 design guide (TIDUAF9). The overall sensor area does impact the effective sensing range. This TI Design uses a rectangular bezel sensor with the dimensions of 4 in by 5 in with a 1-in width as illustrated in Figure 2. An important note, this design is an example for incorporating capacitance-to-digital technology for proximity detection into grounded systems (wired from a wall wart) whereas the TIDA-00466 reference design provides an example for proximity detection into floating systems (battery powered). Additional details on grounded versus floating systems is discussed in Section 4.2 of the TIDA-00466 design guide (TIDUAF9). The actual sensor geometry (rectangular bezel) selected emulates a small industrial control panel, which typically contains a display or control in the middle of the device housing. The range of proximity detection is correlated to the size of the capacitive sensor. As the sensor size increases, the distance at which proximity can reliably be detected also increases. The total area of the copper PCB proximity sensor is 86 cm2.

1 in 4 in Top proximity sensor (2.54 cm) (10.2 cm)

5 in (12.7 cm) Figure 2. TIDA-00754 Sensor Geometry

4 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com System Description 2.4 Humidity and Temperature Sensor An integrated humidity and temperature sensor decreases complexity of system design and overall foot print of finished product. With one read command, the temperature and humidity can be collected. The use of a single device saves power and decreases communication time and cycles needed to collect necessary information. Humidity and temperature data is important for two reasons. With the data collection and connected nature of this design, the device can act as a sensor node and transmit the environment data to a gateway or to another device that can communicate this information over the web. Second, the environment data allows for temperature or humidity compensation if the need arises.

2.5 Microcontroller The Backlight and Smart Lighting Control by Ambient Light and Noise-Immune Proximity Sensor TI Design has only a few MCU requirements since the rest of the devices are low power and easy to control. Only one I2C bus is necessary to communicate with the various sensors and the backlight controller because each has a unique address. One SPI bus is used to control the LCD screen. A UART is used purely during debug and testing, but is a nice option to have. To demonstrate the technology of Texas Instruments, this design uses a MSP430™ microcontroller. The MSP430FR5969 meets all listed design requirements and is low power. The MSP430FR5969 microcontroller uses FRAM memory instead of flash (SLAT151), which consumes less power for the entire system. In addition, the MSP430FR5969 device has eUSCI modules for I2C, SPI, and UART, all used in this TI Design. Finally, the MSP430FR5969 device incorporates EnergyTrace++™ technology, which is helpful during system debugging. EnergyTrace technology for MSP430 microcontrollers is an energy-based code analysis tool that measures and displays the application’s energy profile and helps to optimize it for ultra-low-power (ULP) consumption. This technology implements a new method for measuring MCU current consumption. Power is traditionally measured by amplifying the signal of interest and measuring the current consumption and voltage drop over a shunt resistor at discrete times. In debuggers that support EnergyTrace technology, a software-controlled DC-DC converter generates the target power supply. The time density of the DC-DC converter charge pulses equals the energy consumption of the target microcontroller. A built-in calibration circuit in the debug tool defines the energy equivalent for a single charge pulse. The width of each charge pulse remains constant. The debug tool counts every charge pulse and the sum of the charge pulses are used in combination with the time elapsed to calculate an average current. Using this approach, even the shortest device activity that consumes energy contributes to the overall recorded energy.

2.6 Backlight Controller A simple low-power backlight controller is necessary to save power and enable the dimming features of the LCD backlight on the reference design. The backlight controller chosen has 255 discrete brightness levels; this decreases the overhead operating operations needed compared to other controllers that use pulse width modulation (PWM) signals to control LED brightness levels. This backlight controller can also use a PWM signal to control the brightness if more customization is needed. The backlight controller is easy to control by sending commands over I2C to adjust the display's brightness level.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 5 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Block Diagram www.ti.com 3 Block Diagram

USB TLV71333 3.3 V 5-V input Linear regulator

Capacitive bezel USB or sensor UART FDC2212 data Capacitance-to-digital sensor

MSP430FR5969 I2C Microcontroller HDC1000 Humidity and SPI temperature sensor

LCD OPT3001 Ambient light sensor EM connector LM3630 LCD backlight controller

Figure 3. TIDA-00754 Block Diagram

3.1 Highlighted Products The Backlight and Smart Lighting Control by Ambient Light and Noise-Immune Proximity Sensor TI Design features the following devices: • OPT3001: Single-chip lux meter, measuring light intensity as visible by the human eye with IR rejection • FDC2212: Noise-immune capacitive sensing solution for proximity sensing • HDC1000: Digital humidity sensor with integrated temperature sensor • MSP430FR5969: 16-MHz ULP microcontroller featuring 64-KB FRAM, 2-KB SRAM, 40 I/O • TLV71333P: Low quiescent current LDO with excellent line and load transient performance • LM3630A: High-efficiency, dual-string LED driver • TPD2E2U06: Dual-channel, ultra-low capacitance ESD-protection device

6 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Block Diagram 3.1.1 OPT3001 The OPT3001 device is a sensor that measures the intensity of light. The spectral response of the sensor is tightly matched to the photopic response of the human eye and includes significant infrared rejection. The OPT3001 is a single-chip lux meter, measuring the intensity of light as seen by the human eye. The precision spectral response and strong IR rejection of the device enables the OPT3001 to accurately measure the intensity of light regardless of its source. The strong IR rejection also aids in maintaining high accuracy when industrial design calls for mounting the sensor under dark glass for aesthetics. The OPT3001 is designed for systems that create light-based experiences for humans, and an ideal preferred replacement for photodiodes, photoresistors, or other ambient light sensors with less human eye matching and IR rejection. The small form factor (2.0 × 2.0 × 0.65 mm) allows the device to fit almost anywhere.

VDD

VDD OPT3001 SCL SDA Ambient I2C ADC INT Light Optical Interface Filter ADDR

GND

Figure 4. OPT3001 Functional Block Diagram

Features: • Precision optical filtering to match human eye – Rejects >99% (typ) of IR • Automatic full-scale setting feature simplifies software and ensures proper configuration • Measurements: 0.01 lux to 83k lux • 23-bit effective dynamic range with automatic gain ranging • 12 binary-weighted full-scale range settings: <0.2% (typ) matching between ranges • Low operating current: 1.8 µA (typ) • Operating temperature range: –40°C to 85°C • Wide power-supply range: 1.6 to 3.6 V • 5.5-V tolerant I/O • Flexible interrupt system • Small-form factor: 2.0 × 2.0 × 0.65 mm

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 7 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Block Diagram www.ti.com 3.1.2 FDC2212 Capacitive sensing with grounded capacitor sensors is a very low-power, low-cost, high-resolution contact- less sensing technique that can be applied to a variety of applications ranging from proximity sensing and gesture recognition to material analysis and remote liquid level sensing. The sensor in a capacitive sensing system is any metal or conductor, allowing for low cost and highly flexible system design. The FDC1004 is a high-resolution, 4-channel capacitance-to-digital converter for implementing capacitive sensing solutions. Each channel has a full scale range of ±15 pF and can handle a sensor offset capacitance of up to 100 pF, which can be either programmed internally or can be an external capacitor for tracking environmental changes over time and temperature. The large offset capacitance capability allows for the use of remote sensors.

3.3 V 3.3 V FDC2212 VDD

CLKIN 40 MHz VDD 0.1 F 1 F Int. Osc. GND

IN0A Resonant SD GPIO L C IN0B circuit driver INTB GPIO MCU

Cap 3.3 V Sensor 0 Core GND

IN1A ADDR SDA I2C Resonant I2C L C IN1B circuit driver SCL peripheral

Cap Sensor 1

Figure 5. FDC2212 Functional Block Diagram

Features: • Input range: ±15 pF • Measurement resolution: 0.5 fF • Maximum offset capacitance: 100 pF • Programmable output rates: 100/200/400 S/s • Maximum shield load: 400 pF • Supply voltage: 3.3 V • Temperature range: –40° to 125°C • Current consumption: – Active: 750 µA – Standby: 29 µA • Interface: I2C • Number of channels: 4

8 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Block Diagram 3.1.3 HDC1000 The HDC1000 is a digital humidity sensor with an integrated temperature sensor that provides excellent measurement accuracy at very low power. The device measures humidity based on a novel capacitive sensor. The humidity and temperature sensors are factory calibrated. The innovative Wafer Level Chip Scale Package (WLCSP) simplifies board design with the use of an ultra-compact package. The sensor element of the HDC1000 is placed on the bottom part of the device, which makes the HDC1000 more robust against dirt, dust, and other environmental contaminants. The HDC1000 is functional within the full –40°C to 125°C temperature range.

RH HDC1000 VDD

SDA Registers SCL ADC + I2C DRDYn ADR0 Logic ADR1

OTP TEMPERATURE Calibration Coefficients GND

Figure 6. HDC1000 Functional Block Diagram

• Relative humidity (RH) operating range: 0% to 100% • 14-bit measurement resolution • Relative humidity accuracy ±3% • Temperature range – Operating –20°C to 85°C – Functional –40°C to 125°C • Temperature accuracy ±0.2°C • 200-nA sleep mode current • Average supply current: – 820 nA at 1 sps, 11-bit RH measurement – 1.2 μA at 1 sps, 11-bit RH and temperature measurement • Supply voltage: 3 to 5 V • Tiny 2×1.6-mm device footprint • I2C interface

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 9 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Block Diagram www.ti.com 3.1.4 MSP430FR5969 The MSP430 ULP FRAM platform combines uniquely embedded FRAM and a holistic ULP system architecture, allowing innovators to increase performance at lowered energy budgets. FRAM technology combines the speed, flexibility, and endurance of SRAM with the stability and reliability of flash with much lower power. The MSP430 ULP FRAM portfolio consists of a diverse set of devices featuring FRAM, the ULP 16-bit MSP430 CPU, and intelligent peripherals targeted for various applications. The ULP architecture showcases seven low-power modes, optimized to achieve extended battery life in energy-challenged applications.

P1.x, P2.x P3.x, P4.x PJ.x 2x8 2x8 1 x 8 LFXIN, LFXOUT, HFXIN HFXOUT

Capacitive Touch IO 0/1 ADC12_B I/O Ports I/O Ports I/O Port MCLK ACLK Comp_E (up to 16 REF_A P1, P2 P3, P 4 PJ Clock standard 2x8 I/Os 2x8 I/Os 1x8 I/Os System (up to 16 inputs, Voltage SMCLK inputs) up to 8 Reference PA PB differential 1x16 I/Os 1x16 I/Os DMA inputs) Controller

3 Channel MAB Bus Control MDB Logic MAB CPUXV2 incl. 16 Registers MPU TA2 AES256 MDB IP Encap Power TA3 Mgmt FRAM RAM Security Watchdog Timer_A CRC16 MPY32 Encryption, LDO 2 CC 64kB 2kB Decryption EEM SVS Registers 48kB 1kB (128, 256) (S: 3+1) 32kB Brownout (int. only)

MDB JTAG Interface MAB

Spy-Bi-Wire TB0 TA0 TA1 eUSCI_A0 eUSCI_B0 eUSCI_A1 Timer_B Timer_A Timer_A (I2C, RTC_ARTC_B 7 CC 3 CC 3 CC (UART, SPI) Registers Registers Registers IrDA, (int, ext) (int, ext) (int, ext) SPI)

LPM3.5 Domain

Figure 7. MSP430FR5969 Functional Block Diagram

• Embedded microcontroller – 16-bit RISC architecture up to 16‑MHz clock – Wide supply voltage range (1.8 (1) to 3.6 V) • Optimized ULP modes (1) Minimum supply voltage is restricted by SVS levels.

MODE CONSUMPTION (TYPICAL) Active mode 103 µA/MHz Standby (LPM3 with VLO) 0.4 µA Real-time clock (LPM3.5 with crystal) 0.5 µA Shutdown (LPM4.5) 0.02 µA

10 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Block Diagram • ULP FRAM – Up to 64KB nonvolatile memory – ULP writes – Fast write at 125 ns per word (64KB in 4 ms) – Unified Memory = Program + Data + Storage in one single space – 10 15 write cycle endurance – Radiation resistant and nonmagnetic • Intelligent digital peripherals – 32-bit hardware multiplier (MPY) – Three-channel internal DMA – Real-time clock with calendar and alarm functions – Five 16-bit timers with up to seven capture/compare registers each – 16-bit cyclic redundancy checker (CRC) • High-performance analog – 16-channel analog comparator – 14-channel 12-bit analog-to-digital converter (ADC) with internal reference and sample-and-hold • 200 ksps at 75-µA consumption • Multi-function I/O ports – All pins support capacitive touch capability with no need for external components – Accessible bit-, byte- and word-wise (in pairs) – Edge-selectable wake from LPM on all ports – Programmable pullup and pulldown on all ports • Code security and encryption – 128-bit or 256-bit AES security encryption and decryption coprocessor – Random number seed for random number generation algorithms • Enhanced serial communication – eUSCI_A0 and eUSCI_A1 support • UART with automatic baud-rate detection • IrDA encode and decode • SPI at rates up to 10 Mbps – eUSCI_B0 supports • I2C with multi-slave addressing • SPI at rates up to 8 Mbps – Hardware UART and I 2 C bootstrap loader • Flexible clock system – Fixed-frequency DCO with ten selectable factory-trimmed frequencies – Low-power low-frequency internal clock source (VLO) – 32-kHz crystals (LFXT) – High-frequency crystals (HFXT) • Development tools and software – Professional development environments – Development kit (MSP‑TS430RGZ48C) • For complete module descriptions, see the MSP430FR59xx and MSP430FR58xx Family User's Guide (SLAU367)

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 11 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Block Diagram www.ti.com 3.1.5 TLV71333P The TLV713 series of low-dropout (LDO) linear regulators are low-quiescent current LDOs with excellent line and load transient performance and are designed for power-sensitive applications. These devices provide a typical accuracy of 1%. The TLV713 series is designed to be stable without an output capacitor. The removal of the output capacitor allows for a very small solution size. However, the TLV713 series is also stable with any output capacitor if an output capacitor is used. A 1-μF capacitor is placed at the input and output of this design for more stability. The TLV713 also provides inrush current control during device power-up and enabling. The TLV713 limits the input current to the defined current limit to avoid large currents from flowing from the input power source. This functionality is especially important in battery-operated devices. The TLV713 series is available in standard DQN and DBV packages. The TLV71333P provides an active pull-down circuit to quickly discharge output loads.

IN OUT

Current Limit

Thermal Shutdown

UVLO 120W

EN Bandgap

Logic TLV713P

GND Figure 8. TLV71333P Functional Block Diagram

• Stable operation with or without capacitors • Foldback overcurrent protection • Package: SOT23-5 and X2SON • Very low dropout: 230 mV at 150 mA • Accuracy: 1%

• Low IQ: 50 μA • Input voltage range: 1.4 to 5.5 V • Available in fixed-output voltages: 1.0 to 3.3 V • High PSRR: 65 dB at 1 kHz

12 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Block Diagram 3.1.6 LM3630A The LM3630A is a current mode boost converter, which supplies the power and controls the current in up to two strings of 10 LEDs per string. Programming is done over an I2C-compatible interface. The maximum LED current is adjustable from 5 to 28.5 mA. At any given time, maximum LED current and LED brightness is further adjusted with 256 exponential or linear dimming steps. Additionally, PWM brightness control can be enabled, allowing for LED current adjustment by a logic-level PWM signal. The boost switching frequency is programmable at 500 kHz for low-switching loss performance or 1 MHz to allow the use of tiny low profile inductors. A setting for a 10% offset of these frequencies is available. Overvoltage protection is programmable at 16 V, 24 V, 32 V, or 40 V to accommodate a wide variety of LED configurations and Schottky diode or output capacitor combinations. The device operates over the 2.3- to 5.5-V operating voltage range and –40°C to 85°C ambient temperature range. The LM3630A is available in an ultra-small 12-bump DSBGA package.

VIN CIN COUT SW

HWEN Global Enable/ OVP Disable Programmable Over Voltage Protection (16V, 24V, 32V, 40V) Boost Converter

Reference and Thermal Shutdown 1A Current Limit

Current Sinks

LED1 Programmable LED String Open/ 500 kHz/1 Mhz Short Detection Switching Frequency LED2

Backlight LED Control PWM 1. 5-bit Full Scale PWM Sampler Current Select

2. 8-bit brightness adjustment Fault Detection SDA 3. Linear/Exponential Dimming OVP 2 INTN OCP SCL I C- 4. LED Current Ramping Compatible TSD Interface SEL

Figure 9. LM3630A Functional Block Diagram

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 13 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Block Diagram www.ti.com 3.1.7 TPD2E2U06 The TPD2E2U06-Q1 is a transient voltage suppressor (TVS) ESD protection diode array with low capacitance. It is rated to dissipate ESD strikes above the maximum level specified in the IEC 61000-4-2 international standard. The 1.5-pF line capacitance makes it ideal for protecting interfaces such as USB 2.0, LVDS, Antenna, and I2C.

IO1 IO2

Figure 10. TPD2E2U06 Functional Block Diagram

• AEC-Q101 qualified • IEC 61000-4-2 level 4 – ±25-kV (contact discharge) – ±30-kV (air-gap discharge) • I/O capacitance 1.5 pF (typ) • DC breakdown voltage 6.5 V (min) • Ultra-low leakage current 10 nA (max) • Low ESD clamping voltage • Industrial temperature range: –40°C to 125°C • Small easy-to-route DBZ package

14 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com System Design Theory 4 System Design Theory

4.1 Ambient Light Measurement This reference design uses Texas Instruments’ OPT3001 to periodically measure the intensity of light shining on the screen and board. An adequate backlight brightness level is chosen by collecting ambient light data and correlating the lux level to a backlight level using linear interpolation. More discussion of software filters and algorithms are covered in Section 5.

4.1.1 OPT3001 Placement The placement of any sensor is imperative for correct operation. To cut down on false readings, the OPT device was placed above the screen so the user’s hand or body would have less of a chance to shade the sensor during use of the display. When the reference design is attached to a wall and approached by a person from the front, the light sensor has the smallest chance of being shaded by the hand of the user. The ideal location is in the top middle of the board to allow either a right- or left-handed person to approach the screen and not block light from coming in contact with the sensor. In some of today’s designs, the light sensor is positioned flush to the outside of the case to allow the most light into the sensor. Because this reference design was built using a regular four-layer PCB and was manufactured without the plan for using an enclosure, all components are mounted flush to the board. A problem arises when the OPT sensor cannot be mounted above the height of the LCD backlight. Extra light produced by the backlight could interfere with the lux reading collected by the OPT. A small light shield solves the problem of unintended light from the backlight adding to the lux reading. The shield was built using a 3D printer and black ABS .

Figure 11. 6-mm Large Shield

NOTE: Not drawn to scale; actual: 6-mm tall × 26-mm long × 11-mm wide.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 15 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated System Design Theory www.ti.com After further experiments, it was found that a shield was unnecessary. The top of the LCD backlight assembly is blacked out enough to block light; therefore, when active, the backlight does not contribute to the lux reading of the OPT device.

Figure 12. LCD Top Edge

However, if the light sensor was placed on either side of the LCD screen, extra light would be sensed by the OPT3001. In Figure 13, the edges of the LCD backlight does emit a good amount of extra light and a shield would be needed. Or the OPT3001 would need to be mounted slightly above the LCD height to avoid the extra light from adding to the lux reading.

Figure 13. LCD Side Edge

16 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com System Design Theory 4.2 Proximity Detection Theory of Operation This TI Design detects proximity using capacitive sensing technology from TI. The FDC2212 measures the capacitance on a proximity sensor plate, which in this TI Design is a rectangular bezel shape in a copper PCB trace. When no human presence is in front of the proximity sensor, the FDC2212 measures some baseline capacitance. When a human moves in proximity to the sensor, the FDC2212 measures an increased capacitance. At this time, the system turns on the LCD backlight for a set period of time. Depending on the end-system requirements, a different action can occur, such as a general system interrupt or wake-up signal. One major concern about using capacitance-to-digital converter technology is how to deal with a fluctuating baseline capacitance. If any of the environmental conditions vary, the system likely has a baseline capacitance measurement that fluctuates, which either causes a false triggering of the system wake-up or prevents the system from ever triggering. The FDC2212 supports a second sensor, which can be used as a reference to cancel out a temperature shift. A differential measurement using an environmental sensor and a slow-moving average threshold would help reduce the baseline fluctuations seen from environmental conditions. In this design, the reference sensor was not implemented, but a humidity and temperature sensor is located onboard to provide temperature or humidity compensation if needed.

4.3 Grounded versus Floating Systems There are two typical scenarios in how a capacitive sensing system is designed relative to its ground reference: a grounded system and a floating system. A grounded system means the system is referenced to or very close to earth ground. A floating system means the system is referenced to the "ground" reference of the source that is generating the power for the system (for example, a battery). As an example, a laptop that is operating with its charger connected to a wall outlet is grounded whereas a laptop powered solely on its battery is a floating system. The sensitivity of a grounded system is more significant compared to a floating system, especially if the intended target is the human body. The human body will have a voltage potential very close to earth ground (same or very close to system ground) while the voltage potential of the floating system can be significantly different. This difference in potential directly corresponds to a difference in sensitivity or sensing distance. One system level issue that needs to be taken into consideration is the capacitive coupling through the power and signal lines. One example of capacitive coupling interference source includes a USB cable. As the human hand approaches the cable in a grounded system, the change in capacitance is typically less than the detection threshold of the system. For a floating system, the system ground potential can fluctuate as the hand approaches the USB cable. This is seen as a change in capacitance, which may exceed the detections threshold and cannot be distinguished from a valid event. Some ways to reduce the effects from capacitive coupling include: • Increase threshold parameters: Increasing the detection threshold makes it less likely that any shift in the measured capacitance magnitude caused by coupling will trigger a detection event. • Larger ground plane: Using a larger local system ground plane increases the amount of parasitic capacitance in the system and can affect sensitivity. The reduction in sensitivity is dependent on the location and position of the ground relative to the sensor.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 17 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated System Design Theory www.ti.com 4.4 Dynamic Threshold Proximity Detection A method this TI Design uses to deal with a fluctuating baseline capacitance is a slow-moving average threshold. The differential measurement read by the FDC2212 is averaged in firmware to reduce noise, and then this averaged value is compared against a threshold to determine if a proximate object is detected. However, this threshold is also an averaged value of the averaged values read by the FDC2212. Details on the specifics of this averaging scheme are found in Section 5. The firmware adjusts to the new differential baseline measurement if a foreign object such as water drops or dust is placed on the proximity sensor. In this case, the water drops have a short-term effect on the sensor that could activate the proximity threshold. However, once the water drops are stationary, the slow- moving average threshold changes to reflect the new capacitance. The differential measurement is altered with the contaminant present, but because the firmware is comparing the differential reading to a slow- moving average rather than a fixed value, the firmware eliminates the long-term effect from water drops, dust, or other contaminants on the proximity sensor. The specific values of the slow-moving average threshold update rate, as well as the FDC2212 sample rate, can be adjusted, depending on end-product system requirements.

18 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Software Overview 5 Software Overview The MSP430 software was written in Code Composer Studio™ v6. A 14-pin JTAG debug interface is needed to program the reference design. The MSP-FET and the MSP-FET430UIF are suitable USB debuggers and programmers and were used during the development process. However, the MSP-FET is the only debugger that allows the EnergyTrace feature. A secondary board is necessary to program the reference design, called the JTAG Adaptor board. With limited board real estate, a smaller programming port was needed to save space. More information regarding the adaptor is covered in Section 6.2.

5.1 Software Filtering and Averaging To improve the signal-to-noise ratio in the FDC2212 measurement=, an IIR filter was implemented in software. The IIR filter implementation is similar to a moving average except that previous values do not have to be stored and shifted out of the summing order. This saves memory and calculation time, but some accuracy is lost. A running total of 'N' values are kept. The current average, denoted by "Avg[m]" in Equation 1, is calculated by taking the previous average, "Avg[m – 1]", multiplying by N, and subtracting the previous average. Then, the new value is added to the sum to create a "new sum". Dividing by N creates a new average. Having N be a multiple of 2 allows bit shifting instead of actually dividing, further saving precious cycles. Avgm[][][]- 1 ´ N - Avgm - 1 + valm Avg[] m = N (1) The long-term average is completed the same way but uses the average as the "val[m]", thus taking the average of the average to create a dynamic baseline reading. This enables the reference design to react to environment changes.

5.2 Backlight Brightness Attempting to achieve the perfect brightness level for every environment has key problems and design considerations. The preferred brightness level can differ depending on the application's end-user. The backlight levels of this design were based off a study completed by Microsoft® [1], which discusses how humans perceive ambient light in an almost logarithmic function. Further tests were completed in different environments and multiple user opinions were collected. If a different LCD panel and backlight controller subsystem is used, the brightness levels may need to change; however, this is a good starting point to setting backlight brightness. The LM3630 has 255 discrete backlight levels that can be set. During development, it was decided it would be easier and more efficient to set the brightness based on the study done by Microsoft. This also helps the user avoid using PWM control that would have to be running anytime the backlight was on. A couple hundred levels allowed plenty of customization for the LCD and backlight devices selected for the reference design. Eleven values were correlated to ambient light levels and hard coded into arrays. Implementing linear interpolation between values in the arrays gives a suitable brightness leveling solution. The relationship between ambient light and backlight brightness is shown in Figure 14.

300

250

200

150

Brightness Level 100

50

0 0 10000 20000 30000 40000 50000 Ambient Light (lx) D004 Figure 14. Backlight Brightness

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 19 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Software Overview www.ti.com 5.3 Sensor Sampling and Update Frequency All of the sensors communicate on the same I2C line, but each have their own unique addresses. Simple register reads and writes are employed to configure and read data from each of the sensors. As discussed in Section 5.1, there is some filtering and averaging that occurs between outputting the capacitance readings. The equivalent sampling frequency for the FDC proximity detection is 10 Hz. The temperature, humidity, and lux data are collected and display on a 2-Hz frequency. A 2-Hz update frequency was chosen because the screen updates are hard to read when updated quickly, and temperature and humidity measurements will not be changing that fast as well.

20 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Getting Started 6 Getting Started

6.1 Hardware Overview The proximity sensor on the board was designed to detect human presence at 20 cm (7.9 in). The TI Design is displayed in Figure 15. The capacitive bezel takes up one inch around the entire edge of the board on top layer. This design does not use a ground shield. If a ground shield was placed directly below and was the same size as the proximity sensor, the sensitivity will be reduced by 50%. See the TIDA- 00466 design guide (TIDUAF9) for more information. The LCD, backlight panel, and user and reset buttons are located on the front of the board. The ambient light sensor is positioned at the top middle of LCD panel. The top of the LCD and backlight are blacked out to avoid an error in the light readings.

Ambient light sensor

Humidity and temperature User buttons sensor (back)

Reset button

Figure 15. ISE4024 — TIDA-00754 Front

Test points are located on the backside of the board to allow connection to the I2C communication lines; these are the test points. The GND, VBUS, V_INPUT, and 3v3 test points are positioned next to the right angle micro-USB connector.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 21 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Getting Started www.ti.com Jumpers are positioned near the rear mounted USB connector as well. J1 should be put in place when powering off of USB power, 5 V. J1 can be removed when powering off a bench supply connected to V_Input and GND, 5 V. J3 allows the LDO to power the rest of the system using 3.3 V.

I2C test points Micro-USB and power supply MSP430 MCU and LCD backlight driver

Power test points JTAG programmer

FDC2212 AFE

Figure 16. ISE4024 — TIDA-00754 Back

IN0 and IN1 (capacitive sensors) selection headers near the bottom middle of the back of the board allow the user to add a different capacitive sensor to the board. Adding new and different geometries allow the user to try new sensor materials and geometries on the same platform.

22 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Getting Started 6.2 JTAG Adaptor Board The ISE4020 hardware is an adaptor board that connects to the standard 14-pin JTAG ribbon connector on the MSP-FET Flash Emulation tool. Space requirements make fitting the standard JTAG programming connector onto the board difficult. By using the JTAG adaptor board, a six-pin 50-mil female header can be installed in place of the larger 14-pin JTAG connector.

Figure 17. ISE4020 Front

This postage stamp-sized board contains two connectors, a jumper, and test points for the power, UART, and programming signals. The standard 14-pin JTAG header is shown on the left side of the board. The six-pin 50-mil output header is shown on the right edge of the board. The schematic is shown in Figure 18. The jumper labeled J3 is used to select the power mode of the JTAG programmer. When jumper J3 is in position 1, connecting pins 1 and 2, the target is self-powered. With jumper J3 in position 2, connecting pins 2 and 3, the target board is powered from the debugger/programming adaptor. Take care to select the correct mode as the adaptor board does not use overvoltage protection.

VCC J3 VCC 800-10-003-10-001000 J1 VCC_TOOL 1 VCC J2 TDIO 1 2 2 1 SBWTDIO TARGET_RX 3 4 VCC_TARGET 3 RX 2 5 6 3 SBWTCK TCK 7 8 SH-J1 4 SBWTCK SBWTDIO 9 10 5 11 12 6 TARGET_TX TARGET_TX 13 14 TARGET_RX TX GRPB061VWCN-RC SBH11-PBPC-D07-ST-BK GND

GND GND Figure 18. ISE4020 Schematic

To program the TIDA-00754 reference design, the programmer is set up in the orientation displayed in Figure 19. Check the jumper setting of the jumper labeled J3 before powering up and connecting to USB port on PC.

Figure 19. Programmer Connection

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 23 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Setup www.ti.com 7 Test Setup

NOTE: Unless otherwise noted, the test data in the following sections was measured with the system at room temperature. All of the measurements in this section were measured with calibrated lab equipment.

7.1 Overview Testing of major sensing devices, including the OPT3001 ambient light sensor and the FDC2212 proximity sensor, were completed. Temperature and humidity testing was also performed to verify how the reference design acts in different environments. The following subsections describe the test setup and procedures. Section 8 presents test data with additional explanations.

7.2 Optical Light Sensing Extensive testing of the optical sensor was completed in a similar method as the original device characterization. The results are comparable to the original data set collected from the OPT3001EVM. The repeatability of the experiments and results demonstrates the ease of use of the ambient light sensor. The following section will outline the methods used, along with some of the theory involved in testing light sensors.

24 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Test Setup 7.3 Equipment A dark room equipped with various light testing equipment was used to test the reference design’s ability to sense ambient light conditions. In a light testing setup, it is important to control as many test variable as possible; however, controlling light can be a difficult process. The first piece of equipment used is a Thorlabs solid aluminum optical breadboard. Figure 20 shows a subsection of the board. Its matte black anodized finish reduces the amount of reflections and the standard hole patterns allow easy alignment of testing equipment.

Figure 20. Thorlabs Optical Breadboard

When completing any light testing, any and all reflections should be minimized. The dark room used in testing had flat black paint on the walls and all reflective surfaces were covered from view. Almost all equipment was also painted a flat black color. Testing cannot be achieved without a good reference value. Therefore, a Konica Minolta T-10MA Illuminance meter was used to know the "actual" value of lux being directed into the OPT3001 device. Center of ϕ16.5 receptor window

Reference plane

ϕ14

13.6~13.9

Figure 21. Lux Meter Mech

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 25 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Setup www.ti.com The accuracy is specified as 2% linearity and ±1 digit of display value. Additionally, its spectral response is specified to be within 6% of the CIE standard for illuminance. To house the light source and to attempt to control light direction and reflections, a light box was manufactured. The light source enclosure is a custom-machined box designed to house various bulbs. The light box is intended to be sealed for non-darkroom testing, and it is compatible with Thorlabs components. Two back plates support different bulbs. The first back plate attaches to the large LED array, and the second back plate attaches to common threaded household bulbs. The back plates also allow an adjustable depth or distance to be set, and this distance can be fixed by tightening a set screw. The enclosure also has six fans to aid in the temperature stability of the bulb inside. To test the full range of the OPT3001, an array of white LEDs were used to reach above 83 klux. It is the workhorse light source. It consists of an array of discrete LEDs wire-bonded together to produce a forward voltage drop of roughly 40 V at up to 0.5 A. It is the only light source available at the time of testing capable of reaching 100 klux, and it is also the only one that can exercise the maximum range of the OPT3001. When driven by Yokogowa or Keithley SMU in current source mode, it is also the quietest source, capable of 1 LSB of noise. The aforementioned discrete LEDs create unique optical problems. If this light source is not well diffused, it will create hot spots in the illuminated intensity. This problem is especially noticeable if lens systems are used to focus the light. At the distances used for calibration, uniformity appears to be within the measurement capability of the Konica lux meter. The parts in Table 2 were put together to create a configurable light source.

Table 2. LED Light Source Parts

IMAGE DIGIKEY PART NUMBER MFG PART NUMBER DESCRIPTION

CREE CXA2011-0000- LED COOL WHITE 5000K CXA2011-0000-000P00J050F-ND 000P00J050F SCREW MOUNT

HEATSINK BLACK ANODIZED WM4779-ND Molex 1802890000 HELIEON

BER142-ND Berqquist Q3-0.005-00-48 THERMAL PAD RECT .005" Q3

CXA20 LED ARRAY HOLDER WM4788-ND Molex 1802200001 W/COVER

26 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Test Setup

Figure 22. Assembled Light Source

To adjust the intensity of light projected onto each of the sensors, a gradient rotating neutral density filter was used. The rotating neutral density filter reduces the intensity of all wavelengths equally to effectively dim the light being emitted onto the sensor. The ND filter used is shown in Figure 23.

Figure 23. ND Filter Close Up

7.4 Illuminance Testing Theory For reliable light testing, the reference reading needs to be taken from the exact location every time. Light is very hard to keep uniform unless more specialized equipment is used. The highly specialized equipment was not available to test this reference design. When the light output cannot be forced into uniformity, it is even more imperative to take measurements from the same position inside the emitted light field. When a bulb emits light, it is never perfectly uniform. The brightness or intensity can change from changes in relative distance from light source. Changes are also seen when moving a lux meter on an equidistance plane in front of the light source. A cone-shape light emission usually appears from the light source or the light box.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 27 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Setup www.ti.com 7.5 Test Platform The test platform was created with on-hand parts to quickly come up with a solution for accurately testing the ambient light sensor. If more time was available, a more robust assembly would have been created. The test platform was also created using parts from Thor Labs to make a rotating-type jig to position the lux meter receptor window in the same position as the reference design’s. The underlying idea for the test platform was to create a type of machine that could position either the lux meter or the reference design’s OPT sensor in the same location in the emitted field with repeatability. The tester could then rotate the jig one direction to align the OPT part to take a reading and then rotate the jig in the opposite direction to align the lux meter. This setup allowed repeatability throughout the entire test process. A 3D printed block was created to align the lux meter receptor window at the same height and depth as the OPT sensor. Stop posts are located on either side of the jig to manage the maximum rotation of the jig (see Figure 25).

Stop post

Figure 24. 3D Print Lux Holder Figure 25. Jig Top View

Figure 26 demonstrates how this setup perfectly lines up each sensor in the same location for repeatability of readings. By aligning each board along its axis of rotation, the position is guaranteed to match.

Figure 26. Jig Mounting Diagram

Carefully align both the ambient light sensor and the lux meter in exactly the same location in space; the same XYZ space is critical for accurate measurements. A laser pointer or some other method can be used to determine the same location for each board on the jig.

28 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Test Results 8 Test Results

8.1 Light Testing Results Several important tests were completed to further the applicability of the OPT3001 device and its ability to sense the ambient light projected onto an LCD screen.

8.1.1 Multiple Light Sources The first test completed compares the output response versus the input Illuminance of multiple light sources, or bulb types. Fluorescent, halogen, and incandescent light were tested.

500 Halogen without shield 450 Incandescent without shield 400 CFL without shield 350 300 250 200 150 Output Illuminance (lx) Illuminance Output 100 50 0 0 100 200 300 400 500 Input Illumincance (lx) D006 Figure 27. Output Response versus Input llluminance — Multiple Light Sources

The test platform described in Section 7.5 was used to collect this data. The test platform was approximately 11 inches from the light box during each test. As demonstrated in the test data, various light sources have little effect on the output of the OPT3001. The ambient light sensor does a great job of sensing the intensity of light, no matter the type of light.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 29 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Results www.ti.com 8.1.2 Output Response versus Input Illuminance The next test showcases the OPT3001’s ability to closely measure the intensity of light from 0 lux to 83 klux. There is less than a 4% error at any one point. The LED array mentioned in the test equipment section (Section 7.3) was used to produce the needed intensity.

80000

70000

60000

50000

40000

30000

Output Response (lx) 20000

10000

0 0 10000 20000 30000 40000 50000 60000 70000 80000 Input Illumincance (lx) D001 Figure 28. Output Response versus Input Illuminance — Full Range, White LEDs

The data demonstrated good accuracy and range, but this test was not completed with the more accurate rotating test setup. In fact, a hole was drilled into the capacitive sensor above the OPT3001 sensor to mount the lux meter close to the ambient light sensor. Even more accurate results could have been achieved with the lux meter and OPT3001 positioned in the same location. The rotating jig had not been designed before starting this test. The partially mutilated board is shown in Figure 29. It was difficult with the tools at hand to drill a hole next to the OPT sensor, and because of this, the hole for the lux meter is not perfectly centered above the OPT3001. This could also account for some of the error seen in the graph.

Figure 29. Reference Design Modified for Testing with Lux Meter (Non-Ideal)

Figure 29 is not ideal for many measurements. The setup featured in Figure 24 through Figure 26 is a more ideal and preferred method.

30 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Test Results 8.1.3 Normalized Response versus Illuminance Angle The OPT3001 response can change depending on the illuminance angle. This test was originally done to compare how the light shield would change the response. However, the way the shield was designed does not affect the response too much. The extreme angles are greatly affected because the shield causes a shadow effect on itself at these positions. This test was completed by mounting the reference design vertically to a rotating mount and setting the LED array to emit 1000 lux of light. Then, data was taken at different degrees of rotation, both in the negative and positive direction. At zero degrees, the board is perfectly facing the emitted light. The results are shown in Figure 30.

1200 With shield Without shield 1000

800

600

400 NormalizedResponse (lx) 200

0 -90 -70 -50 -30 -10 10 30 50 70 90 Illuminance Angle (...°) D003 Figure 30. Normalized Response versus Illuminance Angle

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 31 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Results www.ti.com 8.2 Proximity Detection Range The Backlight and Smart Lighting Control by Ambient Light and Noise-Immune Proximity Sensor Reference Design provides proximity detection for system wake-up. To detect the proximity range, the board uses a copper PCB sensor. Table 3 summarizes the range results for two main cases: • Proximity range detected when powered from a laptop (running from battery): – Threshold: 0.0004 pF – Threshold: 0.0008 pF – Threshold: 0.0010 pF • Proximity range detected when powered from a wall wart: – Threshold: 0.0008 pF – Threshold: 0.0010 pF

Table 3. Sensing Range Summary

LAPTOP POWERED THRESHOLD WALL WART POWERED THRESHOLD MEASUREMENT 0.0004 pF 0.0008 pF 0.0010 pF 0.0008 pF 0.0010 pF Average range (in) 9.3 8.8 8.4 8.5 7.0 Average range (cm) 23.5 22.2 21.2 21.6 17.7 Standard deviation (in) 0.8 0.6 0.7 0.7 0.5 Standard deviation (cm) 2.0 1.6 1.7 1.8 1.3

The following figures show each test result with a standard deviation error bar. Proximity measurements were obtained by first allowing the moving average, or baseline, to settle. With a baseline, a hand approached the sensor until the system responded. This distance from the hand to the sensor was recorded for each of the five power and threshold combinations. The proximity test results were measured at room temperature.

30 30

25 25

20 20

15 15

10 10 Proximity Distance (cm) Proximity Distance (cm) 5 5

0 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 910 Test Number D002 Test Number D004 Figure 31. Proximity Distance When Laptop Powered Figure 32. Proximity Distance When Wall Wart Powered With a 0.0008-pF Threshold With a 0.0008-pF Threshold

32 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Test Results

30 30

25 25

20 20

15 15

10 10 Proximity Distance (cm) Proximity Distance (cm) 5 5

0 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 910 Test Number D003 Test Number D005 Figure 33. Proximity Distance When Laptop Powered Figure 34. Proximity Distance When Wall Wart Powered With a 0.0010-pF Threshold With a 0.0010-pF Threshold

27.5 25 22.5 20 17.5 15 12.5 10 7.5 Proximity Distance (cm) 5 2.5 0 1 2 3 4 5 6 7 8 9101112 Test Number D001 Figure 35. Proximity Distance When Laptop Powered With a 0.0004-pF Threshold As discussed in Section 2.3, several factors affect the sensor’s sensitivity. The sensor’s sensitivity was improved by selecting a drive current aimed for sensor oscillation amplitude of 1.2-V peak with no objects present. This was 0.413 mA. There is a trade-off between the sensing range and the refresh rate of the system. If the refresh rate is slower (that is, more averaging of the FDC2212 data), then the capacitance threshold can be set closer to the baseline, yielding a longer proximity sensing distance. For example, adjustments in the capacitance threshold can be seen when comparing the average of Figure 31, Figure 33, and Figure 35.

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 33 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Test Results www.ti.com 8.3 Temperature Testing Environment temperature has some effect on the capacitance reading. A temperature chamber was used to control temperature during testing. At each temperature data point, the board was allowed to soak for five minutes after the chamber reached the intended temperature. After the five-minute soak, one minute of UART data was captured and averaged to obtain the average reading at each temperature. Figure 36 shows the differential measurement between the larger front facing sensor and the smaller back facing sensor.

30.5

30.4

30.3

30.2

30.1

30

29.9 Capacitance (pF)

29.8

29.7

29.6 0 10 20 30 40 50 60 70 80 Temperature (°C) D006 Figure 36. Output Capacitance versus Temperature

34 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Design Files 9 Design Files

9.1 Schematics To download the schematics, see the design files at TIDA-00754.

USB Connection

90120-0122 VBUS J1 +3.3V Output 90120-0122 TP1 TP2 V_INPUT J3 3P3V J2 500mA Net 500mA Net 500mA Net V_INPUT TP3 i i i 500mA Net 500mA Net 1 L1 1 2 VBUS i U1 i

1 2

4 3 330 ohm 1 IN OUT 5 2 i 6 D- USB_D_N C1 D1 L2 C2 4 i 500mA Net NC 7 3 1000pF SMBJ6.0CA SRF2012-361YA 0.01µF C3 R1 3 C4 D+ USB_D_P EN 500mA Net 6V SH-J1 1µF 2 1µF 2000V 50V 0 GND 8 4 X7R 1 2 L3 X7R 16V 16V ID SH-J2 330 ohm X7R TLV71333PDBV X7R GND 5 GND USB_GND GND 1051330001 TP4 GND

USB_GND

USB ESD Protection

U2 USB_D_N 3 IO1 IO2 5 USB_D_P

NC 1 4 GND NC 2 TPD2E2U06DRL

USB_GND

LCD Display LCD Backlight & Driver

3P3V 3P3V U3A EA DOGM128W-6 35 31 C5 VDD CAP3P 1µF C6 34 30 16V C7 VDD2 CAP1N L4 1µF X7R 2.2µF D2 16V 10V 32 VOUT CAP1P 29 X7R C8 X7R 1µF GND C9 25 V4 CAP2P 28 VLF252015MT-100M 1µF 16V GND 10µH NSR0240V2T1G 16V C10 24 27 C11 X7R V3 CAP2N U4 X7R 1µF 1µF A1 C3 B0_SDA SDA IN 16V C12 23 16V GND V2 U3B X7R 1µF X7R A2 B0_SCL SCL 16V C13 22 26 A3 GND V1 VSS SW BLSW X7R 1µF B2 INTN 16V C14 GND 21 V0 VSS 33 OVP D1 OVP 1 18 LED_CA1 X7R 1µF SI SCL A0 CS1B RST B1 BL_EN HWEN GND 16V C15

X7R 1µF 36 37 38 40 39 C1 PWM C16 16V BL_PWM 1µF GND ILED1 D3 LED_CA1 2 19 LED_CA2 X7R 50V C2 SEL X7R GND GND ILED2 D2 B3 GND GND LED_CA2 3 20 LM3630ATME A0_SIMO A0_SCLK I2C Address = 011 0110 (x36) GND EA DOGM128W-6 LCD_A0 nCSB_LCD nRST_LCD ILED Figure 37. Power and Display Schematic

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 35 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Design Files www.ti.com

EM Connector for Wireless Connectivity JTA G Interface & ESD Protection UART_CTS R2 J4 J5 U5 A1_TX DNP P3.4 0 20 19 3P3V 20 19 J6 R3 2 1 A1_RX P3.5 A1_RX 2 1 SBWTCK R4 EM_CTS 18 17 R5 D3 18 17 1 3P3V DNP P3.6 0 R6 0 16 15 0 R7 1SS315TPH3F 16 15 2 TPD1E10B06DPYR DNP 0 EM_RX 14 13 0 R8 14 13 3 U6 SBWTCK EM_TX 12 11 0 12 11 4 2 1 UART_RTS SBWTDIO 2 1 SBWTDIO 10 9 10 9 5 8 7 8 7 R10 6 R9 TPD1E10B06DPYR A1_TX 6 5 R11 6 5 0 nRST_EM 0 4 3 R12 0 4 3 EM_RTS LPPB061NFSC-RC 2 1 R13 0 2 1 R14 0 GND GND nCSB_RF TFM-110-02-L-D-A R15 0 TFM-110-02-L-D-A 0 A0_SCLK A0_SIMO A0_SOMI GND GND

MSP430 Microcontroller

U7 AVCC 3P3V 3P3V 3P3V 1 48 USR_BTN_1 P1.0/TA0.1/DMAE0/RTCCLK/A0/C0/VREF-/VeREF- AVCC Reset & User Buttons 2 USR_BTN_2 P1.1/TA0.2/TA1CLK/COUT/A1/C1/VREF+/VeREF+ L5 3 37 3P3V C17 C18 C19 HDC_DRDY P1.2/TA1.1/TA0CLK/COUT/A2/C2 DVCC 330 ohm 3P3V 3P3V 3P3V R16 R17 9 0.1µF 1µF 10µF OPT_INT P1.3/TA1.2/UCB0STE/A3/C3 TP7 4.99k 4.99k 10 16V 16V 6.3V D4 nCSB_LCD P1.4/TB0.1/UCA0STE/A4/C4 11 C20 C21 C22 X7R X7R X7R A0_SCLK P1.5/TB0.2/UCA0CLK/A5/C5 R18 R19 R20 31 1µF 0.1µF 10µF B0_SDA P1.6/TB0.3/UCB0SIMO/UCB0SDA/TA0.0 47.5k 47.5k 47.5k 32 16V 16V 6.3V P1.7/TB0.4/UCB0SOMI/UCB0SCL/TA1.0 GND GND GND B0_SCL X7R X7R X7R SBWTDIO USR_BTN_1 USR_BTN_2 R21 24 P2.0/TB0.6/UCA0TXD/UCA0SIMO/TB0CLK/ACLK 221 A0_SIMO

2 1 2 1 2 1 25 GND GND GND TP8 A0_SOMI P2.1/TB0.0/UCA0RXD/UCA0SOMI/TB0.0 26 P2.2/TB0.2/UCB0CLK C23 S1 C24 S2 C25 S3 BL_PWM 39 P2.3/TA0.0/UCA1STE/A6/C10 2200pF 2200pF 2200pF nCSB_RF Q1 40 P2.4/TA1.0/UCA1CLK/A7/C11 TEST/SBWTCK 22 50V 50V 50V SBWTCK BSS138 20 P2.5/TB0.0/UCA1TXD/UCA1SIMO X7R 4 3 X7R 4 3 X7R 4 3 LED_1 A1_TX

4-1437565-1 50V 21 A1_RX P2.6/TB0.1/UCA1RXD/UCA1SOMI 38 23 P2.7 RST/NMI/SBWTDIO SBWTDIO 4 nRST_EM P3.0/A12/C12 GND GND GND 5 nRST_LCD P3.1/A13/C13 GND 6 LCD_A0 P3.2/A14/C14 7 BL_EN P3.3/A15/C15 27 P3.4 P3.4/TB0.3/SMCLK 28 P3.5 P3.5/TB0.4/COUT 29 P3.6 P3.6/TB0.5 30 P3.7/TB0.6 16 UART_RTS P4.0/A8 17 UART_CTS P4.1/A9 18 FDC_INTB P4.2/A10 19 FDC_SD P4.3/A11 33 P4.4/TB0.5 34 LED_1 P4.5 35 P4.6 8 P4.7

12 PJ.0/TDO/TB0OUTH/SMCLK/SRSCG1/C6 13 PJ.1/TDI/TCLK/MCLK/SRSCG0/C7 14 PJ.2/TMS/ACLK/SROSCOFF/C8 DVSS 36 15 PJ.3/TCK/SRCPUOFF/C9 45 PJ.4/LFXIN AVSS 47

1 46 PJ.5/LFXOUT AVSS 44 HFXIN 42 PJ.6/HFXIN AVSS 41 C26 Y1 DNP DNP 43 PJ.7/HFXOUT PAD 49 18pF NX3225GD-8MHZ-STD-CRA-3 DNI 2 8MHz HFXOUT MSP430FR5969IRGZ GND DNPC27 18pF GND DNI

GND Figure 38. MCU and EM Connector Schematic

36 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Design Files

Ambient Light Sensor Temperature / Humidity Sensor

AVCC_FLT 3P3V 3P3V

U9 C28 U8 R22 AVCC_FLT 0.1µF 1 VDD SDA 6 B0_SDA 10k 16V B1 VDD C29 2 5 X7R ADDR INT OPT_INT 0.1µF R23 A1 B0_SCL SCL 3 4 4.99k GND A2 C2 GND SCL B0_SCL B0_SDA SDA DNC 7 D2 PAD HDC_DRDY DRDY GND OPT3001DNP C1 ADR0 D1 B2 I2C Address = 100 0100 (x44) ADR1 GND GND HDC1010YPAR TP5 TP6 I2C Address = 100 0000 (x40) GND GND

3P3V R25 Capacitance-to-Digital Converter CIN & SHLD Selection Headers 0 C32 0.01µF

Y2 1 2 GND 4 3 3 4 VCC OUTPUT SENSOR2 IN1B_1 5 6 R27 1 2 7 8 DNP INH GND 0 SENSOR1 IN0B_1 KC2520B40.0000C10E00 AVCC_FLT 3P3V J7 GND 40 MHz GND L6 3 CLKIN VDD 7 C30 C31 C33 330 ohm IN0A_1 R24 IN0A 9 6 1µF 0.1µF 0.01µF SH-J3 SH-J4 IN0A SD FDC_SD IN0B 10 5 16V 16V 16V 0 IN0B INTB FDC_INTB X7R X7R X7R L7 11 IN1A C34 18µH 12 2 GND GND GND IN1B SDA B0_SDA 33pF 1 SCL B0_SCL 8 GND 13 4 R26 PAD ADDR IN0B_1 0 U10 FDC2212 I2C Address = 010 1010 (x2A) GND GND Figure 39. Sensors Schematic

TIDUB42B–December 2015–Revised May 2016 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune 37 Submit Documentation Feedback Proximity Sensor Reference Design Copyright © 2015–2016, Texas Instruments Incorporated Design Files www.ti.com 9.2 Bill of Materials To download the bill of materials (BOM), see the design files at TIDA-00754.

9.3 Layer Plots To download the layer plots, see the design files at TIDA-00754.

9.4 Altium Project To download the Altium project files, see the design files at TIDA-00754.

9.5 Gerber Files To download the Gerber files, see the design files at TIDA-00754.

9.6 Software Files To download the software files, see the design files at TIDA-00754.

10 References

1. Microsoft, Understanding and Interpreting Lux Values (https://msdn.microsoft.com/en- us/library/windows/desktop/dd319008%28v=vs.85%29.aspx)

11 About the Authors JARROD KREBS is a systems designer at Texas Instruments, where he is responsible for developing reference designs in the industrial segment. Jarrod has experience with software and embedded applications implemented on ARM-based microcontrollers and TI’s MSP430 platforms. Jarrod earned his bachelor of science in computer engineering from Kansas State University in Manhattan, KS. Jarrod is also a member of the Institute of Electrical and Electronics Engineers (IEEE). ADAM YAGER is a systems architect at Texas Instruments where he is responsible for developing reference design solutions for the industrial segment. Adam earned his bachelor of science in electrical engineering (BSEE) from the University of Cincinnati.

38 Backlight and Smart Lighting Control by Ambient Light and Noise-Immune TIDUB42B–December 2015–Revised May 2016 Proximity Sensor Reference Design Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated www.ti.com Revision B History

Revision B History NOTE: Page numbers for previous revisions may differ from page numbers in the current version.

Changes from A Revision (March 2016) to B Revision ...... Page

• Changed to updated schematic...... 35 • Changed to updated schematic...... 36 • Changed to updated schematic...... 37

Revision A History

Changes from Original (December 2015) to A Revision ...... Page

• Changed from preview page...... 1

TIDUB42B–December 2015–Revised May 2016 Revision History 39 Submit Documentation Feedback Copyright © 2015–2016, Texas Instruments Incorporated IMPORTANT NOTICE FOR TI REFERENCE DESIGNS

Texas Instruments Incorporated (‘TI”) reference designs are solely intended to assist designers (“Designer(s)”) who are developing systems that incorporate TI products. TI has not conducted any testing other than that specifically described in the published documentation for a particular reference design. TI’s provision of reference designs and any other technical, applications or design advice, quality characterization, reliability data or other information or services does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI products, and no additional obligations or liabilities arise from TI providing such reference designs or other items. TI reserves the right to make corrections, enhancements, improvements and other changes to its reference designs and other items. Designer understands and agrees that Designer remains responsible for using its independent analysis, evaluation and judgment in designing Designer’s systems and products, and has full and exclusive responsibility to assure the safety of its products and compliance of its products (and of all TI products used in or for such Designer’s products) with all applicable regulations, laws and other applicable requirements. Designer represents that, with respect to its applications, it has all the necessary expertise to create and implement safeguards that (1) anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that might cause harm and take appropriate actions. Designer agrees that prior to using or distributing any systems that include TI products, Designer will thoroughly test such systems and the functionality of such TI products as used in such systems. Designer may not use any TI products in life-critical medical equipment unless authorized officers of the parties have executed a special contract specifically governing such use. Life-critical medical equipment is medical equipment where failure of such equipment would cause serious bodily injury or death (e.g., life support, pacemakers, defibrillators, heart pumps, neurostimulators, and implantables). Such equipment includes, without limitation, all medical devices identified by the U.S. Food and Drug Administration as Class III devices and equivalent classifications outside the U.S. Designers are authorized to use, copy and modify any individual TI reference design only in connection with the development of end products that include the TI product(s) identified in that reference design. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of the reference design or other items described above may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. TI REFERENCE DESIGNS AND OTHER ITEMS DESCRIBED ABOVE ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING THE REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, INCLUDING BUT NOT LIMITED TO ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON- INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS. TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY DESIGNERS AGAINST ANY CLAIM, INCLUDING BUT NOT LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS AS DESCRIBED IN A TI REFERENCE DESIGN OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR ARISING OUT OF THE REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TI’s standard terms of sale for semiconductor products (http://www.ti.com/sc/docs/stdterms.htm) apply to the sale of packaged integrated circuit products. Additional terms may apply to the use or sale of other types of TI products and services. Designer will fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of Designer’s non- compliance with the terms and provisions of this Notice.IMPORTANT NOTICE

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2016, Texas Instruments Incorporated