Look for in our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria
Raspberry Pi 3 B+ with MAX485 module
In this post will be shown how to communicate a Raspberry Pi 3 B+ with an M-Duino by RS485 using a MAX 485 module.
On-board MAX485 chip is a low-power and slew-rate-limited transceiver used for RS485 communication. Adopting half-duplex communication to implement the function of converting TTL level info into RS485 level, it can achieve a maximum transmission rate of 2.5 Mbps.
Dependig on RE and DE connection the module works as receiver or transmitter. Connected to VCC transmits data and connected to GND receives data.
It is a cheap module. You can find lots of 5 unit for less than one euro.
Raspberry Pi 3 B+ Pinout
Raspberry Pi to MAX485
|Raspberry Pi 3 B+ Pins||MAX485 Module Pins|
Digital pins GPIO17/27 used to establish the communication type. Receiver or transmitter mode.
MAX485 to M-Duino/Ardbox
|MAX485 Module Pins||M-Duino / Ardbox Pin|
In this code example we send a character from the PLC to the Raspberry, print it, and answer to the PLC with the same character, that is an "echo". Note that in case of receive data, pin 17 and 27 are disable and enable in case of transmit data.