Connect with us

Daylight sensors recommendation?

Discussion in 'Electronic Design' started by Martin Griffith, Apr 5, 2008.

Scroll to continue with content
  1. I'm going to use a ATtiny 13 to PWM a led display. I've never played
    with a AVR tiny13, it should be simple.

    I notice that it has an ADC on it, and would like to use this to sense
    the ambient light, and increase the LED on time accordingly.

    It's not for scientific type stuff, so it doesn't need to be
    exceptionally linear

    Any recommendation for a sensor, cheap, but not Joerg cheap, and
    simple to mount, not the bumpy things


    martin
     
  2. What the ADC impedance? You could try a led, they do produce a small voltage under ambient light.
    Cheers
     
  3. Haven't got a clue , still reading the datasheet, aaaah...100M it
    says, 10ish bits, they get a lot fitted into 8 pins these
    days.....Glad I gave up on the LM393 triangle method


    martin
     
  4. I am using a simple photo transistor for that, uses a series resistor.
    Software can do anything to the curve.
     
  5. Frank Buss

    Frank Buss Guest

    I've bought this sensor some time ago, just for testing, because it was
    advertised on the Farnell site:

    http://www.avagotech.com/assets/downloadDocument.do?id=4360&Source=SearchResultPage

    You can get it from Farnell for 0,61 Euro for single units:

    http://de.farnell.com/1339013/optoelektronik/product.us0?sku=AVAGO-TECHNOLOGIES-APDS-9003-021

    Some experimental results: If used with a 10k Rload and 3.3V at Vcc, you
    can measure less than 0.1V if dark, 1.4V for normal lighting in my room and
    2.5V if illuminated with a flashlight from near distance.

    I think for Joerg cheap you have to use the cheapest standard LED you can
    get and a some magic transistor circuit to amplify and linearize it. Or
    even saw the cap from a transistor and use this in the magic circuit,
    without an additional costly LED :)
     
  6. Thanks, just looking at the Vishay tept4400 @0.63€ from farnell. Idiot
    datasheet, not a single app circuit.

    Got AVRstudio 4 and GCC installed, for the first time , and my PWM
    loop works, and compiles, and simulates, all on the same day. Time to
    build the programmer thing

    I'll never be good enough to be as cheap as Joerg


    martin
     
  7. Arlet Ottens

    Arlet Ottens Guest

    Cheapest solution is to measure the LED/display itself during the
    off-state of the PWM cycle. Depending on the configuration, this might
    even be done without any additional components.

    Linearizing can be done in software.

    Here's a nice application that builds on a similar idea:

    http://cs.nyu.edu/~jhan/ledtouch/index.html
     
  8. Wimpie

    Wimpie Guest

    Hello Martin,

    When you want an electrical output that is proportional to the eye
    perception, you should not use a regular phototransistor. Most
    phototransistors have highest sensitivity in the IR range. So they
    give much output under real daylight or light bulbs (incandescent),
    but the output drops significantly under, for example, fluorescent
    lighting.

    When it should be really good, you can use a real (ambient) light
    sensor, like OSRAM SFH 5711 (good one, about 2USD) or cheaper SFH
    2430, SFH 3410 (farnell). You should also take into account the
    directivity of the sensor. When you have a sensor with narrow viewing
    angle and the light comes from another direction (than main beam
    direction), output will be also small.

    Best regards,

    Wim
    PA3DJS
    www.tetech.nl
    please remove abc from the address
     
  9. Frank Buss

    Frank Buss Guest

  10. The LED idea can work, but the currents involved are quite low.

    I just measured a 5mm red led at 6nA in (bright) room lighting.

    So you will need to run it into an opamp - in which case you may as
    well go for a proper photodiode or purpose made "ambient light sensor"
    as suggested.
     
  11. Joerg

    Joerg Guest

    Bingo! The best solutions are the ones that cost next to nothing in
    hardware. Then us hardware guys can lean back, open a beer and toss it
    over to the software guys. "Hey, it's just software!"

    :)))


    Just make sure it's sensitive enough and reliable.
     
  12. Guest

    Well, my experience with auto brightness display is that
    there are basically 3 situations:
    1) absolute dark.
    2) normal room light or daylight via windows.
    3) bright sun directly on display, in whatever way.

    My experience is that 1 and 2 require about the same brightness,
    the advantage of some brightness in '1' is that that helps light up
    the room
    (your eyes get used to the low light from all those displays and you
    can
    see perfectly well).
    ONLY in case 3 needs the display a big boost in brightness.
    The photocell detects direct sunlight 100% accurate.
    If you want to get cheaper get a LDR.
    Those are slow, but that really does not matter much.
    So in most cases even a simple level comparator would do.
     
  13. Joerg

    Joerg Guest


    The one spec to consider here is the speed of the ADC on his uC. On a
    muxed LED matrix the off times can be awfully brief. He'd have to swing
    a port pin or two over to the ADC, do the conversion, swing it back. Not
    a problem if the ADC has a good S/H built in. This interrupt routine may
    have to be written in inline-assembler.
     
  14. I am thinking of using the AVRtiny13 just to do the PWM, and the led
    display is a CA 7 segment device. The led driver, is a STP16PS05. Just
    finished the prototype layout this minute

    I just realised that indoors I would need to compensate for the 100 or
    120 light pulses/sec.



    martin
     
  15. Arlet Ottens

    Arlet Ottens Guest

    The ATtiny13 has a 1.5 us sample/hold window.
     
  16. The ISL29000 looks interesting, from intersil


    martin
     
  17. Arlet Ottens

    Arlet Ottens Guest

    The simplest solution is to measure the light every PWM cycle (using the
    PWM timer interrupt), and feed the data through a low-pass filter.
     
  18. Joerg

    Joerg Guest


    But then make sure your mux frequency is different from 100Hz/120Hz and
    its harmonics.
     
  19. Joerg

    Joerg Guest


    If that's a true sample & hold this should suffice.
     
  20. If he's using a 7-segment, he could use one of the free decimal points...

    Just a thought.

    Cheers
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-