Electronic – Wrong output using SN75HVD10 (RS485)

modbusrs485stm32

Designing a modbus master using a STM32F030CCT6 and a SN75HVD10 (3.3V).

This is the schematic
Schematic

When i send the following message from the UART:
01 03 00 00 00 06 c5 c8

I see the following scopes (top is A, and the bottom is B).
Sent using SN75HVD10

However when sending the same message using a Raspberry PI (5V) and a RS-485 converter cable the following scopes can be seen:
Sent using Raspberry PI

As you can see, the channels here are reversed. Whats on A using SN75HVD10 is on B using RPi. So i thought to myself, ok, lets switch the cables. But then the microcontroller stops responding and no traces can be seen on the scope.

What can be done do change the "channels".
Also, why is not the signal going down to 0V?

Best Answer

Unfortunately this is common. RS485 and Modbus standards define the A and B the other way than your tranceiver, and many other tranceivers as well.

So, your schematic must flip A and B somewhere. As Modbus B - tranceiver A should have pull-up, and Modbus A - tranceiver B should have pull-down, the resistors are correct respective to the tranceiver, so only swap Modbus A and B.

The tranceiver also has internal pull-down on B pin, which matches that of Modbus A being pulled down.

So this can't be solved by just inverting the UART data.

You must also share same ground reference between your devices. If they share ground via power supplies or other ground pins, that is fine, but if they are isolated from each other, then you need a ground wire between RS485 device.