Distance Sensor Field of Vision

We used the Vex Ike schematics and were trying to get him to turn in a circle until the distance sensor saw something laying in front of him with the 228-3011 sensor. We seem to be having trouble getting him to stop at a consistent position when he sees it. For example, the first run, he might stop with the object at the very edge of the distance sensor, and the second run he might stop with the object in the middle of the sensor without much consistency. We slowed his rotation down thinking maybe that could help, but it didn’t seem to. Is there a way to narrow the field of vision for that model sensor or any other possible suggestions to get him to stop more consistently?

In general, the “field of view” of an ultrasonic sensor is determined by the size, orientation, and stiffness of the radiator and receiver; all those things are set at manufacture. Some people have reported limited success in using waveguide tubes lined with sound absorbent material (like the soft “loop” side of hook-and- loop fastener material) in front of the sender and receiver. Sound propagation doesn’t always work the way you’d think it would (due to edge diffraction effects, among other things) so sometimes attempting to direct sound will actually disperse it more widely.

The soft-lined tubes work somewhat/sometimes, because in addition to absorbing some of the sound waves (converting them to heat) the lined interior of the afore-mentioned tubes create a ragged edge, which helps with edge dispersion. In my experience, you mostly end up cutting the sensitivity of the sensor. Since the side lobes of the sensor system are less strong, this will have a slight “beam forming” effect. Overall, probably not worth the trouble.

One other option may be to scan the area and determine the strongest signal. So when the device crosses a threshold (starts to detect an object) you continue to turn until that signal starts to decline.

I have not used an ultrasonic sensor but I have heard from others that they may take extra time (multiple samples) to return consistent results.

That’s not an option. The sensor either returns a distance, or it does not. Due to the way it works, there is no way to extract strength of signal information.

On some sensor/robotic platforms, we address this issue by having two ultrasonic range sensors arranged at the front corners of the chassis, facing slightly outward from the forward direction. Then, the right field of the left sensor will overlap with the left field of the right sensor. You can infer* an object is “in front” of the platform if both sensors report the same distance to an object.

*This method is not foolproof, of course. For best results, we form tracks of distant objects over time, and look for them to converge in predictable ways. As an example, if you’re turning clockwise and get a distance to an object on the right sensor, and after turning a bit you see the same distance in the left sensor, the simplest solution is one object at a fixed distance that was initially to your right as you turned. Kalman filtering and multiple hypothesis correlation can really help. Not worth the trouble here.

I could imagine a system that did alright by just turning in place with 1 sensor. Find the range of angles that see the object and assume center of that range is object. Assuming no other objects within range this shouldn’t be too difficult. Also assuming the decay on each side of the sensor is the same.

if(used to see object and currently can’t see object)
to detect rising edge