Neither True Nor False!
Some remote controls double up their illumination LEDs as light detectors to reduce the part count and cost so I thought I'd attempt to reduce the part count even further with a PSoC 4.
LEDS can double as photodiodes and can be connected to transimpedance amplifiers (TIA) to convert their minuscule current into readable voltages.
This is nothing new and I've done this before with an XL Star. The specified item was not found.
The above circuit can be distilled to just two external components although I've drawn it with four.
The two external components are the LED and 1Megohm feedback resistor.
If there are stability issues then a capacitor can be installed in parallel to the feedback resistor.
The optional parts are two resistors to form a zero offset calibration network tune the response to the most linear response portion of the photodetector.
This offset is set so that zero output equates to the dark condition.
In the main program the Analog Mux must be started with AMux_1_Start(). IDAC_1 is also should be started and initialised with a value of zero for no illumination with IDAC_1_Start().
Other preparations such as the initialisation of the ADC should also be performed.
By default the Analog mux is disconnected from both its inputs so a AMux_1_Select(0) connects the LED to the IDAC.
Now the LED can be illuminated with a IDAC_1_SetValue() for a setting up to 612uA. This is sufficient for many applications particularly with modern superbright LEDs.
The change from illuminator to an ambient light sensor is done by with the Analog Mux by changing its connection from the current source to the TIA using a AMux_1_Select(1).
Reading the ambient light value is as easy as reading the output value of the ADC.

-
DAB
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
-
vsluiter
in reply to DAB
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
-
DAB
in reply to vsluiter
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Comment-
DAB
in reply to vsluiter
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Children