Shop OBEX P1 Docs P2 Docs Learn Events
Doppler effect with PING))) — Parallax Forums

Doppler effect with PING)))

iMMOSiMMOS Posts: 14
edited 2009-05-09 04:41 in Accessories
I was wondering if a ping sensor could could be useful to determine the speed of robots such as the BOE BOT.has anyone tried this before?Is it doable?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-08 20:35
    The PING doesn't give you frequency information which you'd need for Doppler sensing. Better to use a wheel encoder to determine the rotational speed of the wheels and use that and the wheel diameter to estimate the speed of the BoeBot. You could use a PING to tell the distance to some fixed object and determine the change in distance over several fixed interval times to determine the speed.
  • ZootZoot Posts: 2,227
    edited 2009-05-08 20:37
    It would be doable in some form, but not as doppler per se. There are some limitations -- you would need to ensure that at all times the 'bot is less than 3 meters from any "wall" (i.e., you must always have an obstacle that reflects the Ping's ultrasonics) and you'd need a reasonably stable external timebase. If you have those, then you could do something like:

    1. Measure time (could just be 2hz "ticks" or similar)
    2. take a Ping reading
    3. save distance
    4. wait 1/2 second
    5. Measure time
    6. take a Ping reading
    7. difference between two readings / time = speed

    Not sure it's worth it though as the boe-bot moves relatively slowly, and the ultrasonics may give you spurious readings on occasion. Encoders would probably be a more reliable measurement of true speed.

    That said, I have often used a trick with ultrasonics not to determine speed, but to see if a 'bot is "stalled" -- if the ultrasonics return a distance of 150cm, and the 'bot is moving forward at full speed, then the next distance reading should be significantly less than the first reading. If it is about the same, then the 'bot must be stalled. Again, this kind of trick only works if the 'bot is always in an environment where the "walls" are less than the maximum readable distance of the sensor.

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • iMMOSiMMOS Posts: 14
    edited 2009-05-08 21:06
    thanks dude.nice trick with the sensor by the way
  • ZootZoot Posts: 2,227
    edited 2009-05-08 21:08
    Yeah, of course, random objects like cats can also trick the 'bot into thinking it's stalled, when in fact a "new" obstacle has really popped up where there wasn't one before .... smile.gif

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

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • iMMOSiMMOS Posts: 14
    edited 2009-05-09 04:41
    Cats!???How may cats do you have dude[noparse]:)[/noparse]
Sign In or Register to comment.