From space being limited, how would you make an ultrasonic range finder with one transducer?

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
All I can find are schematics that use two transducers. My interpretation of the datasheet (linked above) is that it receives from pin 4 and transmits with pin 5:
upload_2018-8-4_14-59-27.png

Although, I was told: Quickly switch from transmitted frequency to connecting the same piezo element to a high gain receiver amplifier. Also need a filter and clock to tell the time between transmitting and receiving the echo signal are needed.

So now I do not know what to think. How would you make it (with one transducer)? What amplifier, filter and clock--if needed--or what resources do you recommend I read?

C:
unsigned long startMillis;
unsigned long currentMillis;

const byte pinTX = 3;
const byte pinRX = 4;

void setup() {
  startMillis = millis();  // initial start time

  pinMode(pinTX, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  currentMillis = millis(); // milliseconds since start

// SOMETHING about transmitting

read();
}
void read(){ // for connecting to pin 4 on sensor
  int len, m;
  char testStr[] = "R012\r";   // <test> This version takes 1870 bytes
//  in = Serial.read(pinRX);
  len = strlen(testStr);        // <test>
//  len = strlen(in);
return m = atoi(&testStr[len - 3]);  // <test>
//  Serial.println(m);          // <test>
//  m = atoi(&in[len - 3]);     // measured TTL serial output converted

}
What are your suggestions, and what functions/libraries do you recommend? I do not plan on implementing this. I just want to know how =)
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
Basically back into the problem.

You have to look at settling time to remove all energy from sensor Tx operation.
That in turn will control resolution of measurement.

I would assume the more mass of the sensor, or area, leads to increased sensitivity
but longer settling times. You can trade-off drive freq for settling time for sensitivity
going off resonance, distance, more considerations.

More sophisticated techniques would be to de-convolve Tx data from Rx signal. Thats
probably DSP and all the stuff that entails......

Start with calculations needed for distance, resolution, andf back into sensor capability
and circuit requirments.


Regards, Dana.
 

Alec_t

Joined Sep 17, 2013
14,314
Although, I was told: Quickly switch from transmitted frequency to connecting the same piezo element to a high gain receiver amplifier. Also need a filter and clock to tell the time between transmitting and receiving the echo signal are needed.
No. All of those things are built into the module in the link. Rx and Tx are respectively for triggering a range measurement and sending the range measurement value to you micro-controller.
 
Top