'Adapted' ultrasonic sensor + Arduino Uno, does not work as expected

Hey guys,

I took a 4-output reverse gear sensor that I had sitting here and tested it on the bench. He actually scored correctly with an obstacle 1.2 meters away, see in this photo.

PlacaSensorUltrasom

I intend to measure some distances and I don't want to wait thirty days to receive a JSN-SR04T sensor (which would be correct).

So I decided to connect this sensor to an Arduino UNO R3. I noticed that it only shows 14-15 cms.

Sometimes I notice a small variation that is typical of a poorly regulated ultrasound (which is what I have here).

I don't have an oscilloscope to measure the duration of the pulses and so I suspect it will be pure luck to vary delayMicroseconds values ​​in the code below. And I don't think I would achieve the desired success even then.

Note that I have the display. Maybe I could send data from the Arduino UNO to it, and when it worked I would have the values ​​to put in the sensor reading code, but I lack programming knowledge for that.

#define trigPin 3
#define echoPin 2
 
long duration;
int distance;
  
void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  delay(2000);
  Serial.begin(115200);
}
 
void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(5);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);

  distance = duration*0.034/2;
 
  Serial.print("Distance = ");
  Serial.print(distance);
  Serial.println(" cm");
  delay(100);
}

I came here in the hope that someone has already done something similar because this reverse gear sensor (parking sensor) is very common to use. And as the community here is very creative, I thought someone might already have some good answers.

Does anyone have any...try this?

Thanks

It's strange because even if you disconnect the sensor from the board, the serial monitor doesn't change. It continues to show 14-15 cms infinitely.

Based on my experience with this type of sensor (for cars) I can say
This connector does not send trigger and echo to the display unit.
It sends data onto a proprietary bus so that the unit then displays the values.
This connector is the bus connector.

To better understand how this equipment works, I did reverse engineering and drew the schematic of a model similar to yours.

I modified it so that using an Arduino I could use the values read by the sensors.

Below is the schematic and some photos.

Faced with so many reports of instability in the reading, even using the original ultrasonic sensor (JSN-SR04T) , I decided to wait and buy this one, VL53l0X.

I've already dismantled everything here.

I'm going to leave this topic here for anyone who reads it to also research and perhaps make the same decision.

Health and peace.