Shop OBEX P1 Docs P2 Docs Learn Events
PING Question: Problem with Short-Distance Measurements — Parallax Forums

PING Question: Problem with Short-Distance Measurements

HappyLemmingHappyLemming Posts: 2
edited 2012-04-15 06:46 in Accessories
Hi hi,

I've recently coded interface with the PING sensor in verilog on the Spartan 3E FPGA.

The sensor works wonderfully with longer-distance readings (say, beyond a foot). With short-distance targets (say, 5 inch away), the sensor would falsely display "1 inch." (My code displays readings with a 1 inch resolution).

I've noticed that flat targets perpendicular to the sight of the sensor would consistently produce this false reading. When I tilt the target at a slight angle, so that it's not exactly perpendicular, the sensor would occasionally give correct readings.

Any idea what the problem might be? Could it be that with flat, perpendicular targets at distances shorter than a foot, there isn't the proper angling for the transmitting "chirp" to reflect back to the "echo" reciever?

Comments

  • HappyLemmingHappyLemming Posts: 2
    edited 2010-12-05 07:09
    Nevermind, I think I fixed the problem.

    When I increased the "delay before next measurement" from the recommended "200us" to something much larger like "1600us" the problem went away.

    I think the problem might be related to the timing of the bidirectional pin of my FPGA Spartan 3E development board. The FPGA board probably didn't have enough time to switch the pin between "output" and "input" fast enough to trigger the ping firing of the next round. My code interpreted the non-reply as a (spurious) reading of "1 inch."
  • ercoerco Posts: 20,256
    edited 2010-12-06 17:37
    The Sharp IR distance measuring units are quite accurate, especially at short distances. Check the app notes for the sensor at http://www.junun.org/MarkIII/Info.jsp?item=9
  • sudheera95sudheera95 Posts: 1
    edited 2012-04-15 06:46
    hii...let me know to which pin of spartan 3e FPGA the out put of sensor was given.......pls do respond........
Sign In or Register to comment.