Shop OBEX P1 Docs P2 Docs Learn Events
How the Ping sensor works — Parallax Forums

How the Ping sensor works

water_resistantwater_resistant Posts: 3
edited 2010-05-13 20:38 in Accessories
I'm using the Ping sensor in a school project. It's important for me to be able to explain (at some level) how the Ping works so that when I give my presentation I can answer any questions that might be asked. I have read the information available on the Ping's webpage and I know that there is an MCU on-board the Ping. I'm guessing that an ADC in the MCU converts the analog signal from the receiver (after it receives the echo), to the digital pulse that gets transmitted from the Ping to the MCU off-board. Is this correct? Can anyone share some other details of the Ping's operation?

Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-13 00:18
    Have you read the documentation for the PING))) sensor? It goes into some detail about how the device works. If you don't have it, you can download it from the Parallax webstore page for the product.
  • water_resistantwater_resistant Posts: 3
    edited 2010-05-13 11:20
    Yes, I've read the PING)) Documentation v1.6 and some of the other docs on the Ping)) page. But it doesn't quite go into the detail I'm looking for.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-13 15:01
    The PING internal design is proprietary, so it's not published. It was designed by a 3rd party that "owns" the design, so you won't get any more of a detailed description of how it works internally nor a schematic. That said, there are some "obvious" things about the way it works and there have been other, similar devices published as "do it yourself" (like www.robot-electronics.co.uk/htm/srf1.shtml).

    The transducers have a pretty sharp mechanical filtering action, so no fancy input filtering is needed (for the ultrasonic pulse). There would be an amplifier and the SX microcontroller which generates the low level transmit pulse and does the timing. There's no ADC used (and none in the SX). The SX's input stage voltage threshold acts as a voltage comparator, so the SX will see several pulses representing the several cycles of ultrasonic energy received by the transducer.
  • water_resistantwater_resistant Posts: 3
    edited 2010-05-13 18:49
    Ok, thanks Mike.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-13 20:38
    Not sure what detail you're looking for, but the general theory of operation is as follows:
    • The PING))) sensor waits for a trigger pulse on its signal pin.· This pulse must be at least 2uS (typically 5uS).
    • Once the trigger is received there is a holdoff time of 750uS to give the host MCU a chance to make its trigger pin an input and be ready to receieve the return pulse.
    • A 40kHz burst (200uS long) is sent from the TX transducer and the signal line is made high to mark the start of the return pulse.· The LED is also lit.
    • Once the 40kHz burst has reflected off an object and returned it is picked up by the RX tranducer and the signal line is made low to indicate the end of the return pulse or a timeout (18.5mS)
    • After 200uS the PING))) sensor is ready for the next trigger pulse.

    Some·notes here:
    1. The temperature of the air affects the speed the sound travels through the air and thus affects the accuracy.· The PING))) sensor is most accurate at room temperature.
    2. The return pulse represent the entire round trip of the sonic burst, so to get the distance that value is divided by 2.
    3. The minimum return pulse is 115uS.

    I hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering


    Post Edited (Chris Savage (Parallax)) : 5/13/2010 8:47:31 PM GMT
Sign In or Register to comment.