RS485 coms guidance

Before heading out on a new journey, could someone with knowledge point me in the right direction on using the IO Expansion Shield For Arduino V5 SKU DFR0088 or in my case an equivalent shield by Funduino connected to the ARDUINO-UNO? I first successfully established coms with my Mac using XOJO an Ops program to send out commands to the UNO with an FT232RL 3.3V 5.5V FTDI USB to TTL Serial Adapter to take temp reading and control a stepper motor. I am wanting to switch to 485 coms using a DTECH USB to RS422 RS485 Serial Port Adapter and IO_Expansion_Shield_For_Arduino_V5___SKU__DFR0088_-DFRobot but am confused about protocols. Do I need Modbus to accomplish this or can I stick with simple ASCII strings? I do not know if the expansion shield has jumper requirements to be a slave. I'm rather new to the IDE so would there be code requirements to set the shield to receive data? I have been looking at examples but most seem to be related to connecting two Arduino MKR 485 Shields or a shield to a monitoring device. In my case, I want to control from a home automation program on a Mac a remote stepper-controlled mixing valve and take some temp readings.

Modbus is not mandatory. Modbus RTU is a protocol on top of RS485.
You can define your own protocoll using plain ASCII data.
However, I like Modbus because it is a well documented de facto standard and I have not to reinvent the wheel.
But for first communication tests, just send plain ASCII between your devices.
I suggest you start with a simple pass through sketch: receive data on Soft Serial port from your RS485 lines and print it to HW-Serial.

Hello cliffcoulter
The RS485 specification specifies the physical characteristics of the interface only . The logical characteristics depend on the implemented protocol.
Have a nice day and enjoy coding in C++.

Could you please explain soft serial port?
Thanks

For usual on an Uno you would use SoftSerial on any pins to gain a second serial port on the Uno.
This would enable you to use Hardware Serial for debugging and Soft-Serial to communicate with the bus.

Now I see that your shield hardwires the RS485 with the Pin 0 and Pin1. This means you must use HW-Serial to communicate with the bus. This will make debugging very complicated.

Start with the sketches on the product homepage and see if your setup is working.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.