This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using LED as a light sensor

Other Parts Discussed in Thread: MSP430F2274, STRIKE

A year or two ago, I saw a design idea in EDN, Electronic Design or another of the trade magazines.  This idea was to use the LED on the ez430 target board as a light sensor, then vary the light output to the same LED depending on the ambient light level.  In daylight, the LED would be off, at night, it would be on.

I played with that and successfully tried the authors' code on my ez430.  But that was long ago, and I can no longer find either the article or the code.

Does anyone happen to have better memory and/or records than me?

Thanks!

Fredrik

 

  • Are you looking for this?

    It can be found at the product folder for the F2013.

  • I could've sworn I saw it in a magazine -- but apparently I should know better than to trust my memory.

    Thank you so much, that's exactly what I needed.

  • I used LEDs to detect light in the late 70's. (I also used a 1kbit DRAM -- the largest around, as a 32*32 pixel video camera in those days.)

    Yes, I saw it in a magazine thirty years later. Your memory is okay. Mine is fading, but I am sure about this.

  • hi,

    i want to know if this works with the msp430f2274

     

    Gaston

  • This schem works. There were no MSP430 in the 1970's and I have used it. The TI demo code is for MSP430F20x3, not for F2274.

  • The msp430f2274 shouldn't have any trouble running this code. 

    The documentation for the ez430 programmer is here: http://www.ti.com/lit/pdf/slau176

    Page 12 has the schematic -- couldn't be simpler.  P1.0 -> 330R -> LED -> GND. 

  • BTW, that TI demo was writen in c[:H].

    Good luck porting from F20x3 to F2274[:P]. 

    There is another method that uses two pure digital I/O pins. The code is much simpler. But everyone is busy surching for existing code, very few people write code so that it exists.

  • Fredrik Nyman said:

    I could've sworn I saw it in a magazine -- but apparently I should know better than to trust my memory.

    Actually I wouldn't be suprised if that app note started out as a magazine article. [;)]

  • Hi,

        I would like to know about     (I also used a 1kbit DRAM -- the largest around, as a 32*32 pixel video camera in those days.)  plz clear my confusion

    did u use LEDS as a video camera   ? plz explain me the concept or send me some refernce links to know about this concept 

  • No, a single LED can only handle a single pixel where as a 1K SRAM can handle 1024 pixels.

    Using LED and SRAM to sense light are based on the same Law of Physics. When the photons (light or other EM wave in the particle sense) strike material, electrons are emitted

    LED is very similar to photo-diode. It can detect light but is less efficient as compared with photo-diode.

    Each bit cell of a SRAM has a tiny capacitor to "remember" the state of that bit, photons can discharge the capacitor and alter that memory. SRAM can detect images but is less effective as compared to CCD.

    I do not have any reference to these things.

    My fading memory says Roger Melen was the guy who told me about SRAM in the early 70's. I was a Physisit and he was a student at that time. He noticed that his expansive SRAM can pass memory tests overnight but fails durning the day. He found out that the failed chip had a gap between the metal lid and the ceramic carrier. He then noticed that different bits fail depending on the direction of light on that gap. The rest is history...

**Attention** This is a public forum