Suppose a 3.3 V white (or any colour) LED with a current draw of 20 mA is shone into the lens of a cheap webcam (or any budget camera) at close range (< 3 cm) for a long period of time (24 hrs) or more. Will the CCD/CMOS be damaged by this light? If the LED blinks, will it cause more/less damage?
Can camera sensors be damaged by light?
Absolutely. Sun + magnifying glass, and you will have a very melty sensor.
However, a single LED is far less energy. Even if all the power going into the LED was converted to light (hint: it isn't) and all of that light was focused onto a very small spot, let's say a 4 mm circle, on the image sensor (hint: it isn't), you'd have an energy flux of 5250 W/m^2, which sounds like a lot, but really isn't (sunlight on the Earth's surface, unfocused, is 1000 W/m^2). And, remember, because of efficiency/field of view, it's a lot less, likely no more than a tenth of that. So 500 W/m^2, which, on a very small area, is entirely inconsequential.
It's hard to find definitive numbers on the energy flux limit for image sensors (I've tried), but from personal experience I can tell you that CMOS sensors seem to be just fine staring directly at the sun for days on end, if used with sufficiently small lenses. The airy pattern formed by the sun on the sensor can be restricted to a small enough amount of power by judicious lens choice. Of course, this does not hold true with larger cameras (the larger lens collects more light, and the result is a burnt spot on your sensor). Regardless, that is all anecdotal, and not completely relevant. Your camera will be fine.
The photosensitivity of light detectors in a camera don't wear out with light.
Very bright light can cause permanent damage due to heating. This is why pointing the camera at the sun is bad. The image of the sun focused onto a small spot has enough energy density to cause significant local heating and damage.
A 3.3 V 20 mA LED receives 66 mW of power electrically. Only a fraction of that is converted to light, and a much smaller fraction of that falls onto the camera lens and is focused onto the image sensor. The result is probably just a few mW at best. That is unlikely to cause damage, even if focused onto a small spot. If the LED is out of focus in the picture, then the little light power from it will be spread over a wider area of the sensor, so really can't cause damage.
However, physical sensor damage and corrupting the picture are two different things. A bright light source in the image can cause a number of problems to the picture. There is always light bouncing around between elements of of the lens. These reflections are very dim compared to the direct and intended path for light, so they mostly can't be seen. However, if one spot is much brighter than the rest of the scene, the internal reflections of the bright spot may have significant brightness relative to the darker parts of the scene. This can look like ghosting of the bright spot.
The bright spot can also "bloom" (appear larger than it really is) due to relatively dim edges still being bright compared to the dark scene components. Light can spread sideways a little in the sensor, and there are always diffraction effects, especially with cheap cameras that have small sensors and therefore comparably small apertures.
A bright spot may also fool the auto-exposure mechanism into underexposing everything else.
Depending on how exactly the data from the sensor is read out and how the electronic shutter mechanism works, a bright spot can cause a vertical or horizontal streak from the spot to one of the edges.
Light shining into the lens, even if not directly imaged, illuminates dirt on the lens, possibly causing scattered bright dots or discs in various places in the image.
Since the LED light doesn't cause actual damage, these effects all go away when the bright light is removed. However, the bright light can still make pictures that include it unusable.
What is the damage threshold for a silicon/aluminum sensor? Work with specific-heat of silicon at 2 picoJoules/cubic_micron per degree C. Aluminum has problems above 400degree C.
How fast can we heat up a sensor, using a LARGE lense on a drone, that lense having 0.1meter * 0.1meter objective lense. The area is 0.01 meter^2, and that admits 10 watts from the solar flux of 1,000 watts/meter^2.
In a lense/sensor tasked with +-90 degree field-of-view, the sun at 0.5 degrees is 180/0.5 or 1/360 of the pixels. Or 1/360 of the X and of the Y extent of the flat sensor silicon surface. At 2cm by 2cm, the energy is focused on 2cm/360 or 20,000 micron/360 = 200micro/3.6 = 55 micron extent. In X and in Y; to get a volume, use a depth of 55micron also, and we now compute the specific-heat of the cube under the sun's image on the sensor surface. There are 166,000 cubic microns; at 2pJ/cubic micron, our thermal capacity is ~~ 300,000 picoJoules or 0.3 microJoules/degree C.
How fast will our 55 micron cube heat? We are dumping 10 watts into one side of 55micro cube. For 400 degree C, we need 0.3uJ * 400 (0C to 400C), or 120uJoule.
Our energy rate is 10,000,000uJ/second. Divide that into 120uJ, and we learn how quickly the sensor surface has become hot enough to impair the integrity of the aluminum metal paths that distribute GND and VDD and Reset and Row/Column readout signals: 12 microseconds.
Since 12 microseconds is at least 10X faster the thermal timeconstant of the 55 micron cube, most of the heat remains inside that cube, and our back-of-envelop computation is accurate.
Thus using big drone monitoring lenses, at nighttime with irises wide open, is risky.
This is not an answer, but might be useful to someone searching this question. I am calibrating a series of webcams and other camera sensors. I used an LED lit webcam microscope (10x-150x FYI) to look at the sensor on one of them. Afterwards, I saw the burn marks of the microscope LED's in the test camera's images. I think it was not the silicon that was damaged ( the statistics on dark currents show that all the pixels are pretty close in their properties), but I think the color filter array was damaged. It is, after all, a thin and fairly delicate overlay, made as thin as possible. Sometimes called a Bayer array. That is my best guess.
So I am certainly not going to use bright LEDs to illuminate when I look at camera sensors from now on. I am just happy that I learned on a cheap webcam, and not an irreplaceable sensor.
One other thing I might pass along. After running one of these overnight to collect detailed transition statistics, I see that some of the pixels have failed. This is a dark field/dark current test, so I am just checking the ability to gather data from the sensor array. Over time, (because of heating, charge build up, etc?) many (a few thousand) pixels are generating wider and wider ranges of values. These should all be close to the baseline, but will fluctuate to the full range of values (should be 15 and can range to 255 on each color). At first I thought they might be cosmic rays tracks (yes, Virginia, a webcam can be used for tracking cosmic rays), but now I wonder how many of those events are just failing pixels.
I never give up on any sensor, so I can use the good pixels for some things, and study the failure of the others over time to learn still more. It won't work for baby pictures, but might be fine for observing intensities in an experiment where a random sample of pixels is used anyway.
Yes, long exposures (24/7) to a bright light (read as bright for your eyes), will heat up the microlenses and color filter (bayer), if any. These 2 materials will either get more opaque or deform when heated. (Re)soldering image sensors is therefor a sensitive matter. These defects will only be visible in grey images. Damaging the silicon itself will only happen with high power lasers and these defects will pop up also in dark images and can destroy whole columns, rows or the whole sensor. A rule of thumb is, if you hesitate to shine it in your eye, think twice before shining it on an image sensor.