Electronic devices with ambient light sensors

An electronic device may be provided with a display mounted in a housing. The display may have an array of pixels that form an active area and may have an inactive area that runs along an edge of the active area. An opaque layer may be formed on an inner surface of a display cover layer in the inactive area of the display or may be formed on another transparent layer in the electronic device. An optical component window may be formed from the opening and may be aligned with an ambient light sensor such as a color ambient light sensor. The color ambient light sensor may have an infrared-blocking filter to block infrared light such as infrared light emitted by an infrared-light-emitting diode in the device. A light diffuser layer, light guide, and other structures may also be included in the ambient light sensor.

FIELD

This relates generally to electronic devices, and, more particularly, to electronic devices with optical components such as ambient light sensors.

BACKGROUND

Electronic devices such as laptop computers, cellular telephones, and other equipment are sometimes provided with optical components. For example, an electronic device may have an ambient light sensor, an optical proximity sensor, image sensors, and light sources.

The desire to include multiple optical components in an electronic device can pose challenges. It can be difficult to incorporate optical components into an electronic device where space is at a premium. There is also a potential for different optical components to interfere with each other during operation.

SUMMARY

An electronic device may be provided with a display mounted in a housing. The display may have an active area with an array of pixels for forming images and may have an inactive area along one or more edges of the active area. Optical component windows may be formed in the inactive area and other portions of the electronic device. Optical components such as light-emitting diodes, image sensors, optical proximity sensors, and ambient light sensors may be aligned with the optical component windows.

An ambient light sensor may have a light detector integrated circuit with photodetectors. To provide the ambient light sensor with color sensing capabilities, the photodetectors may each be provided with a respective color filter configured to pass a different range of wavelengths.

A diffuser may be used to diffuse incoming ambient light. Infrared light-blocking filter layers may be use to block infrared light such as infrared light emitted by an infrared light-emitting diode in the electronic device and other stray infrared light.

A light guide may be used to route ambient light to the light detector integrated circuit. The light guide may be interposed between a light diffuser and an infrared-blocking filter.

Operation of an ambient light sensor may be coordinated with an infrared light-emitting component such as an infrared light-emitting diode used to provide infrared light illumination for an infrared image sensor.

DETAILED DESCRIPTION

An illustrative electronic device of the type that may be provided with optical components such as ambient light sensors is shown inFIG. 1. Electronic device10may be a computing device such as a laptop computer, a computer monitor containing an embedded computer, a tablet computer, a cellular telephone, a media player, or other handheld or portable electronic device, a smaller device such as a wrist-watch device, a pendant device, a headphone or earpiece device, a device embedded in eyeglasses or other equipment worn on a user's head, or other wearable or miniature device, a television, a computer display that does not contain an embedded computer, a gaming device, a navigation device, an embedded system such as a system in which electronic equipment with a display is mounted in a kiosk or automobile, equipment that implements the functionality of two or more of these devices, or other electronic equipment.

Device10may have input-output circuitry such as input-output devices12. Input-output devices12may include user input devices that gather user input and output components that provide a user with output. Devices12may also include communications circuitry that receives data for device10and that supplies data from device10to external devices. Devices12may also include sensors that gather information from the environment.

Input-output devices12may include one or more displays such as display14. Display14may be a touch screen display that includes a touch sensor for gathering touch input from a user or display14may be insensitive to touch. A touch sensor for display14may be based on an array of capacitive touch sensor electrodes, acoustic touch sensor structures, resistive touch components, force-based touch sensor structures, a light-based touch sensor, or other suitable touch sensor arrangements. Display14may be a liquid crystal display, a light-emitting diode display (e.g., an organic light-emitting diode display), an electrophoretic display, or other display.

Input-output devices12may include optical components18. Optical components18may include light-emitting diodes and other light sources. As an example, optical components18may include one or more visible light-emitting diodes such as light-emitting diode20. Light-emitting diode20may provide constant illumination (e.g., to implement a flashlight function for device10) and/or may emit pulses of flash illumination for a visible light camera such as visible light image sensor26. Optical components18may also include an infrared light source (e.g., a laser, lamp, light-emitting diode, etc.) such as infrared light-emitting diode22. Infrared light-emitting diode22may provide constant and/or pulsed illumination at an infrared wavelength such as 940 nm, a wavelength in the range of 800-1100 nm, etc. For example, infrared-light-emitting diode22may provide constant illumination for an infrared camera such as infrared image sensor28. Infrared image sensor28may, as an example, be configured to capture iris scan information from the eyes of a user and/or may be used to capture images for a facial recognition process implemented on control circuitry16.

