PSoC Analog Coprocessor Pioneer Kit Guide, Doc. # 002-11190 Rev. *B
26
Kit Operation
3.1.2.2
Interfacing with an Ambient Light Sensor
An ambient light sensor (ALS) is a current sensor, which gives different current outputs based on the
intensity of incident light on the sensor. The change in the current output is measured to detect the
ambient light intensity.
shows PSoC Creator schematic to interface an ALS to the PSoC Analog Coprocessor.
Figure 3-10. Interfacing PSoC Analog Coprocessor with Ambient Light Sensor
The current output from the ALS is converted to a voltage signal using a transimpedance amplifier
(TIA). The TIA is built using one of the opamps in the PSoC Analog Coprocessor as well as external
passive components (R84, C58).
The reference voltage for the TIA is set to the 1.2 V bandgap reference. The bandgap voltage is
independent of supply voltage fluctuations and hence provides a stable voltage reference. This volt-
age is generated using the programmable reference Component, PVref and is buffered using an
opamp.
The output of the TIA is measured using the 12-bit Scanning SAR ADC Component with the positive
input connected to the TIA output and the negative input connected to the reference voltage of the
TIA. The Scanning SAR ADC Component is configured in the differential mode with its reference
(V
ref
) connected to the bandgap voltage. This gives the ADC measurement range as V
n
± V
ref
,
where V
n
is the negative input voltage of Scanning SAR ADC. The CPU takes the output of
Scanning SAR ADC, and calculates the photodiode current and then the light illuminance value.
The PSoC Analog Coprocessor Pioneer Kit has an ambient light sensor (TEMD6200FX01) on the
board connected to the PSoC Analog Coprocessor.
For details of firmware implementation, refer to the Code Example
CE211252_Ambient_Light_-
Sensing
available in the kit installation directory.