By maria.noronha.costa
#32339
Hi!

I have a project that requires distance measurement and a large number of sensors (up to 30). I’m planning on using these distance sensors (https://www.dfrobot.com/product-101.html).

I also pretend to use an S7-1200 CPU 1215C PLC and this communication module (https://www.plc-city.com/shop/en/siemen ... -0xb0.html). So, to establish communication between the sensors and the communication module, do I need a MAX485 chip? Do sensors support the Modbus RTU communication protocol? Can I connect all the 30 sensors in series and use a single communication module? And how can I trigger each sensor separately? I have only seen code examples for Arduino, but I need to use a PLC on this project.

Thank you in advance!
By robert
#32356
Hey Maria,
Thanks for the interest. I'll try to tackle your questions one at a time. The URM04 sensors can be connected in series up to 34 total sensors, so you should be fine there!
As for your other questions regarding communincation, please note the URM04 sensor only uses RS485 as its communication interface. Therefore you will need a bridge to convert RS485 to TTL to communicate with your CPU. However, I did note that the linked communication module does inherently support RS485 protocol. Therefore you will not need to have a separate chip to send commands to the sensors.
Now to communicate with individual sensors relies more on your code architecture more than the hardware. Each sensor can be assigned a unique address, and therefore to poll individual sensors you will send commands to that specific address. Therefore you first should assign 30 unique addresses for the sensors, and then store this information in an array for example. This will allow you to target specific sensors as you please.
Please check out the product wiki and the corresponding user manual to get a full understanding of the URM04 sensor: https://wiki.dfrobot.com/URM04_V2.0__SKU_SEN0002_
http://image.dfrobot.com/image/data/SEN ... ual1.1.pdf
By maria.noronha.costa
#32361
Thank you very much for your reply!
You mentioned using a chip to convert RS485 to TTL to make the sensors communicate directly to the CPU. Is this an alternative to the communication module I linked?
Thank you in advance!
By simoneraineop
#44577
jennifersmi827 wrote:
Thu Mar 12, 2020 4:28 am
URM04 is developed based upon our popular URM37 ultrasonic sensor. The RS485 interface allows a number of sensors working together. Up to 32 URM04 may be connected together in a network my kfc experience My Prepaid Center
The URM04 Ultrasonic sensor is developed based upon our popular URM37 ultrasonic sensor, it is using RS485 interface which allows multiple sensors to be used simultaneously . The RS485 interface allows a number of sensors working together. Up to 32 URM04 may be connected together in a network.

The ultrasonic sensor allows you to determine the exact distance of an obstacle in the sonar field of view. The cleverness of your robot will depend on a sensitive sensor similar to the one bats use to know their position and track prey. With advanced programming, you can design compensators in order to perfectly control your motors according to the obstacle's distance.

NOTE: This sensor REQUIRES a RS485 interface. It can not be connected directly to an Arduino. To make the connection easily we recommend using our Arduino RS485 Shield .



SPECIFICATION
Operating Voltage: +5V
Current: <20mA
Operating Temperature: -10℃~+70℃
Detecting range: 4cm-500cm (1.6in-197in)
Resolution: 1cm (0.4in)
Frequency: 40KHz
Interface: RS485
Units: Range reported in cm
Temperature sensor: 12 bits reading from serial port
Default Device Address: 0x11
Default Device baudrate: 19200
Size: 34x51 mm (1.3x2 in)
Weight: 30g