Results 1 to 20 of 20

Thread: Measure reflectance of red and NIR

  1. #1
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default Measure reflectance of red and NIR

    I am new to electronics but have a project that I would ultimately like to build if it is at all possible. I have no real experience or knowledge except I built a few guitar pedials from designs I downloaded off the internet. I never modified these so never really understood how they worked but learnt enough to know that with a little initiative you can save alot of money and be very satisfied with something you made yourself.

    My ultimate aim:
    To make a device that measure reflectance of NIR (~780nm) and Red (~670nm) and is able to log this to a computer in real time (I could sort the computer part of this out OK once I have a signal going in I think). The sensors would be active so have their own light source. The object would be about 20cm to 1m from the sesnors.

    Could this be made a reality without an electric engineering degree? Is there a simple way to do this?

    At the moment I am just researching to see whether it is possible and am happy to be told to stop wasting my time and go buy an ....... for thousands of dollars.

    Amoungst my reading I came across Phototransistors:
    "Phototransistors are solid-state light detectors with internal gain that are used to provide analog or digital signals. They detect visible, ultraviolet and near-infrared light from a variety of sources and are more sensitive than photodiodes, semiconductor devices that require a pre-amplifier."

    Are phototransistors what I would use as my sesnors? If so these seem to be quite cheap.
    I also came across PICAXE. Would this technology simplify my task at all? In relation to sending a signal to a computer?

    I study agriculture but have a strong interest in computers and would like to extend that to electronics.

    Anyway, I am interested in any comments.
    Thanks for your valuable time,
    Ben



