RS485 hardware problem

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!
I'm designing a RS485 bus with the MAX3485 chip (half duplex) and I'm having a problem in sending message packets to other nodes in the bus.
After some debugging I came across this:
A MAX3485 powered by 3.3V that is not connected to the bus and has /RE=0 (read is enabled) has 0V in the RO pin, which I think is the right value since it's not receiving any data. The bus lines D+ and D- have a 100 ohm load resistor. If I remove this resistor, RO changes to +3.3V.
On the other hand, another different board but with the same microcontroller and the same MAX3485, in the same conditions: no load and /RE=0, has RO at +3.3V, no matter if there is the 100 ohm resistor or not.
I guess this is the reason why I'm getting problems in the communication.
Do you have any clue about what's happening?
Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Do you have any clue about what's happening?

Maybe lack of bias resistors on A/B (D+/D-).
Try connecting 560 Ohm resistors, (pull-down to GND for D- and pull-up to Vcc for D+.
This should only be connected at one place in the bus.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RO should idle high when no data is being sent/received. The max chip should idle high when there is no one driving the bus but using bias resistors is a good idea. Officially, there should be at least 200mv between A/B for a logic 1 on the bus.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

/RE=0 (read is enabled) has 0V in the RO pin, which I think is the right value since it's not receiving any data.

No, it should be floating high. If it is low, your load resistor is creating UART logic '1' bits.

As mentioned, fairly strong bias resistors are needed.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, I'll try with biasing resistors!

In attachment I'm sending a rough drawing of the voltage across D+ and D- pins.
Part A is when Master is sending data. Part B is when the Slave is trying to send something but the Master isn't getting anything.
I find it strange to have the B waveform.
This situation doesn't happen all the time, i.e., if I remove the cable and mount it again the other day, it will not happen.
Would it be caused by not having the biasing resistors?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Would it be caused by not having the biasing resistors?

Give it a try?
Resistor values are not "critical".
Probably will work with 1K resistors as well.
As others have explained RO must idle high, if not how do you possibly detect the start bit which is "0"?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've tried with 240R bias resistors (3.3V and 100R load resistor -> 0.3V default) and it did put the RO back to +3.3V, which is as it should have been.
But regarding the image above, what would be the cause of situation B?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like the 0V for both devices is not connected together.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

But regarding the image above, what would be the cause of situation B?

240 ohms is pretty stiff. Especially if you are using modern "low-power" RS485 transceivers. What transceivers are being used? How much power do you want to consume on a continuous basis?

One of my old bosses had a saying: "RS-232 stands for 2 wires connected 32 different ways." By extension, RS-485 is 4 wires connected 85 different ways. As a differential signal it is pretty tolerant of stuff. Often it will kinda sorta work, and investigation reveals crossed wires or missing ground as mentioned.

Another not uncommon situation especially on lashups and first prototypes and the like is to blow one side of a transceiver. That is what your picture looks like. (Been there, done that.) Note that it may still "work" under normal conditions but may more easily fail during e.g. noise.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman:
No, GND is connected between both devices.

theush:
I'm using MAX3485ESA drivers.
I think you might be right. I've had the same problem in 2 or 3 boards and when I replaced them, the problem was gone. But at that time I thought it was from the cable or the termination resistor.
Thinking the chip might be blown, could it be due to electrostatic discharges (ESD)?
Cables are handled by hand and this is very possible situation.
Maybe I should use the MAX3485EESA version, which has +-15kV ESD-protection?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
No, GND is connected between both devices.

It should be.

EDIT: Sorry, didn't see the coma :oops:

Scattered showers my arse -- Noah, 2348BC.
Rob Gray, old fart, nature photographer, embedded hardware/software designer, and serial motorhome builder, www.robgray.com