Shop OBEX P1 Docs P2 Docs Learn Events
Trouble making multiple measurements with PING — Parallax Forums

Trouble making multiple measurements with PING

Involute1344Involute1344 Posts: 14
edited 2012-07-08 14:08 in Accessories
I'm making three measurements in quick succession with the PING so I can toss out the high and low values to cut down on spurious readings. Regardless of the delay I use between the subsequent readings (from 250 us to 1.5 ms), however, the second and third readings bounce around a lot (by an order of magnitude); the first reading tends to be pretty accurate. Any idea why the subsequent readings are so variable? By delay I mean the time from when the echo return pulse goes low until I send a new trigger pulse. Thanks.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-08 14:02
    Is it safe to assume that the second and third return times are shorter than the first? If so, it's because you're still getting echoes from a prior transmission. Set your delay time longer.

    -Phil
  • Involute1344Involute1344 Posts: 14
    edited 2012-07-08 14:08
    Sometimes one will be shorter and one will be longer. In any event I pushed the retrigger delay out to 1.8 ms and that seems to have fixed the problem.
Sign In or Register to comment.