Shop OBEX P1 Docs P2 Docs Learn Events
Picking a Sensor — Parallax Forums

Picking a Sensor

CraigRCraigR Posts: 12
edited 2009-12-18 18:53 in BASIC Stamp
I am beginning a new project and would like some advice.

I am building a small robot and I want the robot to follow me around. I do not know which type of sensor I·would use to accomplish this. I want the sensor to be able to rotate, like a turret on a IR sensor, to periodically search·for my position·and head in my direction, which made me think·of using an IR sensor.·I only want the robot to follow me·around, however,·not just follow anything that moves,·which made me think·of using·a RFID sensor and wearing a RFID tag for the robot to sense where I am. I researched RFID sensors and apparently they come in active and passive, with and without a battery. The active RFID sensors can be read up to one hundred feet which is unnecessary because I will·be a maximum of 10 feet·away. Are there any·relatively low cost sensors that·have the capabilities of a IR sensor turret but will pick up a RFID tag?

Any help would be appreciated.·

Comments

  • ZootZoot Posts: 2,227
    edited 2009-12-16 22:03
    This topic has been brought up many times. Generally there seem to be three reasonably reliable and not radically expensive solutions:

    - use a thermal sensor array to seek out the heat of the body. Here is one example: norrislabs.com/Projects/FollowMeHex/index.html

    - make an IR beacon "badge" to pin to your hat or shirt, etc. The beacon sends out IR pulses which can easily be picked up by IR detectors across the room.

    - use a color sensor/camera (e.g. the CMUcam) to track a known shirt color, or brightly colored badge (circle of fabric), or hat.

    I bring up using a hat because the hat is easily "seen" from all directions, while a badge of color on a shirt front can't be seen from the back, etc. I've also seen a few projects where the person being "followed" wears a belt that contrasts highly with their clothing (so a color tracking camera can look for the band of white on black or black on blue or whatever).

    I'm sure others have clever solutions as well. I've got one 'bot that follows me using two sonar rangers (it looks for motion, then tracks it) but it's not particularly reliable nor robust (it's just some code I piggybacked onto an existing project on a whim).

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • CraigRCraigR Posts: 12
    edited 2009-12-16 22:44
    So would your PIR sensor do the trick, Item Number: 555-28027. It says that it can detect human motion up to 20 feet but it only reacts to infrared signals not human motion, right ? Also would this·infrared emitter work with this PIR sensor: http://www.bhphotovideo.com/c/product/488597-REG/Insight_INS_SNG_001_Infrared_Beacon.html. Thanks, you've been very helpful.·
  • SRLMSRLM Posts: 5,045
    edited 2009-12-16 23:25
    Neither of the links will work. The PIR simply detects motion or no motion, not motion in a specific direction. Besides, it detects any motion, not just human motion (hot bodies like humans emit IR light. The IR beacon that you posted is meant for a human to interpret, not a computer. It appears to simply be like a flashlight, but in the IR spectrum. The "beacon" that Zoot describes would need to use modulated IR light so that a robot can differentiate between the beacon IR and the ambient IR (such as the sun or some fluorescent lighting).

    Another option (hideously more complicated, BTW) is to use an IMU on the person and an IMU on the robot, and use physics and calculus to calculate absolute positions for each (aka, dead reckoning). Of course, with time the positions would randomly drift unless corrected.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Powered by enthusiasm
  • ZootZoot Posts: 2,227
    edited 2009-12-16 23:32
    SRLM said...
    IR light so that a robot can differentiate between the beacon IR and the ambient IR (such as the sun or some fluorescent lighting).

    Actually, in my own beacons, nests, and various 'bots, I go further and use a modified IR data schema (not just straight pulses): 12 bits plus a start bit. 4 bits are the "to" address, 4 bits are the "from" address, and 4 bits are the actual "message". This lets multiple 'bots and nests and such in the same area communicate with each other, find each other (track), and be able to differentiate each other. It also prevents any crosstalks with other IR schema that may be in the environment (stereo remotes, Roomba virtual walls, remote control toys, IR obstacle pulses, etc). It also helps cut noise from outside sources way way down, at the expense of slightly longer recognition time (average sync time is about 150ms, longest might be 1500-2000ms).

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • ZootZoot Posts: 2,227
    edited 2009-12-16 23:43
    CraigR -- there are plenty of Stamp examples for sending/receiving data and/or straight pulses through a regular IR led and detector (the kind used by remote controls). e.g.: www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/322/Default.aspx and under "Downloads and Resources" you'll see links for source code and the PDF book. It's a great set of experiments if you haven't messed with IR tricks before.

    If you were making a badge or standalone beacon, a Stamp is a bit pricy, but you could use a plain ol' 555 timer and a few parts to make one, and save your $$ for the Stamp side of things. Again, such a circuit is described in the IR book mentioned above.

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • CraigRCraigR Posts: 12
    edited 2009-12-18 18:32
    How would you go about modulating the light on a IR sensor or do companies make IR sensors that have adjustable ranges for accepted light? I guess I could initially make the robot follow a universal remote set to 38.5 kHz, but eventually I would like the beacon to automatically pulse infrared light so I don't have to continuously press the remote for the robot to follow me. Any suggestions?
  • ZootZoot Posts: 2,227
    edited 2009-12-18 18:53
    Either have a micro handle that, or use a 556 timer (essentially two 555 timers in one chip) -- one 555 is the modulated ~38.5khz IR emitter signal; the other 555 is set to say, be on 1 ms and off for 9ms -- the output of this second 555 is tied to the RST line of the first 555 (essentially taking the place of a micro pin that is turning the 38.5khz on and off at regular pulse intervals). A button battery, the chip, and a few external components and you'd be on your way.

    Remember that the 555 circuit has a pot for adjusting the frequency of the modulated IR -- so you could dial it up or down to match given emitter/detector setups. Here is where COUNT on the Stamp is your friend -- you can hook the output of the 555 circuit to a Stamp input pin (rather than an IR led) and COUNT the frequency so you can set the pot right where it needs to be (like using the Stamp for a cheapo frequency counter and display if you don't have a 'scope or standalone frequency analyzer).

    There are examples of the dual timer circuit floating around on the forums. I think Erco did a setup like that for his self-charging Scribbler -- I tried searching for it but couldn't turn it up. He may see this post or you could PM him and ask.

    For my own part, I always use a micro, because I can pick up a micro for about the price of a 555 or 556, and then there is almost no external circuitry required, I can change the behavior and paremeters whenever I want by reprogramming, etc. I'm talking about a micro like an SX or ATTiny or PIC or the like, which can be had for $1-$5, not a Stamp which is considerably pricier for this purpose. But that presumes a certain comfort level, of couse, and there's the need for the programmer (SX-Key, AVR ICP, etc), so that's perhaps a separate issue.

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.