Tests to see how well a PADS acoustic distance sensor can tell direction to an object
Ed T
Posts: 50
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
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
Here is a schematic of the connections:
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.
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
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
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.
Here are some results at longer distances using 16 cycles of 40 kHz output:
Above is the post at 72". The peak is around -3deg, which is 1.4 deg from the actual of -1.6deg
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
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
Here are a couple of shots of the setup:
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)
(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