I need to find a distance sensor which would be able to measure a distance between two cars/trucks up to approximately 4 meters. The interface is not important. I shall be using a uController to detect the distance and to trigger signal when distance exceed e.g. 2meters. No matter what type of sensor (magnetic, optical) but the low cost is preferable. Could you please suggest some that will do the job?
I need to find a distance sensor which would be able to measure a distance between two cars/trucks up to approximately 4 meters. The interface is not important. I shall be using a uController to detect the distance and to trigger signal when distance exceed e.g. 2meters. No matter what type of sensor (magnetic, optical) but the low cost is preferable. Could you please suggest some that will do the job?
Thank you for your reply deepsetan. The sensing range of the capacitive proximity sensors I found is too short (up to 100mm) What I need is some sensor which is able to measure distance with range greater than 4meters. It should be a single sensor that detects the front vehicle.
I would suggest ultrasonics is the cheapest option unless the vehicles are in motion at high speed. Measure 'time of flight', how long it takes for an echo to return.
Radar using microwave sources will work but would be expensive.
You can do it by measuring the displacement of a reflected light (IR) beam but to some extent it's reliability would depend on how reflective the surfaces were and the sensor might be expensive.
Capacitive loses accuracy as distance increases, even 100mm is pushing them to their limit and they are somewhat dependant on humidty and temperature.
Magnetic is subject to the material, plastics for example would not register and a magnetized vehicle could give a wrong report.