Forum >Using URM37 ultrasonic sensor as sender or receiver only
ArduinoGeneral

Using URM37 ultrasonic sensor as sender or receiver only

userHead Account cancelled 2016-04-02 10:39:44 1933 Views1 Replies
Dear All,
I am working on a project that uses more than two URM37 ultrasonic sensors. I need to use one of them as a sender only and all others as receivers only.
For now, I am trying with only two sensors connected to the same arduino board. 1 sender (sensor1) and 1 receiver (sensor2). I tried two methods like follows::

Method1:
- send pulse from sensor 1:
Code: Select all
digitalWrite(URTRIG1, LOW);
digitalWrite(URTRIG1, HIGH);

-receive from sensor 2:
Code: Select all
unsigned long LowLevelTime= pulseIn(URECH2, LOW) ;
if(LowLevelTime>=45000) // the reading is invalid.
{
Serial.print("Time Invalid \n");
}
else{
DistanceMeasured = LowLevelTime /50; // every 50us low level stands for 1cm
Serial.print(DistanceMeasured);
Serial.println("cm");
}



Method2:
-Cover the emitter of sensor2
-Send pulse from sensor2
-Send pulse from sensor1
Code: Select all
digitalWrite(URTRIG2, LOW);
digitalWrite(URTRIG2, HIGH);
digitalWrite(URTRIG1, LOW);
digitalWrite(URTRIG1, HIGH);

-receive from sensor2

These methods are giving time invalid or fixed distance like 6cms or 7cms. When using the sensors in their normal functionality (sending and receiving through the same sensor) they work like expected.
Thank you in advance for your help.
2016-04-07 01:40:04 Hi oussama.tahan,

Have it been solved so far?

I haven't met this problem so far. And I've forward your question to related department waiting for answer, I will keep you updated once I got something on this.
userHeadPic Leff