is it possible to detect ir by just lighting an led, turn it off, and measuring how much…
- User
is it possible to detect ir by just lighting an led, turn it off, and measuring how much time it takes to loose charge ?
Assistant
Okay, let's clarify this idea. Your proposed method of "lighting an LED, turning it off, and measuring how much time it takes to lose charge" is a real, albeit less common, technique for using a standard LED as a light sensor.
Here's how that specific method works, and why it can potentially detect IR (though not efficiently like a dedicated receiver):
-
The LED as a Capacitor and Photodiode: A standard LED's internal p-n junction has junction capacitance. When you forward-bias it (light it up), you effectively charge this capacitance (and inject carriers). When you turn off the voltage source and let the pin float or connect it to a high-impedance input, this capacitance will discharge. Crucially, a p-n junction also acts as a photodiode when reverse-biased or at zero bias – meaning it generates a tiny current when hit by photons with enough energy.
-
The Measurement Method (Capacitive Discharge):
- You briefly charge the LED's junction capacitance (e.g., set a microcontroller pin connected to the LED high).
- You then switch the pin to a high-impedance input (or configure it as an input with a pull-up and measure when it drops).
- The charged capacitance starts to discharge, primarily through internal leakage paths.
- Crucially: If light hits the LED during this discharge phase, the photodiode effect generates a tiny photocurrent. This photocurrent adds to the internal leakage current, causing the capacitor to discharge faster.
- You measure the time it takes for the voltage across the LED (the capacitor voltage) to drop below a certain threshold (like the input-low threshold of your microcontroller pin).
-
How Light Affects the Time:
- No light: The capacitor discharges slowly due to internal leakage. The discharge time is long.
- With light: The photocurrent from the light provides an additional discharge path. The capacitor discharges faster. The discharge time is shorter.
- Therefore, a shorter discharge time indicates more light hitting the LED during the measurement window.
-
Detecting IR with a Standard LED using this Method:
- Most silicon-based LEDs (even visible light ones, especially red or clear types) have some sensitivity in the near-infrared spectrum (around 940 nm) because the bandgap of silicon allows absorption of these wavelengths.
- So, if you shine a strong IR source (like a remote control LED) onto a standard LED and use this charge/discharge timing method, the IR light can cause a detectable change in the discharge time compared to when the IR source is off.
In summary:
- Yes, the specific method you described (charging a standard LED and measuring its discharge time) is a known technique to use an LED as a light sensor.
- It works by measuring how much faster the LED's junction capacitance is discharged by a light-induced photocurrent.
- Standard LEDs can detect IR light using this method, though they are much less sensitive to IR than a dedicated IR photodiode or the integrated IR receiver modules we discussed previously. They are typically most sensitive to the wavelength they emit when used as a detector.
However, this is NOT how a dedicated IR Receiver Module Works:
The dedicated IR receiver modules (the ones that output the clean digital pulses) are sophisticated ICs. They don't just measure a simple charge decay. They contain:
- A specialized IR photodiode optimized for the IR wavelength.
- Amplifiers to boost the tiny photocurrent.
- Automatic gain control (AGC) to handle varying signal strengths.
- A band-pass filter tuned to the carrier frequency (e.g., 38 kHz).
- A demodulator to strip off the carrier and recover the data pulses.
- An output stage to provide a clean digital signal.
While your described method is a clever way to use a basic LED as a simple light detector (including potentially detecting strong IR sources), it's fundamentally different from the complex signal processing performed by a dedicated IR receiver module. The module directly detects the modulated pattern of IR light, not just the presence of steady IR.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.