mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Raspberry Pi and RS-485

Tue Jan 15, 2019 8:48 am

Hi, could someone suggest me a i2c / spi to 485 interface, well supported by Raspberry pi, that has personally tested?
I need something that calculates the direction (enable) signal automatically.
www. ???
www. ???
GMT+1
Skype: mrdebug

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13092
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi and RS-485

Tue Jan 15, 2019 12:58 pm

RS-485 is a balanced serial signal, with point to multi-point capabilities. The bus master should determine the direction of the transfers.
A PI can be a master using the USART for the serial I/O and a GPIO for bus direction.

https://en.wikipedia.org/wiki/RS-485

there is no system that "calculates" the bus direction AFAIK.

mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Re: Raspberry Pi and RS-485

Tue Jan 15, 2019 1:11 pm

No, I can't use gpio.
Do you have experience with max13487eesa+?
www. ???
www. ???
GMT+1
Skype: mrdebug

danjperron
Posts: 3502
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Raspberry Pi and RS-485

Tue Jan 15, 2019 4:51 pm

I made a lot of testing using the RS-485 with different methods.

Why I2c or SPI?

The simplest way is USB. They are so cheap that is not worth re-invent them.
https://www.dx.com/p/usb-to-rs485-adapt ... en-2039807

I even made a small cpu to take care of the switching. https://github.com/danjperron/RS485switch

Have a look at those posts.
viewtopic.php?f=98&t=224533&hilit=rs+485#p1383709
viewtopic.php?f=44&t=75189&hilit=rs+485#p563861

Return to “General discussion”