1

I have a communication problem with RS485 that I am not sure which component or thing is problematic. I will define some cases, which some works and others not.

I have four different components,

  1. USB - RS 232 Converter
  2. RS232 - RS485 Converter(1)
  3. RS232 - RS485 Converter(2)
  4. USB - RS485
  5. Raspberry
  6. Ubuntu Computer
  7. Specific Hardware gets direct RS485

My test cases are like fallowing (I will indicate components like C5, which means Raspberry)(I am using the first component as input point, and using minicom),

  1. (C5 - C1 - C2 - C4 - C6)(Baud: 115200) Working
  2. (C6 - C1 - C2 - C4 - C5)(Baud: 115200) Working
  3. (C5 - C4 - C2 - C1 - C6)(Baud: 115200) Working with no hard flow
  4. (C6 - C4 - C2 - C1 - C5)(Baud: 115200) Working with no hard flow

They seams working but here is the tricky part

  1. (C6 - C4 - C7)(Baud: 115200) Not working
  2. (C5 - C4 - C7)(Baud: 115200) Not working

  3. (C6 - C1 - C2 - C7)(Baud: 115200) Not working

  4. (C5 - C1 - C2 - C7)(Baud: 115200) Not working

  5. (C6 - C1 - C3 - C7)(Baud: 115200) Working

  6. (C5 - C1 - C3 - C7)(Baud: 115200) Working

  7. (C5 - C1 - C3 - C4 - C6)(Baud: 115200) Working

  8. (C6 - C1 - C3 - C4 - C5)(Baud: 115200) Working

My problem is that my C2 and C4 are working correctly with each other but not working with C7 at all. But C3 works with everyone, who is the problematic one? Which one I need to change or examine. I am happy to answer any problems to fix this problem. Sorry for my explanation type. I could not find a better way to express this case.

HVK
  • 23
  • 7

1 Answers1

0

You have wiring issues.

Bottom line: all RS232 ports should (and are) able to talk to each other. Same for RS485.

You should verify the pinout of each adaptor. Since they all use the same DB-9 connector for both sides (232 and 485) and you are combining three of them, it becomes very confusing.

For RS485 just take every pair of devices one by one and make sure you are wiring correctly DATA + on one side to DATA + on the other, same for DATA - and both GNDs together (and do not tie any other cables: +5V or +12 or whatever).

For RS232 just wire both GNDs together, TX on one side to RX on the other and vice versa. You will need more connections only if you use hardware flow control, so I would not use that for a first test.

Having said that, I will quote myself verbatim:

There are some nuances to the general R485 universal compatibility stated above, like bus biasing or impedance (related to the terminating resistors) that can be sometimes (mostly when you have to cover long distances or you are in a noisy industrial environment) a headache but you should always be able to solve those given enough time, patience and ingenuity.

I guess you have all devices nearby so the above should not apply to your case. If after reviewing the wiring and pinouts you still have trouble with some combinations, it might be a good idea to use a scope to tap into the bus and see what's really going on. Or, if you have access to it, an even better tool.

Marcos G.
  • 3,371
  • 2
  • 8
  • 16
  • You were right. The pinout of the RS232 to RS485 converter is different. Both C2 and C4 have different D+ and D- configuration than the C3. But my question is how it is possible. Isn't RS485 a standard thing, how there are different converters for the same communication protocol. – HVK Oct 25 '19 at 14:10
  • Great, that makes sense indeed. And to answer your question: no, unlike RS232, RS485 does not mandate any specific connector or pinout (refer to [Wikipedia](https://en.m.wikipedia.org/wiki/RS-485), connector type), you have to be very careful as you have realized. What is standard is the electrical levels on the bus, and other electrical and signaling details. – Marcos G. Oct 25 '19 at 18:23