Shop OBEX P1 Docs P2 Docs Learn Events
Tests to see how well a PADS acoustic distance sensor can tell direction to an object — Parallax Forums

Tests to see how well a PADS acoustic distance sensor can tell direction to an object

Ed TEd T Posts: 50
edited 2011-11-25 10:47 in Accessories
The PADS Distance sensor will return information on the distance to echos as well as the strength of the echos via I2C. Since the ultrasonic output and reception are both angle dependent it seems that by varying the detection angle and reading the strength of the return signal you should be able to determine the direction as well as the distance to the echos. How well does this work is the question. Also what type of issues might cause trouble in doing this.

I have a test setup that I use for testing new PADS sensors that has a fixed position for the sensor and four 3/4" diameter steel posts as targets at various distances. I also have a 4" diameter pipe as a target that is at 15 feet. My plan is to replace the static sensor mount with a servo mount and drive the servo and PADS sensor from a Gadget Gangster Prop Platform and use the ProtoPlus board for the connections and any additional electronics.The prop on the GG Platform will be connected to Viewport so that I can gather the data. My goal for right now is only to see what the data looks like. If it looks good then it seems code would be possible to process the data and give a robot not only distance but direction (we'll see how accurate) to obstacles. Some other possibilities: If the robot knows its location it could do multiple scans from different locations and make a rough map of an area (assuming nothing has moved), it may also be possible to track a target by keeping the sensor pointed at the spot with the highest signal at that distance. Well we shall see.

--Ed

Comments

  • Ed TEd T Posts: 50
    edited 2011-11-13 15:55
    The PADS sensor is now on a mount on a Parallax standard servo. The sensor and servo are connected to the GG Prop Platform and Protoboard. I have a modified version of the spin program in the servo documentation on the GG Platform to test the servo.

    Here is a schematic of the connections:

    ServoAngleTestSchematic.JPG


    The test setup with the targets can be seen in this photo. My lab area is fairly tight so I have to use foam and blankets to reduce the unwanted echos.
    PADSEchoVersusAngle.jpg


    To calibrate the angle of the servo I lined up my laser level so that it pointed down the center line of my test rig. I then changed the servo setting until the sensor mount reflected straight back to the laser level. This showed my zero angle point to be a count of 1325 (=1.325 msec pulse width to servo). By driving the servo with a few different values and doing some basic geometry on the reflected beam I found that the servo moves 1 deg per 10 change in the count (= .01msec driving the servo).

    The PADS sensor has an object in the OBEX, PADSObject1p1.spin that I will use to interface to the acoustic sensor.

    Now to do some experiments!

    --Ed
    816 x 1056 - 307K
    989 x 741 - 205K
  • Ed TEd T Posts: 50
    edited 2011-11-14 04:48
    Well this seems to work pretty well. Here are the results for the 3/4" steel posts. One thing I had to do was reduce the # of 40kHz cycles the sensor put out. This was because the return signals values max'ed out over a big range of angles. I reduced from the default 16 cycles to 4 pulses by sending an I2C command from the GG Prop to the prop on the sensor.

    In the chart below arrows point to the locations of the target posts. To summarize the results:
    Post 1 at 15.6" and -38deg: 15.5", -25 deg.......error 13deg
    Post 2 at 24.9" and -15deg: 25", -9 deg ........error 6 deg
    Post 3 at 36" and -8 deg: 36", -15deg ........error -7deg
    Post 4 at 72" and -1.6deg: 72", 0 deg ........ error 1.6 deg

    Next up will be measurements with more power with the more distant targets.

    --Ed

    attachment.php?attachmentid=86837
    683 x 625 - 27K
  • Ed TEd T Posts: 50
    edited 2011-11-14 17:00
    With # of 40kHz cycles moved up from 4 to these are the results at medium range. I did not plot the close in posts as the signal was maxing out and it also obscured the other data.

    attachment.php?attachmentid=86860

    At 72" the peak looks to be right at the post location.
    At 36" where the post is at -8 deg the peak is about at zero deg.

    --Ed

    PS: I will include the code when I am done.
    683 x 625 - 25K
  • ercoerco Posts: 20,255
    edited 2011-11-14 20:23
    Very cool info, Ed T. Lots of work! Is PADS your product?
  • Ed TEd T Posts: 50
    edited 2011-11-15 04:58
    @ Erco, Thanks, yes PADS is my product, built around the Propeller. With the power of the Prop I only needed 5 of 8 COGS for all the processing!

    Here are some results at longer distances using 16 cycles of 40 kHz output:

    attachment.php?attachmentid=86875

    Above is the post at 72". The peak is around -3deg, which is 1.4 deg from the actual of -1.6deg

    attachment.php?attachmentid=86876

    This measurement is of a 3"x5" card on the vertical pipe at 15 feet. The peak is around 0 where the pipe actually is, though the curve looks pretty ragged.
    (Note the change in scale in the axis for the relative strength of the return signal versus previous graphs)


    --Ed
  • Ed TEd T Posts: 50
    edited 2011-11-16 19:49
  • Ed TEd T Posts: 50
    edited 2011-11-19 12:30
    Well I couldn't have data of distance versus angle and prop video capability without creating a radar (PADSar?) display.

    Attached is a short avi that shows the results. The size of the colored dots represents the magnitude of the reflection, somewhat scaled for distance. It needs some work for the measurements at 25" and less.

    The setup is the same as the "4 cycles" graph above. Posts at 16", 25",36" and 72"

    Remember that a dot a specific angle does not indicate that there is something at that specific angle. It means that when the sensor was pointed in that direction it got a reading at that distance. The peak signal and center of a group of dots better indicates the angle of the point creating the reflection.

    --Ed

    attachment.php?attachmentid=87004
  • Ed TEd T Posts: 50
    edited 2011-11-25 10:47
    Here is the final test, I hope. I mounted the P.A.D.S sensor on a Cyperbolic reflector and then mounted the reflector on its side onto the Parallax servo.

    Here are a couple of shots of the setup:

    attachment.php?attachmentid=87184

    attachment.php?attachmentid=87183

    I then used this setup to scan the post at 5 feet.

    Here are the results. The graph on the left is a scan without the reflector. The Full Width Half Max looks to be about 35 degrees.
    The graph on the right is with the reflector. Here the FWHM is about 5 degrees and the peak signal is about 25% higher (though it may be higher as the value maxed out)

    attachment.php?attachmentid=87181

    (Note that I did not recalibrate the zero point after mounting the reflector so the angle values are slightly different in the 2 graphs)

    --Ed
    512 x 384 - 33K
    512 x 384 - 36K
Sign In or Register to comment.