Shop OBEX P1 Docs P2 Docs Learn Events
Ping))) Questions — Parallax Forums

Ping))) Questions

r.daneelr.daneel Posts: 96
edited 2012-12-10 11:26 in Accessories
Just a couple of fairly basic questions about the Ping))).

Q1: The Ping))) works by emitting an ultrasonic burst and timing the echo - but what if there is nothing to reflect the emitted burst? If I wait for the echo am I going to be waiting forever, or does the Ping))) give up and just return the max of 18.5ms? Do I need to implement a timeout on the wait for the echo, or does the Ping))) always return something (the max in the case of nothing to cause an echo)?

Q2: If I want to use multiple Ping)))s, is pointing them in different directions sufficient to stop any cross-echoing, or do I have to separate them in time? Might I get echo bouncing around a room even if I do point them in different directions? I guess the answer is "probably".

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-12-09 17:18
    1) There's a timeout. If the PING))) doesn't detect an echo within about 18.5ms, it terminates the timing pulse and effectively resets itself.

    2) Probably. It depends on the room, on the types of surfaces, etc. Best is to trigger them 20ms or more separated in time
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2012-12-10 10:38
    r.daneel wrote: »
    Q2: If I want to use multiple Ping)))s, is pointing them in different directions sufficient to stop any cross-echoing, or do I have to separate them in time? Might I get echo bouncing around a room even if I do point them in different directions? I guess the answer is "probably".
    Thanks!

    This assumes you'll be using a micrcontroller (such as the Propeller chip) which is capable of triggering and measuring multiple PING))) sensors at once. On a single-tasking microcontroller you'll be triggering the PING))) sensors in succession.

    Triggering them at the same time probably wouldn't work well in a closed space. As Mike mentioned, room characcteristics will play a big role, but if this is on a robot heading into rooms with corners then it would not be a good idea.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-12-10 10:54
    Ultrasound also has a hard time detecting hard flat surfaces if the sound hits the object at a glancing angle.

    It also doesn't see some soft materials. My couch appeared invisible to ultrasound until the robot pushed the sensor against couch. Invisible isn't really correct, since the couch absorbed the ultrasound. The ultrasound didn't pass through it (or the sensor would have detected the wall behind the couch).

    IR sensors make a great addition to ultrasound. It seems like IR is pretty good at detecting things ultrasound has a hard time with.
  • r.daneelr.daneel Posts: 96
    edited 2012-12-10 11:26
    Chris - yes, I'm using a Propeller, so could fire multiple PING))) sensors simultaneously.

    Duane - thanks. Yes, it sounds like IR might be a good option.
Sign In or Register to comment.