Sensor for motor vehicles