I've been testing out the HC-SR04 and have noticed some issues with its sensing ability. I am using the NewPing library (Arduino Playground - NewPing Library) and an Arduino Uno.
Some issues include:
When the sensor is aligned in parallel with a wall it gives very accurate results, but at an angle 30 degrees or more gives back largely varying distances. See attached pic for a visualization.
When I point the sensor at my chest I also get varying results ( although this might just be because the fabric of my clothing is absorbing the sound wave...)
I'd like to know if these issues are common occurrences with almost all affordable ultrasonic sensors or if there is something wrong with mine? If there is something wrong with mine, or if there is another sensor that can work with angles much better can anyone suggest some?
Thanks for the help!
Note: I bought it off of ebay for pretty cheap so that may be another reason...
This is a common complaint and the reason for the servo mounted sensor that allows you to rotate the sensor CW on a left turn and CCW on a right turn of the robot..The routine scans left and right (range varies) while checking return and correcting position (reversing servo scan direction) if the signal drops off. You should be able to find some posts with code.
Yes, this is usual. I actually went through a lot of effort this past week comparing various HC-SR04 sensors with the more expensive Parallax Ping and the RadioShack model. I posted my results on my blog:
Hi All,
I think that like light sound bounces off of the wall at the angle it hits it, so at say 45 Degs most of it 45 Degs in the opposite direction, so you only get a bit coming back. The angle between them being 90 Degs. Same for IR etc. But I find all the devices I have including cheap Chinese one's work fine.