is there a way to distinguish between daylight and artificial light in a room? I'm thinking my options are a light intensity sensor or a color temperature sensor. The sunlight is supposed to be much stronger than artificial light. But I'm wondering if the case will be the same inside a room. Or does the idea seem silly to distinguish between both?
In theory, you could use your RGB colour sensor and program in some tolerances for the spectrum of natural sunlight which is different than most lamps. You can use colour temperature of the sun vs commonly available bulbs to get starting values so you can tune. The sun is 5800K, though being indoors behind windows might affect this. Common bulbs are 3000K (those horrid red orange bulbs for basement and bedrooms), 4100K (most common office white lighting), and 6500K (not so common). https://en.wikipedia.org/wiki/Color_temperature#Categorizing_different_lighting
But it might not work unless you're actually looking at the light source. The 60Hz detection mentioned earlier might be more effective if you can't.
Dimmable LEDs will have a switching frequency all to itself.
AM 1.5 Global is the solar spectrum, but it's going to have some shift based on time of day. For a given room, you check for some predominance or abstinence of certain wavelength bands.
Brands of lights will also shift the spectrum. Sylvania and GE ELH lamps have a different spectra.
Why do I know. I had an application where it mattered.
Even incandescent lamps have a slight detectable flicker.
I've used them to detect the strobe pattern on a vinyl record turn-table strobe-wheel to determine if the turn-table rotation speed was correct.
Even incandescent lamps have a slight detectable flicker.
I've used them to detect the strobe pattern on a vinyl record turn-table strobe-wheel to determine if the turn-table rotation speed was correct.
Never said otherwise.
But the light intensity changes for each peak of the sine wave, giving fluctuations at twice the line frequency.
Another way to look at it is that the power output changes with the square of the voltage, which is a double frequency function.
Sort of acts like a full-wave rectifier.
It will work; bulb filaments heat and cool significantly throughout each cycle of the applied AC, giving the light intensity a significant ripple (around 5% for a 100W bulb, if I recall correctly from measurements I made years ago). The ripple occurs at twice the line frequency, since the filament heats up on both positive and negative peaks and cools in between.
Low-wattage bulbs have the most ripple in their light output because their filaments are light and have little thermal mass; therefore they heat and cool the fastest. Bulbs with heavy filaments (high-wattage bults and high-current, low-voltage bulbs) have less ripple.