Skip to main content
lowpowermcu
Associate III
April 10, 2012
Question

Brightness measurement using ADC

  • April 10, 2012
  • 22 replies
  • 3826 views
Posted on April 10, 2012 at 17:48

Hi all,

I want to measure the brightness using a light dependent resistor ''LDR'' uisng the stm32l15x devices. I an thinking to use the ADC to measure the ldr output but the the curve of the resistance vs illumination flux shows a logarithmic function.

Is there somebody who did it?

Thnaks & Regards,

 

MCU Lüfter
    This topic has been closed for replies.

    22 replies

    emalund
    Associate III
    April 10, 2012
    Posted on April 10, 2012 at 20:11

    do you need fast (method1)

    do you need precise Method2)

    even better, have you considered a light to frequency IC like this $2 device

    http://www.ti.com/lit/ds/symlink/tsl235.pdf

    Erik

    raptorhal2
    Lead
    April 10, 2012
    Posted on April 10, 2012 at 23:19

    I have done it with a voltage divider feeding a reference through a programmable resister to the light sensor to ground. The programmable resister accommodates the wide range of the light sensor.

    But I like Erik's solution better. It requires fewer components. Depending on the light intensity range, you may need a 32 bit timer.

    Cheers, Hal

    lowpowermcu
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 10:18

    Hi baird and Eric,

    Thank you for your answer but I would like to use the LDR (Light Dependent Resistor).

    Do you think it is possible?

    raptorhal2
    Lead
    April 11, 2012
    Posted on April 11, 2012 at 13:45

    Please provide a part number for the device you wish to use.

    Cheers, Hal

    frankmeyer9
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 14:37

    The  applicability does much depend on your application.

    In general, the voltage/current can be measured and converted just like every other effect influencing a resistance.

    Photoelectric resistors are tend to be relatively slow, at least those I know. This could be an advantage if you want to measure pulsed light, like LED lighting.

    Additionally, you need to consider the spectral sensitivity of your sensor and your application.

    emalund
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 15:00

    Photoelectric resistors are tend to be relatively slow

     

    which brings us back to my question above

    do you need fast (method1)

    do you need precise (method2)

    Erik
    lowpowermcu
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 15:30

    Hi erik,

    I want to use the ldr VT9ON1 and the stm32l152 device.

    I want a low cost solution, with acceptable accuracy.

    Thanks & Regards,

     

    MCU Lüfter

    emalund
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 15:30

    never having used a photoresistor, I took a peek

    http://search.digikey.com/us/en/cat/sensors-transducers/optical-photo-detectors-cds-photoconductive-cells-ambient-light/1967023?k=light sensor

    I was surprised to find they are slow as snails

    Erik
    emalund
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 15:43

    seeing how high the resistances were, I came to think: how do you connect the resistor. Just from Vdd to the pin (with a bleeder) will lead to HUGE inaccuracies.

    Erik

    frankmeyer9
    Associate III
    April 11, 2012
    Posted on April 11, 2012 at 15:48

    I have seen light pulses of a few microseconds length from a LED device, measured with a photo-LED as receiver. You are of course lost if you want to detect this with a LDR.

    On the other hand, the LDR does the integration for you, if you don't need this fast detection.

    Basically I need to agree with Erik - find out what you really need.