1
\$\begingroup\$

I want to convert USART signals to RS485 with the circuit below: enter image description here

I log the data on the USART6_TX and 485A/485B at the same time, but the data on the output pins of the MAX485 is wrong and it's not similar to data on USART6_TX. the DE/RE pin of the IC is connected to the GPIO pin of the microcontroller. the microcontroller pulls up the pin while transferring data.

I transmit the data every 3seconds. the picture below is captured from USART6_TX pin and this is the data I expect to see on RS485: (this is in HEX mode)

enter image description here

but I get this on MAX485 output:

enter image description here

  • I use USBtoRS485 converter to log the rs485 data.
  • I've tried some MAX485 ICs to make sure the reason is not the IC itself.
  • my microcontroller is STMH750
  • I use buadrate 9600bps , no parity, 8 data bits, 1 stop bit
  • the output of RS485 stops to work on buadrate 1200bps.

Would you please give me some solutions to find the reason and solve it?

\$\endgroup\$
17
  • 2
    \$\begingroup\$ If you're converting from UART (TTL signal on DI pin) to RS-485, you need to enable the driver. You currently have it disabled -- the DE pin is pulled low. \$\endgroup\$
    – Dave Tweed
    Oct 9, 2022 at 11:34
  • 3
    \$\begingroup\$ You need to add that information to your question, along with a lot more detail about the nature of the errors. It could be many things -- baud rate mismatch, something else driving the RS-485 lines, etc. \$\endgroup\$
    – Dave Tweed
    Oct 9, 2022 at 11:58
  • 3
    \$\begingroup\$ The RO is connected to UART TX. That can't be right, connecting two outputs together. Which means RI and RX are two inputs connected together. \$\endgroup\$
    – Justme
    Oct 9, 2022 at 12:59
  • 2
    \$\begingroup\$ In addition to the A & B pair, do you have a Ground wire connected between your circuit and the RS485-USB converter at your PC? \$\endgroup\$
    – brhans
    Oct 9, 2022 at 13:28
  • 2
    \$\begingroup\$ Your received data looks like you might have the A & B pins reversed. Did you try swapping them over? \$\endgroup\$
    – brhans
    Oct 9, 2022 at 13:32

1 Answer 1

2
\$\begingroup\$

TX and RX is swapped and the floating input receives noise.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.