US Sensor beacon

Dear all,

I am writing because I would like to use the JSN - SR04T (a waterproof version of the ultrasonic range finder), in a bistatic way.
Let me explain, I have two sensors and I would like to use one of them in transmission and the other one in reception, with two different Arduino boards. I don’t need to evaluate the distance between the two sensors or any other parameters, I just want to blink a led if the Rx sensor receives a US pulse from the Tx sensor.

In my previous post I mentioned the NewPing Library, I have modified it because it is not a NewPing issue.

From what I have “studied” on line, I understood that it is quite impossible to do it in an easy way because the sensor is practically a range finder and it cannot be driven as a TxRx module. If I am right, from the Arduino board you can only read and write the echo and trigger pin of the sensor. When Arduino gives 5V on the trigger pin, the sensor will wait 10 us and then send the US pulse, while putting “high” the echo pin input to Arduino, until it receives an echo back. By the measurement of the time of “high” of the echo pin, we can evaluate the delay and so, the distance of the first obstacle.

So, if the RX sensor is not “woke up” on the trigger pin, it will never put high the echo pin and I will never know if it will receive an echo form any sensor, am I right?

By the way I am struggling to find a solution, by making use of two possible way out:

  • A “fake” trigger on the RX sensor
  • Force the Echo pin to HIGH directly from Arduino and wait for the senor to put it back to low, even if it has never sent a pulse

For solution#1 I mean the following:
Put the RX-US sensor in front of an obstacle so far that it will never receive any echo back (i.e. Y = inf in the attached figure)
Trigger the pin of the RX sensor (with no TIMEOUT on the echo pin) and wait for few seconds (checking that no echo bounced back has been received)
Trigger the pin of the TX sensor (in front of the RX sensor), with 5V
Wait for the echo pin of the RX sensor to fall down when it receives the pulse from the TX sensor

For Solution#2:
Put the echo pin of the RX sensor HIGH by Arduino
Trigger the pin of the TX sensor in front of the RX one
Wait for the echo pin of the RX sensor to fall down when it receives the echo from the TX sensor

For sure the second solution would be more useful and practical, but I don’t know if it could work (I don’t know the internal logic of the sensors)

Does anyone have any suggestion?
For instance, if I understood well the logic of the sensor and if solution 2, at least, is feasible.

Thank you in advance for any help.

I just put the answer because the topic has been strongly modified.

All you would need to do is have both Arduino's trigger their connected sensor at the same time. One would technically be the transmitter, and the other the receiver. Both would be sending out the ping and both would be listening for the echo. You would need a method so both would trigger the sensor at the same time. Ultra precision wouldn't be important as you mention you're not worried about measuring the distance.

You could even remove the input ultrasonic transducer from one and the output ultrasonic transducer from the other sensor so there would be less likelihood of reflections.

Anyway, not sure why you don't think it's possible. It may be better if you describe what you're trying to do or what problem you're trying to solve instead of proposing solutions. For example, tell us what this project of yours is and maybe a more creative and better solution can be suggested.


Thank you very much Tim.

I understand that you would be for solution#1, i.e. putting in Tx also the Rx sensor.

But, unfortunately, I have to use to different arduino boards for my project. Let me explain it in a more detailed way (see attached image).

I have to send a pulse to a device under the sea/water level (1 meter height more or less). When the Rx device receives the pulse, it only has to activate a servo and the self inflating procedure of the buoy will begin, getting the buoy at sea level. Very easy!

Consider that today the self inflating procedure, the buoy and so on are not my business, I only have to find a solution for underwater communication so, I am trying the US sensor (because the RF are useless underwater).

This is the reason why I only have to send a pulse and getting the information if the Rx sensor receives it or not, I don’t need other information…

Before that, in order to assure me that the US would work for very short distances, even in water, I tried to put one sensor just below (1 cm, this is teh reason for the waterproof sensor JSN-SR04T) the water level of a tank full of water (50 cm height) in order to check if the range measurement would work with water medium instead of air, and it seems that the pulse was received by the sensor so, after that, I bought the second sensor to test it in the bistatic way…

Ok I am probably speaking with myself...

By the way, I tried solution#1, but unfortunately the JSN-SR04T has an internal timeout and the echopin, at a certain time, falls down even if no echo back has been received...

Solution#2 is not feasible because the echopin is in INPUT, so it is not possible to force it to 1...

Find a friend with a hot air rework gun, and remove the on board microprocessor. You can then control the rest of the circuitry with Arduino input/output pins.

The schematic diagram for the HC-SR04 is shown here

The HC-SR04 is really pretty simple and might be quite similar to the waterproof version. If not, it should not be too difficult to trace the circuitry.

Might not even have to remove the RX microprocessor. How about cutting the threshold trace to the uC, holding threshold high (or low...whatever keeps the receive comparator working), and polling the receive signal line? (assuming the waterproof circuit is similar to the HC-SR04)