My robot glitches on ultrasound sensor

Hi all

Most of the time my robot reacts correctly (it backs off and turns when it comes too close to a wall), but for some reason sometimes it just ignores the input and crashes into the wall?

Why does this happen? Any ideas?

Br, Peter

Self destruction psychosis? Have you been mean to it? Were you chasing it when it ran into the wall?

Is the rangefinder perpendicular to the wall? If the target is at an angle, the strength of the echo can be reduced. Is the wall solid enough to reflect ultrasound? Soft targets (curtains, drapes, cloth covers, soft furry kitties) may absorb the sonar pulses.

(deleted)

I’ll install another one on a servo as a backup and see how that works. The one I have now is fixed so I think it might be that angle stuff

Thanks,
Peter

That "angle stuff" does sneak up on the unsuspecting.