Optical components18may also include optical proximity detector24and ambient light sensor30.

Optical proximity detector24may include an infrared light source such as an infrared light-emitting diode and a corresponding light detector such as an infrared photodetector for detecting when an external object that is illuminated by infrared light from the light-emitting diode is in the vicinity of device10.

Ambient light sensor30may be a monochrome ambient light sensor that measures the intensity of ambient light or may be a color ambient light sensor that measures ambient light color and intensity by making light measurements with multiple photodetectors each of which is provided with a corresponding color filter (e.g., a corresponding bandpass filter that passes red light, blue light, yellow light, green light, or light of other colors) and each of which therefore responds to ambient light in a different wavelength band.

In addition to optical components18, input-output devices12may include buttons, joysticks, scrolling wheels, touch pads, key pads, keyboards, microphones, speakers, tone generators, vibrators, cameras, light-emitting diodes and other status indicators, non-optical sensors (e.g., temperature sensors, microphones, capacitive touch sensors, force sensors, gas sensors, pressure sensors, sensors that monitor device orientation and motion such as inertial measurement units formed from accelerometers, compasses, and/or gyroscopes), data ports, etc. A user can control the operation of device10by supplying commands through input-output devices12and may receive status information and other output from device10using the output resources of input-output devices12.

Device10may have a housing. The housing may form a laptop computer enclosure, an enclosure for a wristwatch, a cellular telephone enclosure, a tablet computer enclosure, or other suitable device enclosure. A perspective view of a portion of an illustrative electronic device is shown inFIG. 2. In the example ofFIG. 2, device10includes a display such as display14mounted in housing32. Housing32, which may sometimes be referred to as an enclosure or case, may be formed of plastic, glass, ceramics, fiber composites, metal (e.g., stainless steel, aluminum, etc.), other suitable materials, or a combination of any two or more of these materials. Housing32may be formed using a unibody configuration in which some or all of housing32is machined or molded as a single structure or may be formed using multiple structures (e.g., an internal frame structure, one or more structures that form exterior housing surfaces, etc.). Housing32may have any suitable shape. In the example ofFIG. 2, housing32has a rectangular outline (footprint when viewed from above) and has four peripheral edges (e.g., opposing upper and lower edges and opposing left and right edges). Sidewalls may run along the periphery of housing32.

Display14may be protected using a display cover layer such as a layer of transparent glass, clear plastic, sapphire, or other clear layer (e.g., a transparent planar member that forms some or all of a front face of device10or that is mounted in other portions of device10). Openings may be formed in the display cover layer. For example, an opening may be formed in the display cover layer to accommodate a button, a speaker port such as speaker port34, or other components. Openings may be formed in housing32to form communications ports (e.g., an audio jack port, a digital data port, etc.), to form openings for buttons, etc. In some configurations, housing32may have a rear housing wall formed from a planar glass member or other transparent layer (e.g., a planar member formed on a rear face of device10opposing a front face of device10that includes a display cover layer).

Display14may have an array of pixels38in active area AA (e.g., liquid crystal display pixels, organic light-emitting diode pixels, electrophoretic display pixels, etc.). Pixels38of active area AA may display images for a user of device10. Active area AA may be rectangular, may have notches along one or more of its edges, may be circular, may be oval, may be rectangular with rounded corners, and/or may have other suitable shapes.

Inactive portions of display14such as inactive border area IA may be formed along one or more edges of active area AA. Inactive border area IA may overlap circuits, signal lines, and other structures that do not emit light for forming images. To hide inactive circuitry and other components in border area IA from view by a user of device10, the underside of the outermost layer of display14(e.g., the display cover layer or other display layer) may be coated with an opaque masking material such as a layer of black ink (e.g., polymer containing black dye and/or black pigment, opaque materials of other colors, etc.) and/or other layers (e.g., metal, dielectric, semiconductor, etc.). Opaque masking materials such as these may also be formed on an inner surface of a planar rear housing wall formed from glass, ceramic, polymer, crystalline transparent materials such as sapphire, or other transparent material.

