I’ve built a small mobile robot with 3 SR04 sensors looking front, front left and front right. It works well, except that occasionally the Ultrasonic sensors either get a ghost echo with no object present, or no echo when an object is present. I’ve done some bench testing and here are my results:
• When stationary, the sensors are very consistent. I’m not overly concerned with accuracy because I want them to sense a minimum distance while the robot is moving. • Moving in general seem to be an issue. As soon as the platform moves the sensor start giving some errors. This is not a motor RFI/EMI issue, I have tested with the motors off and moving the platform by hand. • The sensors are very sensitive to angle. Moving them a few degrees off perpendicular to the target starts giving “no echo” responses. No echo return beyond a 45 degree angle. • The sensors are very sensitive to the size of the target. The smaller the target, the closer you need to be to sense it. Chair legs are a particular problem. • The sensors are very sensitive to the material of the target. You need to be much closer to a cloth sofa than a hard wall to sense it. I’m using the Newping library and I’ve tried between 1 and an averaging up to 10 pulses with ping_median(). I also have an IR sensor on the front that I use for “danger close” sensing and will add contact switches to the front, but I was hoping to avoid that.
Has anyone else experienced this? If so how have you worked around it? Are there any sensing and avoidance algorithms people have used successfully to make up for deficiencies of the sensors?