Using the Ultrasonic module in receive only mode

Hi,
I have two ultrasonic modules and was wondering how can I use one to detect the other. Any ideas?

Ideally, I would like to control the delay between the pulses of one module and measure this delay on the other one, so basically to have ultrasonic communication between them. Any pointers you could give me will be greatly appreciated!

Provided you disable the transmitter on one, yes. You also have to trigger both at exactly the same time because the receiver has a time window within which it expects a return pulse. You're fooling one sensor unit, because the other is only a transmitter, ignoring its own return pulse.

Then, you trigger both but only A transmits
later
B receives a pulse, data from sensor B is accurate

but you don't divide by 2 as is the usual because the journey has no return trip.

You have not identified your modules nor given links to the data sheets showing exactly how the operate. Do they use one device for both transmit and receive, or do they have separate devices? Do they generate their pulses and then switch to receive and return the length of time between the two? Do they generate a single pulse or do the generate a sequence of perhaps 5 pulses and then wait for an echo?
Paul

If you have the typical HC-SR04 ultrasonic sensor, you have one ultrasound transmitter and one ultrasound receiver.

I never tried but if you pulse the trig pin on one to send the ultrasound out and then read the pulse on the echo pin on the other module that could possibly work

Édit: @aarg is making a good point about the module possibly expecting the sending of the pulse before the read - worth trying

The part about communication sounds dubious. As far as I know, the HR-S04 or whatever it is called, is deaf unless it's triggered. An on board MCU controls its operating sequence. So it can't sit there listening for a signal without any sync. But if you have sync, it's by means of some other communication. So you've lost the point unless you can transmit a very wide bandwidth over the pulse channel. But since the on board micro on the module controls all the timing, only TRIG pulses can be emitted on command. The pulse characteristics are locked in the micro's firmware, you can not change them in order to communicate. I re-read the original post, I first thought it was about the usual ranging application but actually there is no explicit mention of that.

You could probably devise some means of communication this way, but due to the fixed nature of the hardware behaviour, it would be extremely slow.

Suppose you have GPS receivers on both ends. Now you can sync pulses. Perform the sequence I posted above. You could send a TRIG as often as possible. Unit B either sees a pulse right away or times out. That's a binary stream. Just very slow.

You would have the distance as a bonus... GPS to give a fuzzy view and the time, ultrasonic to correlate that with the inter device distance.

If the OP is using the HC-SR04, then with some hacking it is probably possible to convert one unit to continuously monitor for bursts from the other, without triggering or syncing the receiver. These two websites have good information on the operation of the device, but note that "HC-SR04" encompasses several (many?) different circuits, so the devil is in the details of the actual device in the OP's hands.

https://www.davidpilling.com/wiki/index.php/HCSR04

https://uglyduck.vajn.icu/ep/archive/2014/01/Making_a_better_HC_SR04_Echo_Locator.html

To detect: Remove the 14-pin processor (near the crystal). Use Pin 9 to enable the receiver (HIGH? LOW?). The signal from the receiver comes in on pin 10.

Sure, it's SMD component work though...

Thanks! I'm not sure I fully understood you, though:
I have 4 pins (Vcc,Trig,Echo and GND). should I disconnect the Vcc altogether?

Thank again,

Uri

Hi aarg,

The idea was not to synchronize between them, but to use one as a passive detector of the other. This way, I can change the interval between pulses on the transmit side (pulse rate), and I would like to measure the time difference between pulses on the receive side. This is a primitive, 1-way communication, with quite a low bit rate - but I think it's cool regardless! Just need to make it work...

If you use the modules as they are built, synchronization isn't just an idea... it's mandatory. I explained why in detail, in reply #5.

Hi Paul,

The modules are HC-SR04, and they have two different Arduino controllers. One is transmit/receive (regular mode of operation, so that side is easy) while the other I would like to set into "receive only" mode. I don't need to switch sides.
Thanks

We understand what you want to do. I suggest you re-read the entire thread again slowly, as it appears that some key concepts have gone over your head.

Post #6 explains how you would have to modify the circuits on the modules themselves, to bypass the on board microprocessor that controls the TX/RX transducers.

Thank you, I'll definitely take a look!

Hi aarg, reading your comment, I don't think you fully understand. If I could have a device in listening only mode, and measure time between interrupts - I will not need to synchronize the two devices, because I am basically using intervals between interrupts, not intervals between send and receive. Unfortunately this goes against the original design of the module; as you pointed out, it does NOT listen to anything unless triggered. And so I will rephrase the original question: How to disable the transmitter on the HC-SR04 module?

The idea would be: trigger at will. measure the Echo pin, and when it goes down (i.e. - echo received), trigger again, and so on.

With an RF device I could have just used aluminum wrap to cover the transmitter (BTW - do you know which of the two transducers is the transmitter?), and no soldiering/tinkering with the actual board would have been necessary. This module working on sounds... worth a shot, I guess :slight_smile:

... to do that, you have to modify the circuit on the board. You can't do it with a stock module. It's easy to disable the transmitter - just unsolder and remove the transducer. But the same modification that would allow you to receive only, would make that unnecessary.

Once again, a dedicated microprocessor on the sensor board handles the TX/RX sequence and AFAIK prohibits receive operation except after having sent a TX pulse. You need to bypass that.

There is no "Receive Only" mode that you can 'set'. Even if you remove the transmitter (the one at the MAX232 end of the board) , the receiver will only work for a brief time after you pulse the Trigger pin. To get a continuous receive signal you have to bypass the processor (chip in the middle), enable the receiver via processor pin 9, and read the received signal from processor pin 10.

I think the OP will be sadly disappointed with the results. The receiver is only active for the possible received echos because the world is very noisy even at those frequencies.
Paul

Let me give some examples:
The first TV remote controls just turned the power on and off. No channel change or volume, etc. An unpowered clicker tapped a tuning fork that produced a sound way beyond human hearing, but the receiver could hear it and switch on and off.
The sensor also responded to a ring of keys being rattled. It also responded to thunder storms.
The tire of vehicles moving over concrete or asphalt pavement produce ultrasonic sound. Same tires on gravel roads or footsteps on gravel paths do the same. Many insects, as well as bats do the same.

Thank you!

Do you happen to know which of the legs is 9 and which is 10? They are not marked anywhere, unfortunately...

... And to make sure I got this right before I start soldiering - the chip is already out, and I should connect Trig to Pin 9 and Echo to Pin10, right?

Thanks again!
image

Pin 1 is upper right, numbered counterclockwise to pin 14 at the lower right.