In the example ofFIG. 2, speaker port34is formed from an elongated opening (e.g., a strip-shaped opening) that extends along a dimension parallel to the upper peripheral edge of housing32. A speaker may be mounted within device housing32in alignment with the opening for speaker port34. During operation of device10, speaker port34serves as an ear speaker port for a user of device10(e.g., a user may place opening34adjacent to the user's ear during telephone calls).

Optical components18(e.g., a visible digital image sensor, an infrared digital image sensor, a light-based proximity sensor, an ambient light sensor, visible and/or infrared light-emitting diodes that provide constant and/or pulsed illumination, etc.) may be mounted under one or more optical component windows such as optical component windows40and42. In the example ofFIG. 2, windows40have circular outlines (e.g., circular footprints when viewed from above) and window42has an elongated strip-shaped opening (e.g., an elongated strip-shaped footprint when viewed from above). Window42is mounted between the sidewall along the upper peripheral edge of device10and speaker port34and extends parallel to the upper peripheral edge of housing32. If desired, windows such as optical windows40and42may have shapes other than circular and rectangular shapes. The examples ofFIG. 2are merely illustrative.

Optical component windows such as windows40and42may be formed in inactive area IA of display14(e.g., an inactive border area in a display cover layer such as an inactive display region extending along the upper peripheral edge of housing32) or may be formed in other portions of device10such as portions of a rear housing wall formed from a transparent member coated with opaque masking material, portions of a metal housing wall, polymer wall structures, etc. In the example ofFIG. 2, windows40and42are formed adjacent to the upper peripheral edge of housing32between speaker port opening34in the display cover layer for display14and the sidewall along the upper edge of housing32. In some configurations, an opaque masking layer is formed on the underside of the display cover layer in inactive area IA and optical windows40and42are formed from openings within the opaque masking layer. To help optical windows40and42visually blend with the opaque masking layer, a dark ink layer, a metal layer, a thin-film interference filter formed from a stack of dielectric layers, and/or other structures may be overlap windows40and42.

In some modes of operation, device10may emit infrared light that has the potential to interfere with ambient light sensor operation. Consider, as an example, a scenario in which control circuitry16of device10is using infrared image sensor28to capture eye scan information and/or facial images (e.g., images of a user's face for use in performing face recognition operations to authenticate the user of device10). As shown inFIG. 3, to ensure that the eyes and/or face of a user are sufficiently illuminated, device10may use infrared light source22(e.g., an infrared light-emitting diode, an infrared laser, etc.) to produce infrared light48. Light48may illuminate external objects in the vicinity of device10such as external object44(e.g., a user's face and/or eyes). Reflected infrared light50from external object44may be received and imaged using infrared digital image sensor28to produce infrared images of the face and/or eyes.

While reflected infrared light50is being imaged, stray infrared light reflected from object44such as stray infrared light52may be present at ambient light sensor30. To ensure that stray infrared light52does not interfere with the ambient light measurements being made with ambient light sensor30, ambient light sensor30may have an infrared blocking filter such as filter60. Filter60may be formed from materials that are transparent to visible light and that block infrared light such as blue glass (e.g., blue borosilicate glass or other infrared-light-blocking glass) and/or from thin-film interference filters formed from stacks of dielectric layers configured to block infrared light (e.g., infrared light at the wavelengths associated with stray light52and, if desired, additional infrared wavelengths) while passing visible light.

Ambient light54may be present in the surroundings of device10and may include light emitted from a light source such as light source46(e.g., the sun, a lamp, etc.). In some situations, ambient light54may be directional (e.g., the rays of light54from light source46may be aligned in a particular direction due to the nature of light source46). To ensure that the response of ambient light detector30is even over a range of different orientations relative to light source46and ambient light54, a light diffuser such as diffuser62may be incorporated into ambient light sensor30. Ambient light sensor30may have one or more photodetectors (e.g., photodiodes) and associated amplifier and digitizing circuitry implemented on light detector integrated circuit58. Diffuser62may overlap visible-light-transmitting-and-infrared-light-blocking filter layer60and integrated circuit58.

Diffuser62may be formed from polymer, glass, or other suitable materials. Diffuser62may be formed from one or more diffuser layers such as illustrative diffuser62L ofFIG. 4. If desired, each diffuser layer62L may have a substrate such as substrate64. Substrate64may be formed from clear glass, transparent polymer, or other suitable substrate material. Diffuser coatings such as lower coating layer66and upper coating layer66′ may be formed on both sides of substrate64, on only the upper side of substrate64(see, e.g., coating layer66′), or on only the lower side of substrate64(see, e.g., coating layer66). Coating layers66and66′ may include polymer (e.g., clear binder such as a transparent polymer resin) such as polymer70and may include light-scattering particles68embedded in polymer70. Light-scattering particles68may be titanium oxide particles or other particles with a refractive index that is larger (or smaller) than the refractive index of polymer70. If desired, light-scattering particles68may be incorporated into substrate64. Light-scattering coatings formed from polymer with embedded light-scattering particles may also be formed on a display cover layer, light guide structures, filter layers, and/or other transparent materials in device10. If desired, light-scattering features such as protrusions and/or recesses may also be included in one or more of the layers of material forming diffuser62. With one illustrative configuration, diffuser62may include a pair of diffuser layers62L (e.g., first and second diffusers62that are stacked above light detector integrated circuit58(FIG. 3). In general, any suitable number of diffuser layers62L may be included in diffuser62(e.g., one, at least two, at least three, etc.).

Visible-light-transmitting-and-infrared-light-blocking filter60(sometimes referred to as an infrared-light-blocking filter, infrared-blocking filter, etc.) may be formed from one or more layers such as infrared-light-blocking layer60L ofFIG. 5. As shown inFIG. 5, layer60L may include a substrate such as substrate76. Substrate76may be a polymer or glass layer that is transparent at visible wavelengths. Substrate76may be transparent at infrared wavelengths or may block infrared light. Thin-film interference filters72that are configured to transmit visible light and block infrared light may be formed on the upper and/or lower surfaces of substrate76. Filters72may each include a dielectric stack of thin-film dielectric layers74such as inorganic dielectric layers with alternating higher and lower refractive index values. Layers74may, for example, be formed from inorganic dielectric materials such as silicon oxide, silicon nitride, niobium oxide, tantalum oxide, titanium oxide, aluminum oxide, etc., and/or may be formed from organic dielectric materials. There may be any suitable number of layers74in each dielectric stack (e.g., at least 5, at least 10, at least 30, at least 40, 20-90, fewer than 100, etc.).

In general, sensor30may include one or more infrared blocking filters such as filter60and each filter60may include one or more infrared blocking layers60L. Each layer60L may include one or more dielectric stacks72of thin-film layers74. If desired, thin-film infrared-light-blocking filters may be implemented from dielectric stacks formed on a display cover layer, a light guide layer, a lens, a diffuser, an integrated circuit, and/or other structures in ambient light sensor30through which ambient light passes.

FIG. 6shows an illustrative configuration for a color ambient light sensor in device10. In the example ofFIG. 6, color ambient light sensor30is formed in alignment with optical component window40(sometimes referred to as an ambient light sensor window) in display14. Display14has an array of pixels overlapped by display cover layer78in an active area (AA) of display14(not shown inFIG. 6). In inactive area IA, portions of the underside of display cover layer78may be coated with a layer of opaque masking material80(e.g., black ink, etc.) to block internal components from view from the exterior of device10. Window40may be formed from an opening in the opaque masking material80. In window40, a thin layer of black ink82or other material that is at least partially transparent to visible light (e.g., a layer with a light transmission of at least 1%, at least 2%, at least 5%, 1-10%, less than 30%, etc.) may be present to help visually match the appearance of window40to the visual appearance of surrounding portions of display cover layer78(e.g., to match the appearance of opaque masking material80) while still allowing ambient light sensor30to measure ambient light.

Color ambient light sensor30may include support structures such as support structure86(sometimes referred to as a sensor wall, a sensor body structure, a sensor housing structure, etc.). Clear adhesive such as a layer of pressure sensitive adhesive84may be used to couple support structure86to the underside of display cover layer78in alignment with optical component window40. Support structure86may form walls that surround light diffuser62, infrared-light-blocking filter60, and light detector integrated circuit58. Viewed from above through layer78, support structure86may extend around the periphery of optical window40. Support structure86may be formed from an opaque material that blocks visible and infrared light such as black plastic and/or other opaque materials. Support structure86may be used to form a one-piece or a multi-piece housing for sensor30. In the example ofFIG. 6, support structure86has an upper portion that houses components such as light diffuser62and infrared-light-blocking filter60and has a lower portion that houses light detector integrated circuit58. The upper and lower portions may be joined using pressure sensitive adhesive111or other suitable attachment mechanism.

Diffuser62ofFIG. 6has an upper diffuser layer62L and a lower diffuser layer62L. In the upper diffuser layer, substrate64(FIG. 4) may be coated with upper diffuser coating66′ and may not have any lower diffuser coating. In the lower diffuser layer, substrate64may be coated with lower diffuser coating66and coating66′ may be omitted. Air gaps88may separate diffuser layers62L from each other and from adjacent layers in ambient light sensor30(e.g., to enhance the amount of space available for light mixing).

Infrared-light-blocking filter60may be formed from upper and lower infrared light-blocking layers60L. Each layer may include a substrate and a thin-film filter dielectric stack on one or both sides of the substrate configured to block infrared light while passing visible light.

Pressure sensitive adhesive rings90may separate layers62L and60L from each other. Pressure sensitive adhesive ring116may be used to couple printed circuit94to support structures86.

Light detector integrated circuit58may be formed from a silicon die or other semiconductor die. Wire bonds100may be used to couple wire bond pads on integrated circuit58to wire bond pad on printed circuit94. Solder joints98may be used to couple signal paths formed from metal traces112in flexible printed circuit96to signal paths114in printed circuit94(e.g., signal paths formed from metal lines in printed circuit94that are coupled to wire bonds100). In this way, the circuitry of light detector integrated circuit58is coupled to the signal paths in flexible printed circuit96(e.g., so that these signal paths may route signals to and from control circuitry16). If desired, light detector integrated circuit58ofFIG. 6may be provided with through-silicon vias to electrically couple circuitry in integrated circuit58to printed circuit94without using bond wires.

Light detector integrated circuit58may include multiple photodetectors102(e.g., photodiodes). Each photodetector102may be overlapped by a respective color filter108. Each color filter may be formed from colored ink or other material that selectively passes a desired range of wavelengths to an associated overlapped photodetector102(e.g., an organic color filter material such as polymer containing dyes and/or pigments). For example, a red-pass color filter may overlap a first photodetector102to form a red-light-sensing channel in ambient light sensor30, a blue-pass color filter may overlap a second photodetector102to form a blue-light-sensing channel in ambient light sensor30, etc. Stray infrared light may be blocked using a thin-film interference filter such as filter104formed from a stack of dielectric layers (e.g., alternating higher and lower refractive index thin-film inorganic layers). Filter104may, for example, have a configuration of the type described in connection with dielectric stack72ofFIG. 5. Filter104may be formed from any suitable number of dielectric layers100(e.g., at least 5, at least 10, at least 20, 20-80, fewer than 100, etc.). Layers100may be formed on the upper surface of light detector integrated circuit58overlapping each of photodetectors102and interposed between color filters108and photodetectors102. Encapsulant92(e.g., a clear polymer such as epoxy) may be used to protect the silicon integrated circuit die that forms integrated circuit58from environmental contamination.

Light transmission curves120and122ofFIG. 7represent illustrative light transmission characteristics (band-pass characteristics) for color filters108. Curve120may, as an example, be associated with a blue color filter and may cover a range of blue wavelengths, whereas curve122may be associated with a green color filter and may cover green wavelengths (as an example). As shown inFIG. 7, dye and/or pigment based color filters formed from organic materials (e.g., polymer colored with dye and/or pigment) may be transparent at infrared wavelengths. To ensure that stray infrared light that passes through color filters108does not reach photodetectors102, visible-light-transmitting-and-infrared-light blocking layer (filter)104may have a light transmission characteristic of the type shown by curve124ofFIG. 8that blocks infrared light. Configurations may also be used for ambient light sensor30in which the color filter for each channel in color ambient light sensor30ofFIG. 6is formed from a thin-film interference filter configured to serve as a bandpass filter for a range of wavelengths associated with that channel.

If desired, an ambient light sensor may include a light guide. The light guide may help route incoming ambient light to light detector integrated circuit58past an electrical component such as a speaker. Consider, as an example, the arrangement shown inFIG. 9.FIG. 9is a cross-sectional side view of the upper edge portion of device10ofFIG. 2. As shown inFIG. 9, display cover layer78may overlap an array of pixels38for display14in active area AA. In inactive area IA, speaker126may be mounted in alignment with speaker port34in display cover layer78. Speaker126may be relatively wide and the amount of space between speaker126and the adjacent sidewall of housing32(e.g., the topmost peripheral edge of housing32inFIG. 2) may accordingly be relatively small. This constrains the amount of lateral space available for accommodating color ambient light sensor30near display cover layer78.

Color ambient light sensor30may have a lower portion such as portion30L that is relatively wide to house light detector integrated circuit58and may have a narrower upper portion such as portion30T that contains a light guide and that can therefore be accommodated in the relatively narrow space between speaker126and sidewall32W of housing32. The light guide in portion30T is interposed between speaker126and housing sidewall32SW along the upper peripheral edge of housing32. To help provide incoming ambient light54to the photodetectors in light detector integrated circuit58in the limited space available between speaker port34and housing sidewall32SW of housing32, the light guide of ambient light sensor portion30T may be configured to guide incoming light54from optical component window34to photodetectors on light detector integrated circuit58past speaker126.

FIG. 10is a cross-sectional side view of an illustrative color ambient light sensor with a light guide of the type shown inFIG. 9. As shown inFIG. 10, color ambient light sensor30may include support structure86(sometimes referred to as an ambient light sensor housing structure, housing, body, etc.). Support structure86may be formed from an opaque material such as black polymer. An upper portion of support structure86in portion30T of sensor30may be coupled to a lower portion of support structure86in portion30L of sensor30using pressure sensitive adhesive130.

Light guide132, which may sometimes be referred to as a light pipe, waveguide, or light guide structure, may have a core such as core134and a cladding such as cladding136that surrounds core134. Core134may have a higher index of refraction than cladding136to promote total internal reflection and guiding of ambient light54within light guide132. For example, core134may have an index of refraction of 1.5-2.0 and cladding136may have an index of refraction of 1.1-1.5 (as examples). Core134and cladding136may be formed from glass, polymer, sapphire or other transparent crystalline material, or other transparent material. As an example, core134may be formed from glass and cladding136may be formed from a polymer having a lower index of refraction than the glass of core134. Configurations in which cladding136is omitted and in which core134is surrounded by an air gap to ensure that light is guided within core134in accordance with the principal of total internal reflection may also be used, if desired. In arrangements in which cladding136is present, dust and other contaminants that might otherwise contact the outer surface of core134can be prevented from contacting core134. This can improve the reliability of light guide132. The presence of cladding136may also help support light guide132within support structure86and may thereby help enhance the ability of light guide132to withstand damage during a drop event.

Diffuser62may diffuse incoming ambient light54and may be located between the upper surface of light guide132and the lower surface of display cover layer78(FIG. 9). After propagating through light guide132, ambient light54may pass through visible-light-transmitting-and-infrared-light blocking filter60. Filter60may be mounted in a recessed portion of support structure86in lower portion30L and may be coupled to support structure86using a ring of pressure sensitive adhesive90. Rings of pressure sensitive adhesive90may also separate diffuser layers62L from each other and from light guide132to form air gaps88. Filter60may have a substrate such as substrate76ofFIG. 5(e.g., an infrared-light-blocking glass layer such as a blue borosilicate glass layer or other glass layer that prevents passage of infrared light) and may have upper and lower dielectric stacks72on the glass layer that are formed from thin-film inorganic dielectric layers or other dielectric layers74with alternating higher and lower refractive index values. Stacks72form a thin-film interference filter that passes visible light while blocking infrared light. Because filter60is located close to light detector integrated circuit58(e.g., because filter60is between light guide132and integrated circuit58), stray infrared light that enters into the interior of support structure86(e.g., at locations near adhesive130) will be blocked and prevented from reaching light detector integrated circuit58. If desired, infrared filters such as filter60may be placed elsewhere in color ambient light sensor30such as between diffuser62and light guide132.

Color filters108(e.g., band pass filters having pass bands in different wavelength ranges) may be formed over respective photodetectors102in integrated circuit58to provide ambient light sensor30with color light sensitivity. Encapsulant92(e.g., one or more layers of clear polymer such as epoxy, etc.) may be used to cover integrated circuit58. Wire bonds100, traces114in printed circuit94, solder joints98, and traces112in flexible printed circuit96may be used to route signals between control circuitry16and integrated circuit58. If desired, light detector integrated circuit58ofFIG. 10may be provided with through-silicon vias to electrically couple circuitry in integrated circuit58to printed circuit94without using bond wires.

As shown inFIG. 11, color filters108ofFIG. 10may be thin-film interference filters. Each color filter108for color ambient light sensor30ofFIG. 10may, for example, have a stack of 5-100 dielectric layers170(e.g., inorganic dielectric layers such as silicon oxide, niobium oxide, aluminum oxide, tantalum oxide, titanium oxide, silicon nitride, etc. and/or organic dielectric layers) with alternating refractive index values to form desired bandpass color filters for respective photodetectors102in integrated circuit58. Transmission versus wavelength characteristics for illustrative color filters108of the type shown inFIG. 11are shown by curves172and174inFIG. 12. As shown inFIG. 12, the thin-film interference filter structures that are used in forming filters108may be configured to block infrared light.

An illustrative circular photodetector layout for photodetectors102of integrated circuit58ofFIG. 6is shown inFIG. 13. An illustrative elongated rectangular layout for photodiodes102of integrated circuit58ofFIG. 10is shown inFIG. 14. Other configurations may be used, if desired. In arrangements of the type shown inFIGS. 13 and 14, photodetectors for different color channels can be distributed throughout sensor30and, if desired, redundant photodetectors (e.g., photodetectors measuring the same color of ambient light) may be included in ambient light sensor30. As an example, photodetectors102ofFIG. 13and/orFIG. 14may include photodetectors for 3-10 different color channels (including an optional clear color channel) and each color channel may have 1-5 different individual photodetectors102for gathering ambient light color readings for that color channel. Circuitry in integrated circuit58(e.g., switching circuitry, amplifier circuitry, analog-to-digital conversion circuitry, communications circuitry for supporting communications with control circuitry elsewhere in device10, etc.) may be incorporated into integrated circuit58with photodetectors102or, if desired, some or all of this supporting circuitry for photodetectors102may be formed in one or more integrated circuits that are separate from integrated circuit58.

Ambient light sensor measurements from ambient light sensor30may be used to control the operation of device10. For example, control circuitry16may adjust the intensity of images displayed on display14in response to measured changes in the intensity of ambient light. If, as an example, a user moves device10to a bright outdoors environment, control circuitry16may increase the brightness of display14to overcome glare. Color changes (e.g., white point adjustments) can also be made based on ambient light sensor measurements. If, for example, ambient light color measurements indicate that ambient lighting has become warm (e.g., when a user moves device10indoors), the white point of display14can be adjusted by control circuitry16so that display14displays corresponding warmer content.

If desired, the gathering of ambient light sensor measurements and the illumination of external objects using light sources such as infrared light-emitting diode22may be coordinated. With one illustrative arrangement, ambient light sensor measurements may momentarily be paused whenever light-emitting diode22emits a pulse of light. With another illustrative arrangement, a flag may be set whenever light-emitting diode22is activated during the gathering of ambient light sensor measurements (e.g., so that these measurements, which may be contaminated by noise from the light from diode22, may be discarded). In yet another embodiment, potential light contamination from adjacent electronic devices may be detected using a light sensor (e.g., an infrared light sensor). If light from nearby devices is detected, ambient light sensor measurements can be discarded.

FIG. 15is a circuit diagram of illustrative circuitry for device10that may be used in coordinating the operation of ambient light sensing circuitry and light-emitting circuitry in accordance with an embodiment. As shown inFIG. 15, ambient light sensor30may be formed from a photodetector such as a photodiode. The output of photodetector (ambient light sensor)30may be provided to integrating analog-to-digital converter190. During operation, integrating analog-to-digital converter190may integrate the photodiode current associated with the photodetector of ambient light sensor30and may supply corresponding digital ambient light sensor measurement data to control circuitry16. The time periods during which ambient light sensor30gathers ambient light data can be controlled by control circuitry16. For example, control circuitry16can supply control signals (sometimes referred to as a HOLD signal) to switching circuitry such as switches192and194. When the hold signal is asserted, switch192is closed and shorts node N to ground, thereby shunting the photodiode current from the photodiode of ambient light sensor30to ground. At the same time, assertion of the hold signal opens switch194, so that node N is disconnected from the input to integrating analog-to-digital converter190. When the HOLD signal is deasserted, switch192is opened and switch194is closed, so that integrating analog-to-digital converter190can gather ambient light data.

Control circuitry16can also control the operation of circuitry196such as infrared light-emitting diode22and infrared image sensor28(e.g., using enable signals). For example, control circuitry16can direct light-emitting diode22to emit a pulse of light while directing image sensor28to capture an image frame (e.g., an image frame containing facial information or other user biometric information). In some configurations, control circuitry16may gather light measurements from a light sensor such as infrared light sensor198(e.g., an infrared photodetector such as a photodiode).

In one illustrative arrangement, control circuitry16uses switches192and194to momentarily pause the integration of ambient light sensor signals whenever infrared-light-emitting diode22is being used to emit a pulse of infrared illumination. This helps prevent infrared-induced noise in the visible ambient light measurements being made with ambient light sensor30. Consider, as an example, the scenario ofFIGS. 16 and 17. In this arrangement, control circuitry16is using ambient light sensor30to measure ambient light over a time period that extends from time t0to time t5. The duration of this period (e.g., t5-t0) may be, for example, 100-700 ms, at least 25 ms, at least 40 ms, at least 75 ms, at least 150 ms, at least 300 ms, less than 150 ms, less than 500 ms, less than 700 ms, less than 900 ms, or other suitable time period.

Control circuitry16may capture images with infrared image sensor28during ambient light sensor data acquisition. For example, a user may awaken device10from a sleep state to use device10. Immediately upon awakening device10(e.g., at a time such as time t0), control circuitry16may begin capturing image data with circuitry196(e.g., to allow a user to biometrically authenticate as an authorized user of device10) while beginning to gather ambient light sensor measurements with ambient light sensor30(e.g., so that screen brightness of display14can be adjusted based on the ambient light sensor data as device10exits sleep mode). Because the infrared illumination produced by light-emitting diode22has the potential to create noise in the signal measurements gathered with ambient light sensor30, control circuitry16can synchronize the operation of circuitry196and ambient light sensor30. In particular, each time control circuitry16directs light-emitting diode22to output infrared light (for illuminating external objects being imaged by image sensor28), control circuitry16may also direct ambient light sensor30to temporarily pause the gathering (integrating) of ambient light sensor data.

As shown inFIG. 18, the infrared light output (IR) of light-emitting diode22may be supplied in one or more sets of pulses200. Each set of pulses200may include one or more pulses of light (e.g., at least 1, at least 2, at least 4, at least 8, at least 15, at least 20, fewer than 100, fewer than 25, fewer than 10, etc.). The pulses may each have a duration of 3 ms, at least 1 ms, less than 5 ms, or other suitable duration. During each pulse (or multiple pulses), a corresponding image frame may be acquired by image sensor28. The use of pulsed light may allow light-emitting diode22to produce a higher peak light output than would be possible if using continuous illumination, thereby reducing signal-to-noise during image capture operations with infrared image sensor28. Pulsed light may also help reduced thermal loads and enhance battery life. The light intensity produced by light-emitting diode22may be relatively high, so control circuitry16can pause ambient light sensor data gathering (e.g., integration by integrating analog-to-digital converter190) each time light-emitting diode22is producing output, as shown by the complementary shapes of the pulses inFIGS. 16 and 17.

To ensure that ambient light sensor integration operations have been successfully paused before any infrared light is emitted by light-emitting diode22, control circuitry16can assert the HOLD signal before turning light-emitting diode22on. As shown inFIG. 18, for example, HOLD can be asserted at time ta. After a short delay (e.g., a delay of about 5 microseconds), switch192will close, switch194will open, and converter190will pause integration (e.g., at time tb). Light-emitting diode22may then generate output at time tc without risk of creating interference for the ambient light sensor. Similarly, light-emitting diode22may be turned off (time te) before ambient light sensor integration resumes (time tf). There may be a short delay between the release of signal HOLD and the resumption of ambient light sensing (switch192open, switch194closed, and converter190integrating). As a result, hold signal HOLD may, if desired, be deasserted at a time td that is slightly before light-emitting diode22is turned on to produce infrared output IR at time te, provided that ambient light sensor30becomes active (pausing ceases) at a time tf that is later than time te.

If desired, control circuitry16may use ambient light sensor30without pausing ambient light sensor30during light emission from light-emitting diode22. In the event that infrared light-emitting diode22is activated during the operation of ambient light sensor30(e.g., in the event that control circuitry16uses light-emitting diode22and image sensor28to capture images while ambient light sensor30is providing output that is being integrated by integrating analog-to-digital converter190), control circuitry16can indicate that potential contamination of the ambient light sensor reading by emitted light from diode22has occurred (e.g., by setting a flag). Control circuitry16can then discard the ambient light sensor reading that has potentially been contaminated by light from diode22or can assert a bit to indicate that ambient light sensor data may be contaminated by infrared light.FIG. 19shows how ambient light data may be gathered by integrating an ambient light sensor photodiode current over period210(shown by the period that ALS is on inFIG. 19).FIG. 20shows how a flag (FLAG) can be asserted during the ambient light sensor integration period (e.g., at time tflag) to indicate that light-emitting diode22has emitted infrared light during the use of ambient light sensor30to gather an ambient light sensor measurement. In response to determining that FLAG has been asserted during an ambient light sensor integration period (e.g., period210ofFIG. 19), control circuitry can discard the potentially contaminated ambient light sensor data from sensor30and can gather a new ambient light sensor measurement.

Another way in which to avoid potential contamination from infrared light involves the use of an infrared light sensor such as sensor198to determine when infrared light is being emitted. Sensor198may, for example, be used by control circuitry16to monitor for the presence of infrared light pulses from external light-emitting circuitry. As an example, sensor198may detect that infrared light has been emitted by circuitry196(e.g., an infrared light-emitting diode22that is providing illumination of external objects being imaged by a corresponding infrared light sensor28) in a device other than device10. These potentially contaminating infrared light pulses may be emitted from nearby electronic devices (e.g., one or more electronic devices other than device10) such as devices operated by other users. When infrared light pulses or other potentially contaminating infrared light is detected in the vicinity of device10using sensor198, a flag such as signal FLAG ofFIG. 20may be asserted. Ambient light sensor data integrated over a period of time that overlaps the asserted flag may then be discarded.