Shop OBEX P1 Docs P2 Docs Learn Events
Ir array sensor — Parallax Forums

Ir array sensor

TomvnTomvn Posts: 103
edited 2008-07-26 04:32 in Robotics
Anyone know how to make Ir array sonser??
jumpin.gif·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-19 04:07
    What do you mean by "IR array sensor"? What do you want to do?
  • TomvnTomvn Posts: 103
    edited 2008-07-20 04:51
    i want make bumper sensor for my robot, i think i see that on the Roomba robot vacuum
  • ZootZoot Posts: 2,227
    edited 2008-07-20 05:29
    The Roomba uses optical IR interrupts on a physical bumper (the bumper moves a slot that blocks/allows IR light to reach a detector -- this obviates the need for a mechanical switch which would be much more prone to physical breakage). Is that what you want to do? Or do you want multiple detectors in a "fan" or "array" facing different points on your 'bot?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • TomvnTomvn Posts: 103
    edited 2008-07-21 02:11
    to Zoot
    right i need multiple detectors on my bot to detect object at 90 degree the same time.
    how can i use 5 or 7 ir led to make light reflect back to 1 Ir detector, i not sure could it wok?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-21 02:39
    You probably need multiple IR detectors, essentially one for each IR emitter, a pair for each direction. You are also going to want some kind of IR opaque tube to narrow the beam from the IR emitters and to reduce the "view" of the IR detectors. You'll still have some problem with reflections, but the tubes should help. You will probably need to use one IR emitter / detector at a time, but you can time sequence them very rapidly since the IR detector will respond in less than 1ms to a modulated IR beam.

    If you want to save I/O pins, you can use a 3 to 8 decoder (74HC138) and an 8 input selector (74HC151) to choose from among 8 emitters and detectors with only 5 I/O pins needed for everything.
  • TomvnTomvn Posts: 103
    edited 2008-07-21 02:58
    Thanks Mike , that help me a lot.
  • GICU812GICU812 Posts: 289
    edited 2008-07-21 03:52
    I've always wanted to mount a PING on a servo and have it spin around like a radar dish [noparse]:D[/noparse] Maybe you could do the same with an IR sensor, the stamp would know what direction the obstacle was based on the servo's direction at the time of signal reciept.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-07-21 13:58
    This thread is being moved from the BASIC Stamp Forum to the Robotics Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • cprcrackcprcrack Posts: 12
    edited 2008-07-21 23:59
    Mike Green said...

    If you want to save I/O pins, you can use a 3 to 8 decoder (74HC138) and an 8 input selector (74HC151) to choose from among 8 emitters and detectors with only 5 I/O pins needed for everything.
    Now that you mention it, I am satisfactorily using a 151 for the detectors. My idea was to also use a 138 for the emitters but if you read a datasheet you will realise that the outputs are all of them inverted. Since the BS2 can't function properly with opposit current (I mean, sending a 0 to a IR LED with the other IR LED pin conected do Vdd is not posible, it must be send a 1 to a IR LED with the other·pin conected to Vss), I think the only way to solve it is to use a hex inverter in all of the outputs of the 138, which is just to messy to put in a robot due to all the wires...
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-22 00:34
    You can use the LEDs with a 74HC138.· Since these outputs go low when selected, just connect the cathode of the LED to the output and the anode of the LED to Vdd (+5V) through the current limiting resistor.· Use the normal (E) enable input to connect to the Stamp I/O pin·and connect the other enable and not-enable pins with pullups and pulldowns so they're "on".· The result should work just fine with existing routines for the selected LED/detector pair.
  • cprcrackcprcrack Posts: 12
    edited 2008-07-22 00:46
    OK, I thought that with a BS2 the current could only go OUT of the BS2 like this:

    (5v) BS2 -> current -> LED (0v)

    But if I understand, you say that this will also work (the current is going IN the BS2):

    (0v) BS2 <- current <- LED (5v)
  • TomvnTomvn Posts: 103
    edited 2008-07-26 04:32
    Thanks Guys
    One more question , could i do some like this , i want to make the docking station charger with 2 IR led , and the BoeBot with 3 Ir detector to make boebot forward the dock, so 3 Ir detector see the Ir led at docking station ,if IR detect left detect the IR Led the Boebot turn right 30 degree and if ir right detect then turn left turn 30 degree and if the center detect boebot go forward, i want to make BS2 at the docking station to communicate with boebot ,but i dont know how to write code to let 2 stamp communicate with eachother
Sign In or Register to comment.