How to connect RS485 module

I’m trying to use my RS485 module on my MedusaMini.
But I don’t know how to connect it electrically?

It has A, B and gnd.
All other RS485 devices I have, have only RS485+ (TRX+) and RS485- (TRX-)
I have no Gnd connected to my RS485 converter which is connected to my PC RS232.
There are only 2 wires going away from it.
This works well with all my other RS485 devices on the bus.
For testing issues I have only PC and RS485 module connected.

I do not have the actual module, but the electrical specifications defined by the standard are

A is TRX-
B is TRX+
GND is optional

Although ground is optional, in some noisy environments you will need it so I suggest you make it available in any design.

I recently tested a Variable Speed Drive connected to a 45kW motor that has Modbus via RS485 and I was getting lots of errors with it when the motor was running. After I connected the GND, it was solid.

I have connected A to TRX- and B to TRX+
I use a twisted pair cable, length about 1 meter.
I have added a 120 Ohm resistor to both ends.

I open the serial port on Medusa with the same parameters as on PC:
9600 8E1

When I send a 8 byte message from PC to Medusa, I get an 4 to 16 byte long response. even that there is currently no code that is reading or sending bytes on Medusa!
The response data contains mostly 0x3f 0x7f and 0xff, but it’s not the same data all the time and it’s not related to what I send.

I also noticed that the RXD LED on my RS232/485 converter on PC side is always on, when Medusa is connected. When I disconnect RS485 module from Medusa (RS485 module is still powered) then the LED goes off.
The USB serial module is disconnected all the time, and the Medusa is rebooted before test.

I also used a different RS485 module with same results.
I assume that medusa is ok, because programming with USB Serial module works without any problems.

Any help here is appreciated.

Are you disconnecting the medusa from the USB PC programming? I read somewhere here that medusa has only one serial for both deployment and for other module and only one can be used at a time.

basically one U type module connected at a time,

@ Jay Jay - Yes, I always have only one serial module connected.

But I found the problem:
I removed everything from the Medusa and code except of serial communication and tried to get it working with USB serial SP module.
As soon as it was working I reconnected RS485 to test it.
So I found out that in fact:
Pin A = TXR+
Pin B = TXR -
@ taylorza sorry, you where wrong.

I tried this before, but it instantly resetted the board.
The reason for this was some code which was executed after it received a message, so my fault. :whistle:

Currently I do not use the RS485 module driver, but accessing RS485 module directly via HardwareSerial Serial. But the driver should work same same.

The good thing is that I now know how to deploy and test communication without exchanging SUB serial with RS485 module.
When using a point to point connection there is no difference if I use one or the other module, so when I disable the serial monitor (which I can’t use anyway) and use same com port on PC as on module I’m fine.
Only if I want to add more devices to the bus I need to switch again.

Are you sure, I think what was said was that this is what the connections are on the module end; perhaps you need to do + and - at opposite ends (like UART dyslexia for simple UARTs)?

Unfortunately in this case, this just means that the module does not follow the RS485 specification labeling where A is the inverted signal and B is the non-inverted signal. This is actually common for RS485 chips, but [em]normally[/em] the devices will follow the specification or just label -/+ to avoid the confusion.

The labeling come directly from the chip.please see the schematics.

I don’t think RS485 needs to be crossed because its a bus and not an ptp connection.