I'm trying to spec out a project and get a shopping list together and am hoping to get some advice which parts to buy. The Pi will serve as the master and connect to a few arduino's at first, but I'd like to plan for this to scale to the full 32 slave devices at a later date. The idea would be to use the Pi as a common network interface and persistent data storage for the Arduino's without having to fit each individual arduino with their own network and storage modules.

I'm somewhat confused between the MAX485 and MAX13487 modules. Watching some videos it seems to me like the MAX485 modules can only act as either receiver or transceiver, but not both. Is that the case or am I mistaken? Or other differences besides that?

I've also found a few Pi specific RS485 boards(hats) but they all seem to use the Pi's SPI interface to talk to the onboard RS485 chip, which is sort of deterring me from those options because all online guides and secondary reading seem to rely on UART communication. Is this a downside or is SPI more appropriate on the Pi side of the communication? Just seems odd.

The MAX485 modules seem like the most inexpensive option, and if they can in fact do both transmit and receive I'd like to build the whole thing with those. But both the Pi and the Arduino's will need to do both.

Any and all input is appreciated, thanks!

  • \$\begingroup\$ Basically you are asking what to buy. But transceiver means it can transmit and receive. Is this what you need to know? You are also wrong on how the Pi hat works, did you read the product description? \$\endgroup\$
    – Justme
    Oct 1, 2022 at 18:56
  • \$\begingroup\$ Well no, I'm not directly asking what to buy. I don't have a deep enough understanding of the RS485 standard to differentiate these modules. So I'm asking for the information to help me differentiate so that I can pick what to buy on my own, not just be told which one to buy with out knowing why. Like why the 485 module gets you 5 units for the price of one MX13487? Both are labeled as transceivers but the guides I've read on the MX485 show people setting it as receiver or transmitter, so I'd like clarification. \$\endgroup\$
    – AustinFoss
    Oct 3, 2022 at 21:12

1 Answer 1

  1. Difference between MAX485 and MAX13487:

A half duplex RS485 transciever can receive and transmit data but just not at the same time: it has a pins RE /DE ( receive enable / data enable) that need to be toggled high or low to allow transmitting or receiving data. see image (sorry something is off and uploading the image fails...)

The key difference between the two ICs that you listed is that for the MAX485, you need to handle the toggling of these pins manually (in SW), whereas in the MAX13487 the chip can automatically detect the direction of the transmission and deal with toggling these pins internally. It's especially useful if you are running out of pins or space on your board.

  1. Why SPI to RS485 for the Pi?

I am not sure there's a deeper reason to use the SPI on the PI vs other serial interfaces to get RS485 working on a Raspberry Pi.My guess the popularity of SPI to RS485 modules for the Pi is more of a market driven/popularity thing rather than a technical constraint. My guess is that the SPI but is practical for the Pi since you can have other devices on it whereas there's a limited number of UART devices you can have on limited UART interfaces. I've used both SPI and UART to RS485 with Raspberry Pis on custom HATs before and never came across a significant drawback to either.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.