16 Bit Magnetic Guide Sensor with Modbus RTU Communication Protocol connected to arduino mega trough RS485 to TTL Converter

I think some basics would help.

I assume that as you are using Serial1, that you have a MEGA2560 Arduino board.

The manual says the default baud rate is 9600 baud. You should set Serial1 to this baud rate.

The RS485 link is half duplex - i.e. only 1 device can transmit on the bus at once. You control this aspect using the RE and DE signals on the RS485 module via a couple of discrete outputs.

Can you provide a drawing of how you have connected the various pieces together. A hand drawn sketch will do.

Also search the forum for "NPK sensor". It's a soil sensor that also uses RS485 and the modbus protocol. Look at how the comms works and how RE and DE are controlled during transmission.

1 Like