what light sensor to choose?

hey :slight_smile:

just a quick question i hope.

i'm thinking about a way to automatically adjust the brightness of a ws2812b ledstrip according to the light of the surroundings, so not just on / off but light intensity.

to try things out i'll order some photosensors.

but i found three types at banggood.com, with the following specs.

Model: GL5537
Maximum voltage: 150V, DC
Maximum wattage: 100mW
Operating temperature: -30°C ~ 70°C
Spectral peak: 540nm
Bright resistance (10Lux) (KΩ): 20 - 30
Dark resistance: 2 MΩ
100λ10: 0.6
Response time: 20ms (Rise), 30ms (Down)
Resistance illumination: 4

Model: GL5528
Maximum voltage: 150V, DC
Maximum wattage: 100mW
Operating temperature: -30°C ~ 70°C
Spectral peak: 540nm
Bright resistance (10Lux) (KΩ): 10 - 20
Dark resistance: 1 MΩ
100λ10: 0.6
Response time: 20ms (Rise), 30ms (Down)
Resistance illumination: 3

Model: GL5516
Maximum voltage: 150V, DC
Maximum wattage: 90mW
Operating temperature: -30°C ~ 70°C
Spectral peak: 540nm
Bright resistance (10Lux) (KΩ): 5 - 10
Dark resistance: 0.5 MΩ
100λ10: 0.5
Response time: 20ms (Rise), 30ms (Down)
Resistance illumination: 2

can anyone advice me on which one, and more importantly why? i see what the difference is, but i don't really know which would be better and why?

kind regards

Matt

Quite honestly any would do for what you want.

oke,

thank you.. :slight_smile:

Any LDR, photodiode (even an LED!) or phototransistor can be made to work as an ambient light sensor.

The details differ, but not by very much. Usually just an appropriate resistor is needed.

But sometimes you don't even need the resistor. If you have an LED, use it in photovoltaic mode by connecting it between GND and an analog input (with the LED "arrow direction" or cathode connected to GND) and see what voltage you get.

https://playground.arduino.cc/Learning/LEDSensor

Arduino Playground LED as light sensor.
Requires 1 led, 1 100 ohm resistor and 2 pins. Solder resistor to led and stick the leads in the pin holes, wiring for test is done.

Be aware that colored-bulb leds can act as colored light sensors well enough to sense light absorption in liquids but you need to read red, green and blue to get truer ambient light measure where color balance may change.

jremington:
But sometimes you don't even need the resistor. If you have an LED, use it in photovoltaic mode by connecting it between GND and an analog input (with the LED "arrow direction" or cathode connected to GND) and see what voltage you get.

I found that if I read the analog pin often enough, the reads become very small values.
A sketch that varies the time between reads to achieve reads of perhaps 50 to 100 can get quicker response. The shorter the period, the stronger the light. If I only read once every 3 seconds in bright light I can see about 2V built up but it takes so long to fill!

@ jremington and GoForSmoke thanks and indeed, i knew this too. the how has sunken away a bit, but i knew it.

but i'm more or less looking for an / the ideal situation here,

but a different question then, if all do the same job, what is the benefit of the different specs then? if there wasn't any, they wouldn't make so many different once.

is it a wrong assumption (i really hate to assume, i'd rather know) to say that the larger resistance interfall between light and dark can give you the most accurate reading?

if there wasn’t any, they wouldn’t make so many different once.

I said for YOUR application. Sometimes you want to match the sensor to some electronics other than a micro controller.

If there were no patents, they might be the same.

You can get an LDR cheap.

A led as light detector does not use resistance as explained in the link I left in reply #4.

Grumpy_Mike:
I said for YOUR application. Sometimes you want to match the sensor to some electronics other than a micro controller.

oke thanks.. that explain.

much appreciated!