Keep in mind you're also paying for quality. I've used the MaxBotix sensor (from AndyMark) before at it works very well.
I looked up the HC-SR04 sensor and read a couple of the reviews on Amazon, I've quoted a portion on one below.
Quote:
These SR-04s are readily available now for under two dollars each. I have a dozen of them from various importers. They work OK with various Arduino libraries. It's an extremely useful sensor for countless project.
As some people noted, they also return garbage data at times, especially right after the distance to the target changes. Some of the units are better than others that way, some are quite bad. What the issue seems to be is not responding fast enough for the software, or not at all. Many example sketches translate the invalid state to "0 cm". A filter in the code to discard bad results helps, but that slows average response. If you use the NewPing library's timer interrupt mode, you get no "0 cm", the code waits, sometimes a second or more. I'm not 100% clear on this yet. It's best to buy several and use the better ones. For me, the more expensive 3 pin "Ping" module, that the SR04 apparently copied, performs much better.
|