Light sensors and detectors

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been experimenting with the TAOS TLS2561 recently (i2c light sensor with infrared corrected readings), but I find the integration time for 'reasonable' readings too slow.. (402ms). The 101ms setting is better, but adds some jitter into the readings, and the 13ms one is next to unusable.. To test the jitter/noise I have 3 of the sensors soldered close together.

Does anyone had a way to measure ambiant (visible) light with reasonable precision in a reasonably fast time ? I'm looking for <10ms, possibly <5ms... Oh I also needs it to be calibrated somehow so I can derivate Lux...

I'm also looking for a photodiode (?) that has a quite fast reaction time (<=1ms) for dark/bright transition detection... Any suggestion ?

Oh yeah, it also has to be solderable and cheap-ish :D :D

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For fast photodiode, anyown would work, but there are quite usual ones, like BPW34, but this is an infrared detector. Also a normal LED in a water clear case would work, while it is not a white one. And usually give better sensitivity at its emission wavelength. That could lead to an RGB LED used as trhee photodiodes and use it to measure LUX and light in different wavelengths.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What are you trying to do if I may ask. The sensor you are searching probably depends a lot on that. Also what is the range/viewing angle we are talking about. are you looking at a path under it to see a black marking (like a line following robot or a scanner or something like that).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I want to measure the intensity and duration of a flash of light. In Lux. the distance will be around 20cm or so, and I can control the surrounding so it's light tight.

My current idea is to use a photodiode to trigger the 'manual integration' mode of the sensor, and stop it when the light stops or I reach 402ms.. then I can derivate the lux number from the time the sensor was exposed...

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BPW34 are used for such this kind of application. An LED would work also, but you probably would have more characteristics (sensitivity) dispersion. Is for one-off or is for production? If one-off, then I would suggest to follow the LED approach and try to calibrate it. For even a short run, then BPW would offer bette repetitivity, but you still have to calibrate them somehow (not too difficult).

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the pointer, I think I need to figure out a way to drive an interupt pin from the output of that diode. I don't think I can use it for actual visible light measurement itself, it's spectrum seems to be a bit too wide on the infrared side for that. But it looks just the part for a trigger...

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Flashlights also tend to emit a big amount of energy into the infrared region, like halogen lamps. Could be interesting to take a look at the emission spectrum.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah I tried the flashlight on the i2c sensors and the channel that is IR calibrated went thru the roof :D

Would you have any interesting tutorial as to how I could interface that photodiode to a digital input somehow ? I really don't mind the value itself, just the light/dark transition to a 3.3V pin (or maybe a pair of pins, I can imagine having 2 interupts for dark->light and light->dark)
All articles I found that use photodiodes take great care of trying to sample the value itself! :D
I'm an electronic newb, I can half make sense of digital pathways, but I get quickly lost in the analog :D

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK I received the BPW34 and amazingly, I do get a (very small) voltage when I put a resistor in parallel to it.
Question is, is it enough for the ADC ? How should I wire it ?

I'm currently thinking of using one pin to ground, the other on the ADC with the resistor in parallel (photovoltaic mode ?) but apparently one get better results with a 'negative bias' but I understand I'd need to have a negative voltage available for that (I run the board at 3.3V right now)

I must say that despite googling for the better part of 2 days on these subjects, the information is pretty sparse. It's either doctorate papers on completely abstract subjets of photodiode physics, or irrelevant bits and pieces...

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, small is not a good term for telling exact values.

If it is too small, add an OP amp infront of it.

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Photodiodes are usually interfaced by means of a current to voltage converter trhough an OpAmp, and mantaining 0V across them. I will try to put some schematic, but I have to draw it. Google should give you some information about that since it is a common interface.

If you only want digital input (¿¿measuring time instead of light intensity??) then you can use the OpAmp like a comparator, or even the internal comparator of the AVR, and a timer.

Guillem.

PS: sorry for the delay, I had been out for sometime for medical reasons.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Guillem; no problem at all, take your time and be well :D

My original plan was to use the diode sorely as timing, however looking at the problem as a whole I think I could use a light value from it as well : the i2c sensors have different sensitivity and integration time that can cover from very dark to very very bright lights, but of course I need to know it 'in advance' or do several measures...
Using the diode as a 'peek' I could already have a good idea of the range I'm looking at. I originally tought I would use 3 sensors close together on different sensitivity, but I think the diode could solve my problem with a much simpler solution..

Isn't using the diode with an amp equivalent to rougtly a phototransistor ? (probably a silly question sorry !)

Otherwise I was orientating myself on what you propose : using the ADC comparator to trigger interupts, my only real problem is wiring it in :D
Do I have to provision from something like a 'debouncing' in case the light level is do close to the trigger that it repeat fire ?

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Check this schematic. It is the usual light sensor. The main difference with phototransistor is that this one is linear, while phototransistor is logarithmic (and more directive, and has more dispersion, and more tricky).

If you want some 'debounce' I would suggest you to have some way to control the 'theshold level' where the comparator switch. You can do this with a potentiometer (manual adjust), with fixed resistors, or with a DAC (automatic adjust). There are more ways to do this.

If you can, I would suggest you also to interface the amplifier output to ADC input. In some ATmegas, the internal ADC mux can be routed to the comparator input also, thus only one connection should be made.

Guillem.

PS: Thanks, I'm fine.

Attachment(s): 

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guillem, I'm a bit confused about that AD741 part; digikey and farnell only has ADC or Audio Codec under that reference... no opamp...

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, it's a classic uA741, the very first internally compensated silicon OpAmp. Widely used. You can also try OP27 (very expensive), LM071 (or similar, quite common), LM081 (also quite common, but low quality), and any one you already know.

Virtually any OpAmp would fit this application, but if you could choose, then look for low input offset ones. And probably you should check also speed, since it could be an issue for you application.

You also need to dimension the resistor to the best value, but you need real numbers to do this.

If you use normal LED's instead of the silicon photodiode, then you can use three channel (for RGB measurement) and an LM224 as OpAmps (it includes four into a single package). Or even four channel (RGB+Infrared), since there are 4 OpAmps into this cheap IC.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.