See here for one of the best sensors available:
https://www.aliexpress.com/item/US-.../2038168189.html?spm=2114.13010308.0.0.O9ulqD
Temperature compensated, range of about 5m,..
Problem with longer ranges is that the sound signal gets "distracted" by all sorts of echos; the typical beamwidth is between 15 and 30 degrees, but the further you try to reach the more noise you get in the response signal.
If you are interested I can send you a summary for a program that drives a sonar and reads its responses but also removes spurious signals and does some signalprocessing to get a decent measurement.
1 - Thank you. These sensors are limited to about 4.5m. The sensor itself can't be covered, so, it will fail when exposed to water (splashes, rain, etc). If I wanted longer range, presumably I'd replace the actual sensors with longer range, I've had a quick look on digikey.
2 - Yes please, send me the code. I'll be using C, with a low cost MCU
>>>
If the OP could provide some concrete information ie type of vehicle and exact purpose of sensors ("..on the move..": at what speeds, what purpose,..?) I would be able to provide more relevant information.
U.S. sensors can measure distances very accurately but there ate a number of constraints for use in open air. For example, no obstruction is allowed between sensor and object, so how would you accomplish this on the front side of a car?
I know of a lot of applications where these sensors are used in stationary and/or relatively slow moving vehicles but some more information from OP would be helpful.
Given the fulfilment of some basic constraints I would opt hands down for this kind of sensor for distance measurement (if you choose the right one).
Programming too is "very" easy, even including signal processing to eliminate erroneous readings (if you know C++ a bit).
Thank you again. I'd like to make 2 applications.
First application = Sensor stuck on rear bumper, facing backwards. If car is tailgating too close (less than 4 metres), a warning light comes on.
To be used at all speeds, all conditions
Second application = Basic after market wing mirror blind spot detection. Self adhesive fix on to the wing mirror. Facing 45deg away from vehicle. If car is in blind spot, yes or no.
To be used at all speeds. All conditions (rain, sun, etc).
This is not to be relied on, but, merely a back up warning helper. The kit might include 2 or 3 of these as a safety factor.
>>
I doubt it's a problem. Ultrasound works at speeds of around 760 mph. The issues you're bringing up might effect only a few feet per second -- the percentage difference renders it negligible.
As far as rain goes, the beam width of the ultrasonic signal and its reflection is way wider than a drop of rain. Inherent filtering takes care of any other noise.
Thank you. This makes alot of sense. This would need double checking on the actual sensor datasheet (as opposed to the completed PCBA).
Also, I'm not looking for absolute precision, just, "is there a car there", yes or no, for both applications.
>>