Look Here ->
  • #2
    Senior Member
    fromaron's Avatar
    Join Date
    Jan 2008
    Posts
    2,136
    Thanks
    271
    Thanked 737 Times in 389 Posts
    Rep Power
    546
    Reputation
    13894

    Default

    Wellcome to the forum, Ben.
    What is it exactly are you trying to achieve? Are you just after object detection or you really need to measure an analogue reflection from the object (aka measuring it's shade of red)?
    First comment I would have is the distance you intend to sense the reflection will be you biggest challenge. To be able to measure the reflection at 1 meter you will need to use good optical system, unless I am mistaken.
    Depending on the actual purpose you can find ready made solutions and they are not too expensive these days, certainly not thousand dollars as you suspected.
    Try to give more information on the application and you will get more practical replies.

  • #3
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    Yes, you sound like you know what you want and have a pretty good idea of how to do it already.

    Phototransistors are a good choice (or IR PIN diodes) as your detector.
    Your source can be an IR LED and/or a high brightness, (monochromatic) Red LED.

    So you have all the parts, now how to make them work.
    First thing is to look at the phototransistor or the IR PIN diode. PIN diodes are a little more sensitive. Both work very much like a solar cell does. Light shines on them and they produce a tiny amount of current, which in the case of a phototransistor lowers the resistance across the PN junction.

    Your problem is more a case of how to use this information. Current alone doesn't seem to make much sense. If you have the datasheets for the detector, then you have some absolute reference point.
    But this in itself has some problems. Not only do you have your signal, you also have background noise, or light pollution. The signals are additive, so you will have a difference value during the day than you will at night. DOH !
    This is an absolute reference.
    For those interested, this is also the same reason why your satellite TV signal power varies when you change LNCs (LNBs). Each one has a slightly different amount of thermal noise.

    There is another way. We can subtract the noise.
    The measurement is called "carrier to noise", and it is also mentioned a lot with satellites too.
    On a spectrum analyser, it's very easy to see the carrier and the noise seperately at the same time. But our IR detector is nothing more than a simple power meter. Yes, the same as our satellite signal meter.

    So we first take a measurement of the reflection without our source LED turned on. This is measuring the noise only.
    Then we turn on the LED, light up the target and measure the signal power again. Now we subtract the second from the first and we have a true carrier power, with the noise power filtered out.
    The correct carrier to noise formula is (C+N)/N. But for simplcity we can just subtract the noise. (C+N)-N = C.
    So we could do this with nothing much more than a source diode, a switch, a detector and a meter. The problem is when we flick the switch we slightly change the distance to the source and effect the power. This also changes with each measurement unless you have some sort way to reference the distance. A simple depth stick is all that is required.

    Anyhow, for the case of simplicity, we can have an automatic switch, something like a 555 timer or a PIC chip. The measurement could be easily be performed in hardware by an sample and hold circuit using op amps and a comparitor which is also an op amp. No brains required.

    The other method is to make the PIC chip do all the work. It turns the LED on, measures the input current from the detector, then turns the LED off and measures the noise (ambient light). It can do this several times a second.
    The pic can then do the simple maths and display the value on a digital display.

    How does that sound ?

  • #4
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Thanks for the responses. It is much appreciated. I will read them a lot more closely tomorrow. I have a presentation in the morning I am busy with now. The use of this device is to measure NDVI () and other plant indxes with a proximal sensor. It has been done before - e.g. Greenseeker - but these are expensive and are closed-boxes. Will write more tomorrow. Thanks again!

    Ben
    Last edited by bboughton; 14-05-08 at 01:56 AM.

  • #5
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    OK
    I have done a little more reading. The more reading I do the more I feel I need to do. I read about Light Detectors in "Handbook of Modern Sensors" - very interesting.
    I did a Google search and found this circuit or or . Would it be something like this I would need? Obviously set it up to measure with with light source off (to detect noise) then light source on.

  • #6
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    Ok, a couple of more ideas which popped to mind. I can see what you're looking at now. I might suggest that a 1st generation night scope (Infra Red) would be a good too to have for your experiments. These kinds of night scopes are cheap. (2nd and 3rd gen scopes are more expensive).
    When illuminated with a good IR light source, plants are easy to see and they appear to rather bright in IR.
    But I'm no so sure about Red light. I would think plants are very good at absorbing red light (and reflecting green). That should be obivious why.

    There is another toy which I have which works on IR, but it most definately does not see plants. It's a thermal detector or "game finder" which I occasionally use for hunting animals or people.

    No doubt with a little bit of searching, you'll find one much cheaper than that. I bought mine for $10 a few years ago.
    Once you've learned how to use them correctly, it's easy to find thermal gradients. But plants are the same temperature as the surrounding air, so they appear invisible at these far infra-red wavelengths. Yes, heat seeking missiles use this same kind of technology to find their targets. But because they are passive devices, they calibrate once rather than constantly like the example I gave above.


    Anyhow .... the circuit examples you posted are not really the right type.
    The first two aren't really suitable, but the third is, though it's a little bit of overkill, but it's only the detector part of the circuit.

    This is just a datasheet, but it has quite a few examples op amp circuits.

    Op amps are the hardware (old way) of doing the job.
    Ideally I would do it with software and a PIC chip and use the onboard A2D converter and make use of the third circuit you posted above just to amplify the signal a little.

    I'll try and draw a complete quick example circuit and scan in in at the end of the week. I'll go crazy if I try draw it with paint etc.

  • #7
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Thanks again for response (+ rep for you). Red is important as plants have an extreme difference in response between nir and red wavelengths i.e. nir is high reflectance, red is low. These strong differences in reflectances are exploited to create the NDVI ratio. There is a high correlation between the NDVI ratio and photosynthetic activity. This can be used to vary in crop fertiliser applications amoung other things.

    This is an NDVI image created from satellite imagery data. Satellites capture RGB & NIR bands which allows NDVI to be calculated and the values distributed over a colour scale to represent plant vigor on map,

    I am greatful and look forward to seeing your example circuit.

    So you are talking about a PIC chip like PICAXE that can be easily programmed or a programmer like in this months Silicon Chip? I saw it in the newsagent today with "programmer for PICs" so I bought it. It tells you how to built the circuit and plug it into the computer but not how to actually program the things. I am learning VB.NET at the moment but I am sure these things would use something much more complicated like assembly or in fact .... Im not really sure.
    Last edited by bboughton; 14-05-08 at 07:39 PM.

  • #8
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    I don't know much about PICAXE except that they are very similar to PIC chips. I don't see any reason why you could not use a PICAXE. If you can find one with an A2D converter onboard, then it will be perfect.

    Most people here have programers used for (satellite) smart cards. Some of them like "Elvis" have a pic programer onboard. But the one you are reading about in silicon chip will probably be good enough. I haven't seen this months SC.

    If you're learning VB, the PICAXE or PIC basic will suit you. I program in assembler. There are advantages to both. You can also program these chips in C and even pascal. Though I'm not sure why.

    looks like the picaxe has a 10bit adc on board. This chip is tiny by my standards, so getting information out would be say a serial data line to an LCD display. One of the other pins drives the LED.
    No complex circuitry, that's all done in software.

    A basic program is simething like;
    turn off the LED
    Sample the ADC
    Store the value -> 1
    turn on the LED
    Sample the ADC
    Store the value -> 2
    Subtract 2 from 1
    Store the value -> 3
    Send value 3 -> Serial port subroutine
    goto start

    Though thinking about it, you have two colours to play with.... which makes the pic/picaxe a better choice than op-amps.

    It's program might look a little like this...

    turn off red LED
    turn off IR LED
    Sample the ADC
    Store the value -> 1
    turn on red LED
    Sample the ADC
    Store the value -> 2
    turn off red LED
    turn on IR LED
    Store the value -> 3
    turn off IR LED
    Subtract 1 from 2 store ->4
    Subtract 1 from 3 store ->5
    Subtract 5 from 4 store ->6

    Send value 4 -> Serial port subroutine
    Send value 5 -> Serial port subroutine
    Send value 6 -> Serial port subroutine
    goto start

    That way you have a nice set of numbers that easily describe what it is the sensor is seeing. A little more fancy software and you could have a calibration mode etc.

    I can see you walking along checking the health of those plants.
    "yeah, the skunk is gunna be good this year, she's peakin' in the 1000nm band !"

  • #9
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Thanks again trash. This is starting to sound quite good. I guess my next question is can I use the same sensor to detect the NIR as I use to collect the red?

    After a bit of googleing I noticed that the different photodiodes (PIN Diode - same thing??) are responsive to different wave lengths. So I was assuming I would need a seperate sensor for each.

    This website offers photo diodes responsive to the 780nm band which is the wavelength I would want to know the NIR reflectance for. And then would I need to find one sensitive to the 650nm wavelength?

    OR

    Do I just get something like this ? And the removal of background noise would separate the two different readings?
    Last edited by bboughton; 15-05-08 at 01:19 AM.

  • #10
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    Why does the detector have to be so far away?

    The reflection is obviously coming from the leaves of the plants.
    If you can get as close as 20cm - 1m why can't you just place the LEDs and a photo diode a few of cm away from a leaf?
    That way you can also analyse the difference between older leaves and fresh growth.
    IMO for consistent results you would need to measure always precisely from the same distance.

    No need for complicated amplifiers with noise cancellation, ambient light filtering, lenses, etc. A simple operational amplifier for 2$ would then do.

    A PIC like 12F683 programmed with two lines of code using PICbasicPro(you can probably get away with their Demo version) will switch the LEDs sequentially, do the A/D conversion and transmit a serial data stream to the COM port of you PC ... OK, perhaps it might be 10 lines of code

    So all you would need:
    One ultra bright red LED
    One NIR LED, the type used for video cameras(you can salvage from the many dead camcorders that ppl might have lying around) would be closer to 780nm.
    One IR LED out of an old TV remote. It is usually around 1000nm, but I would use that one as well so you have 3 selective frequencies to work with.
    One photo diode with a fairly linear response for the desired frequency range. A light dependent resistor might be even better.
    I would place them all in a cone to keep a constant distance from the leaf and shield from ambient light.
    An OP like LM358 (the second amp stage might come in handy) Heaps of simple circuits on the net.
    A PIC with A/D conversion. A couple of 12F683 can be obtained from MICROCHIP as samples for free, choose more like 16F628 and other goodies. I think you can choose 5 types.
    A personal computer with a simple terminal programme can collect your data and a software suite with spread sheet, presentation, database (I recommend Open Office) for analysis.


    To calibrate the system you adjust with the series resistor of each LED the light reflected off a neutral surface (probably white), to get an identical value on the OPamp's output.

  • #11
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Hi nomeat, Thanks for response. Think of the role of the sensor not to compare leaves but ultimately an entire paddock or at least a section. What I plan to do is apply a GPS coordinate to each readings (have one of those usb gps recievers) and that way using GIS software can create a map which shows the distribution of crop health. In that respect I dont think there is a way to shield the sensor from ambiant light.

  • #12
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    How can you measure the reflection of an entire paddock or a practical size of it 20cm - 1m away?
    How do you intend to illuminate an entire paddock evenly with 670nm red light?


    Don't you think that asumptions of the health can be made by measuring a selection of individual leaves through out the whole paddock.

  • #13
    Junior Member
    Join Date
    May 2008
    Age
    37
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    The unit is mounted to a vehicle the drives slowly over the paddock logging the reflectance and gps position. So it is doing a small area at a time. The more sensor units, the quicker the job can be done. This is not a new idea. See . I wanted to see if a similar unit could be home made.

    Here is datasheet for that unit
    Last edited by bboughton; 15-05-08 at 02:27 AM. Reason: more info

  • #14
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    They also use hand held units for closer distances too:


    For a range over 1m I would suggest following simple setup:
    You need to supply an array of IR LEDs with very short, high power pulses. In TV remotes it is done like that too. The shorter the pulse the more power and range. A single IR led can handle up to 1A for less than a 100 micro seconds.
    I have not tried pulsing ultra bright red LEDs but I reckon they should handle a few 100mA in the usec range.
    It is easy to design a high gain OP amp to amplify only the reflected pulses and ignore any DC values (ambient light).
    You will also find in the IR sensors for TVs and most other IR remote controlled devices that the IR photo diodes are already integrated with such amps.
    It will behave different for red and IR. You can compensate that with the amount of LEDs or their series resistors as mentioned above.
    I already have a gut feeling that you will need only a couple of IR LEDs but 10 or more red ones. TVs can easily be switched by relecting the remote's signal off a wall, even several meters away.
    Hey, why not just use the guts from TV remotes as the transmitters, the one for RED will just need perhaps a stronger driver transistor and matching resistors.

    Then you can create an average DC value from the amplified reflected pulses with a diode, a capacitor and a resistor to discharge the cap. The values of R and C would probably need to be determined in field tests and also depend largely on the period of the pulses.

    A collector lens in front of all the LEDs focused for a distance of 1m would significantly improve the performance.
    A simple dirt cheap magnifiying glass would be sufficient but it should be at least 10cm in diameter.
    Last edited by Uncle Fester; 15-05-08 at 04:05 PM.

  • #15
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    Quote Originally Posted by nomeat View Post
    No need for complicated amplifiers with noise cancellation, ambient light filtering, lenses, etc. A simple operational amplifier for 2$ would then do.
    No noise filtering, since you can never get rid of the noise it is just factored out.

    A light dependent resistor might be even better.
    LDRs are not very sensitive, and worse they're more responsive to green light.

    To calibrate the system you adjust with the series resistor of each LED the light reflected off a neutral surface (probably white), to get an identical value on the OPamp's output.
    A few small problems with that is that you're calibrating the source, not the receiver. In a manual sense it leaves a lot of room for error, but then, it may not matter.

    Nomeats got some good points, but I can see that he can't see the forrest for the trees, so to speak.
    Concerntrating on invididual leaves even from a distance is not the way to get see the bigger picture. The overall fuzziness of seeing an area like a couple of square metres all at once averages out the reflectance of each leaf where the variation of individual leaves isn't representative.

    There may be no need for a source, when sunlight could be used. Not much photosynthsis going on during the night. So if a constant source is used, the sunlight either has to be factored in or factored out.

    The problem with the detector diodes is their selectivity, or rather lack of it.
    So multiple detectors with different filters is another method. IR filters aren't too hard to find, and red filters, well common as dirt. If you look a little harder you might find some laser output couplers which are close to the right frequencies.

    So now were down to multiple source LEDs and multiple Detectors, one for each colour. The ability to use background light or ignore it.

    Though I was thinking about something which can do all of this in one unit, and it's supprisingly cheap (~$30) and very easy to interface, and it could do individual leaves or a whole farm.
    A standard cmos (or ccd) camera. Though they're not as sensitive as a PIN diode or a photonmultiplier, we're all familiar with their sensitivity. I have a nice picture in my head

    Again there are advantages and disadvantages, but the interesting thing is that the camera can do both IR and red at the same time. The information is contained in the chromonance and the luminance of the video signal.
    There isn't the need for a filter, since the colour information can be extracted from the video signal. Though a low pass filter or colour filters could be used.

    Anyhow... bboughton, it looks like you now have a wealth of ideas and information. Enough to bring you to the stage of buying even the cheap dick smith IR transistor and testing by torturing some plants.

  • #16
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    LDRs are actually more sensitive than photo diodes for very dark signals and are used in infra red astronomy. The dark current of photo diodes have been even for me more than once a problem.

    But for my second solution (that is meant to scan a larger surface, not just the leaves) LDRs are not usable because they will not react fast enough to the short pulses and I am very certain for distances of 1m pulsing the LEDs is the only way to go.

    An amplifier that amplifies only pulses is the simplest and most effective noise limiter you can get.
    You can have a bandwidth that corresponds only with the pulse width, just need to watch that the amp does not oscillate, but a simple high pass amp should do. TL072 is a good dual low noise OP amp.
    I would still first try out salvaged commercial IR sensor/amps from appliances.

    As the system only responds to the pulses the detector diode does not have to be selective as long as the ambient light does not drive it into saturation. Some layers of red cellophane should help if it does in full sunlight.
    I designed a portable bar code scanner once that used only an IR photo interrupter(no laser and no filter) and it worked on bar codes even under full sun.

  • #17
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    That's interesting, I've never heard of LDR's used in astronomy before nomeat. Do you know of any interesting sources before I opt out to google from some general info on them ?

    I don't have problems with dark current, I solve it by using PMT's. But their not suitable for this application for the same reasons that dark current shouldn't be an issue.

  • #18
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    I read about it in an astronomy magazine years ago, sorry I don't know the name or issue any more.

  • #19
    Senior Member
    trash's Avatar
    Join Date
    Jan 2008
    Location
    Tamworth
    Posts
    4,089
    Thanks
    148
    Thanked 3,229 Times in 1,451 Posts
    Rep Power
    1288
    Reputation
    47674

    Default

    no probs, I'm sure I'll come across it in the future somewhere and it will catch my interest. Have you played with PMT's no meat ? You'd love them... so damn sensitive.

  • #20
    Senior Member
    Uncle Fester's Avatar
    Join Date
    Jan 2008
    Location
    Commonly found in a pantry or the bottom of a fridge, searching for grains, fermented or distilled
    Posts
    6,412
    Thanks
    2,292
    Thanked 4,420 Times in 2,521 Posts
    Rep Power
    2048
    Reputation
    81898

    Default

    No doubt I would. Unfortunately I have not been granted the pleasure to lay my grubby fingers on one. Actually a disgrace for somebody who has a couple of a hundred tubes lying around.
    Where did you get yours from?
    Normally not something you would pick up on Ebay or find lying around on the tip
    ...or something I would be able to afford just for hobby use... trying to detect that evaporating micro black hole that got away from CERN

  • Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •