Shop OBEX P1 Docs P2 Docs Learn Events
Visible or Ir — Parallax Forums

Visible or Ir

Spiral_72Spiral_72 Posts: 791
edited 2010-06-11 13:27 in General Discussion
I'm not sure if this could technically be asked in the sensors forum, so here it is.


I've been toying, unsuccessfully with Ir sensors to detect walls on my bot. I understand the 38kHz or whatever modulation frequency now and the theory behind it. Implementing the thing has become a challenge.

The question isn't really about Ir though:


Ir is light that happens to be outside our visual capabilities.... OK, so what if I use high intensity red and green LED's, one color for each side???? That would work wouldn't it? The thing I'm stuck on is a receiver. Any ideas? I can't seem to find a detector. Photoresistors and diodes detect light, not specifically red or green, so that won't work..... The LED itself used as a detector might work, but it seems to be a pretty poor detector. Parallax ColorPAL is inexpensive enough, but won't work and the Color sensor is too expensive for this project.

Any ideas on a detector?

I DID just have an idea though (after writing all this).... What if I use a photodiode with a color filter!????

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.

Comments

  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-10 14:21
    Oh, my thoughts on the red/green LED's instead of Ir is it would be easier to work with / troubleshoot and might add an aesthetic quality to the bot [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • mctriviamctrivia Posts: 3,772
    edited 2010-06-10 14:50
    all you need is a filter over top of a light detector(you chose) that will filter all light but that color. so use a green filter to detect green and a red filter to detect red. you will have dificulty though with white lights that do generate both colors in it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lots of propeller based products in stock at affordable prices.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-06-10 14:59
    Spiral_72 said...
    ....The thing I'm stuck on is a receiver. Any ideas? I can't seem to find a detector....

    I think part of the reason the IR devices use 38kHz modulation is so that the IR light can be discerned from IR in the environment. If you use green light, then you can place a green optical filter over your detector but that will still allow the detector to pick up green light of that same wavelength that happens to be flickering around in your room. The modulation technique allows the detector to respond to only the light color that is being somehow "chopped". It's a form of electronic filtering. If you use green or red or whatever, then I think you will need to develop your own modulator and detector scheme to avoid stray signals from interfering with your system. But I'm not sure why you would want to go to all that trouble when IR ready-mades are cheap and already available.
  • ercoerco Posts: 20,261
    edited 2010-06-10 15:31
    IR LEDs and their sensors are much better suited for proximity detection than any visible-light LEDs. When pulsed (at 38 kHz), IR LEDs can blast a VERY intense signal, and the corresponding sensors do a great job of filtering out ambient light & noise (the rectangular black 3-pin receivers, n'est-ce pas?). TV remotes work at incredible ranges when they are not even pointed at the TV. LOTS of development behind them, you aren't likely to do any better on your own. Double check everything about your setup. Check your sensor frequency (37-40 kHz, some are even 56 kHz). Experiment with a TV remote and make sure you can pick up that signal, reflected off your walls. If you aren't getting the results you want, then (as Hannibal Lecter said) "Look deep inside yourself".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-06-10 18:25
    One thing about IR remote control sensors is that they will not detect a continuous stream of 38KHz-modulated IR. The response will fade after a few milliseconds. To use them effectively, you need to modulate your IRED for just a few cycles, take a reading from the sensor, then shut off the IRED for a few milliseconds before starting another cycle. Remember, these detectors are designed for detecting remote control codes, not for continuous detection. Part of their design includes automatic biasing for on-off keying. Without the on-off aspect, they don't work.

    -Phil
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-10 23:52
    Phil,
    Are you serious!? Um, why am I just now finding this out!? Phooey. That's good to know, I'll try it again.

    Erco,
    That actually makes a lot of sense. I'm getting a good modulated signal from a 555 firing the Ir LED. I'll try it again with Phil's information.

    To all,
    It sounds like my idea was another that would only work in theory. Oh, well. It would have been cool nonetheless.

    Thank you all. Back to the circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-06-11 00:32
    Go to the 3rd sticky on the Propeller forum. PEKbot and Transmit Square Wave Frequencies will help.

    John Abshier
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-06-11 01:56
    Spiral_72 said...
    Are you serious!? Um, why am I just now finding this out!?
    'Probably because almost everybody was using BASIC Stamps for this until the Prop came along, and you couldn't both modulate the IRED and take a reading at the same time. I found this out only recently while working on the Spin object for the Scribbler II robot.

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-06-11 02:27
    Phil Pilgrim (PhiPi) said...
    One thing about IR remote control sensors is that they will not detect a continuous stream of 38KHz-modulated IR. The response will fade after a few milliseconds. To use them effectively, you need to modulate your IRED for just a few cycles, take a reading from the sensor, then shut off the IRED for a few milliseconds before starting another cycle. Remember, these detectors are designed for detecting remote control codes, not for continuous detection. Part of their design includes automatic biasing for on-off keying. Without the on-off aspect, they don't work.

    -Phil

    This is a very good thing to know and it probably should be mentioned in the educational labs that deal with these devices. Sooner or later I, myself, was destined to get burned by this situation, I'm sure of it.

    Thanks Phil.
  • ercoerco Posts: 20,261
    edited 2010-06-11 04:07
    The attached 556 beacon circuit works fine with IR sensors, as it sends modulated pulses of 38 khz IR that can be detected & counted, so you can identify different·beacons or pulse rates.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-11 13:09
    Phil Pilgrim (PhiPi) said...
    Spiral_72 said...
    Are you serious!? Um, why am I just now finding this out!?
    'Probably because almost everybody was using BASIC Stamps for this until the Prop came along, and you couldn't both modulate the IRED and take a reading at the same time. I found this out only recently while working on the Spin object for the Scribbler II robot.

    -Phil


    I'm modulating with a 555 and reading with the Stamp! That might just explain everything. Again, I say Phooey

    Thank you Phil, you've probably saved me a lot of time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-11 13:27
    Thanks for the schematic Erco. I saved it. That sure makes for a cute little board.

    While I'm on the Ir subject..... but totally unrelated to this discussion.... A worthy read (I thought) and very interesting. I just found this the other day, and was able to procure some 1/4" black polycarbonate [noparse]:)[/noparse] It should be VERY cool!

    amasci.com/amateur/irgoggl.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
Sign In or Register to comment.