Go Down

Topic: UART to RS485 half duplex (Read 3 times) previous topic - next topic

Jose Francisco

Hello.

How can I connect one uart (arduino or raspberry pi) to a RS485 half duplex network.
The protocol will be MODBUS (only one device communicating at the same time)
The main problem is how to control DE/RE pin to switch between receiver and transmitter.
In this case, I haven't got any control signal: only tx, rx and gnd.
Well, I'm thinking about 3 options:


  • Using one arduino to get data with one serial port and resend data with other serial port, enabling or disabling DE/RE. This option seems to be "expensive"

  • Using a 555 timer to control a delayed signal to DE/RE. As seen in http://www.lvr.com/rs-485_circuits.htm

  • Using a MAX13487E/MAX13488E transceiver with auto direction. Is there a 3v3 version of this chip?



Have you got any experience in this way?

Thanks a lot.

Nick Gammon

See this:

http://www.gammon.com.au/forum/?id=11428

You connect Rx/Tx to the appropriate pins of the RS485 chip, and enable/disable DE as required.

I don't know about MODBUS, that goes outside the scope of that article.

oric_dan

Hi Nick, I understand your rationale for using the 680R's on A,B as you show, but that's not quite the same termination
as the d/s for the LTC1480 shows. I would think the 120R would quench the noise even on a floating line.

Graynomad

IIRC Nick's resistors are for fail safe termination, a different issue to the normal 120R termination.

Re the line turn around, you should be able to hang some code off the TX Complete Interrupt to do that.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

oric_dan

#4
Jan 14, 2013, 07:55 pm Last Edit: Jan 15, 2013, 12:18 am by oric_dan(333) Reason: 1

IIRC Nick's resistors are for fail safe termination, a different issue to the normal 120R termination.


Understood, but I'm not so sure that matters if you have the 120R across the A,B lines
and all the outputs are turned off. I would have thought the manufacturer would
recommend Nick's scheme if that were an issue. This is just a query, not a debate.

Go Up