<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmod_RPI_RS485_X2</id>
	<title>KAmod RPI RS485 X2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmod_RPI_RS485_X2"/>
	<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmod_RPI_RS485_X2&amp;action=history"/>
	<updated>2026-04-05T14:35:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.kamamilabs.com/index.php?title=KAmod_RPI_RS485_X2&amp;diff=7384&amp;oldid=prev</id>
		<title>Grzegorzbecker: Created page with &quot;__jzpdf__ ==== Description ====  &lt;b&gt;KAmod RPI RS485 X2 - Dual RS485 Interface Module for Raspberry Pi&lt;/b&gt;&lt;br&gt;  KAmod RPI RS485 X2 allows for easy expansion of Raspberry Pi 5 minicomputers with two RS485 interfaces. The interfaces include extensive protection circuits and are galvanically isolated from the control circuits, which guarantees operational stability and resistance to interference and failures. The module is designed to be compatible with the Raspberry Pi seri...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmod_RPI_RS485_X2&amp;diff=7384&amp;oldid=prev"/>
		<updated>2026-04-04T12:53:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__jzpdf__ ==== Description ====  &amp;lt;b&amp;gt;KAmod RPI RS485 X2 - Dual RS485 Interface Module for Raspberry Pi&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;  KAmod RPI RS485 X2 allows for easy expansion of Raspberry Pi 5 minicomputers with two RS485 interfaces. The interfaces include extensive protection circuits and are galvanically isolated from the control circuits, which guarantees operational stability and resistance to interference and failures. The module is designed to be compatible with the Raspberry Pi seri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__jzpdf__&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;KAmod RPI RS485 X2 - Dual RS485 Interface Module for Raspberry Pi&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
KAmod RPI RS485 X2 allows for easy expansion of Raspberry Pi 5 minicomputers with two RS485 interfaces. The interfaces include extensive protection circuits and are galvanically isolated from the control circuits, which guarantees operational stability and resistance to interference and failures. The module is designed to be compatible with the Raspberry Pi series boards, not just version 5. It is controlled via the SPI interface available on the 40-pin RPi GPIO connector, as well as on many other boards, e.g., Arduino, STM32, etc.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI-RS485-X2_2.jpg|700px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Basic Parameters ====&lt;br /&gt;
* 2 RS485 interfaces controlled by the SC16IS762 controller (SPI→2xUART)&lt;br /&gt;
* RS485 interfaces equipped with ST485 type transceivers&lt;br /&gt;
* RS485 interfaces are galvanically isolated from control circuits&lt;br /&gt;
* Possibility to connect 120 Ω termination resistors to each interface line&lt;br /&gt;
* Maximum communication speed of RS485 interfaces: 500 kbps&lt;br /&gt;
* Controlled via SPI interface operating at 3.3 V&lt;br /&gt;
* Automatic transmission direction control for RS485 transceivers&lt;br /&gt;
* 5 V / 0.2 A power supply taken from the Raspberry Pi board or an additional source&lt;br /&gt;
* Easy mounting on Raspberry Pi 5, also in the version with the RPi Active Cooler heatsink&lt;br /&gt;
* Module dimensions: 65x56 mm, height approx. 15 mm (plus connector under the board with a height of approx. 13 mm)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Standard Equipment ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Code&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;KAmod RPI RS485 X2&lt;br /&gt;
&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;| &lt;br /&gt;
Assembled and tested module&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;Mounting Kit&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;| &lt;br /&gt;
Set of screws and spacers for attaching the HAT to the Raspberry Pi board&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI-RS485-X2_1.jpg|700px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Block Diagram ==== &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_blokowy.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Electrical Schematic ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_sch.png|none|900px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== RS485 Interfaces ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Interface&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;width: 200px; background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Element&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Function&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot;; style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;RS485-1&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&lt;br /&gt;
&amp;lt;b&amp;gt;R1J3&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Phoenix MC 3.81 mm connector&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|Main RS485-1 bus connector,&amp;lt;br&amp;gt;&lt;br /&gt;
pin 1 – GND&amp;lt;br&amp;gt;&lt;br /&gt;
pin 2 – B(-)&amp;lt;br&amp;gt;&lt;br /&gt;
pin 3 – A(+)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;R1J4&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;3x1 goldpin header, 2.54 mm&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|Additional RS485-1 bus connector,&amp;lt;br&amp;gt;&lt;br /&gt;
pin 1 – GND&amp;lt;br&amp;gt;&lt;br /&gt;
pin 2 – B(-)&amp;lt;br&amp;gt;&lt;br /&gt;
pin 3 – A(+)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;R1J2&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3x1 goldpin pins, 2.54 mm&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|Connects a 120 Ω termination resistor to the RS485-1 bus lines &amp;lt;br&amp;gt;when the jumper is placed on pins 2-3&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot;; style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;RS485-2&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;R2J3&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Phoenix MC 3.81 mm connector&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|Main RS485-2 bus connector,&amp;lt;br&amp;gt;&lt;br /&gt;
pin 1 – GND&amp;lt;br&amp;gt;&lt;br /&gt;
pin 2 – B(-)&amp;lt;br&amp;gt;&lt;br /&gt;
pin 3 – A(+)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;R2J4&amp;lt;/b&amp;gt;&lt;br /&gt;
3x1 goldpin header, 2.54 mm&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|Additional RS485-2 bus connector,&amp;lt;br&amp;gt;&lt;br /&gt;
pin 1 – GND&amp;lt;br&amp;gt;&lt;br /&gt;
pin 2 – B(-)&amp;lt;br&amp;gt;&lt;br /&gt;
pin 3 – A(+)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;R2J2&amp;lt;/b&amp;gt;&lt;br /&gt;
3x1 goldpin pins, 2.54 mm&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|Connects a 120 Ω termination resistor to the RS485-2 bus lines &amp;lt;br&amp;gt;when the jumper is placed on pins 2-3&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_2.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The RS485 interfaces are controlled by ST485 type transceivers with galvanically isolated control signals. The bus lines are marked as: A(+), B(-), and GND ground, and are available on the Phoenix MC type connector (R1J3, R2J3) and on standard 2.54 mm goldpin pins (R1J4, R2J4). Their layout is shown in the figure and described on the bottom side of the module board. The RS485 bus lines are equipped with overvoltage protection circuits.&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, placing a jumper on pins 2-3 of RxJ2 connects a 120 Ω termination resistor between lines A and B of the respective interface.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== RS485 Interface Control ====&lt;br /&gt;
The RS485 interfaces are implemented via the SC16IS762 controller, a detailed description of which is available in the manufacturer&amp;#039;s documentation. The controller is driven via the SPI interface (MISO, MOSI, SCLK, CE) and additionally generates an IRQ interrupt signal. The operating mode of the RS485 transceivers can be controlled by the EN CH1 and EN CH2 signals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Control Signal&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Function&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Default Connection&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Optional Connection (*)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;MOSI&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|SPI data input for SC16IS762 controller&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO10 - MOSI0 &amp;lt;br&amp;gt;pin 19, JP2&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO20 - MOSI1&amp;lt;br&amp;gt;pin 38, JP5&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;MISO&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|SPI data output for SC16IS762 controller&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO09 - MISO&amp;lt;br&amp;gt;pin 21, JP1&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO19 - MISO1&amp;lt;br&amp;gt;pin 35, JP4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;SCLK&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|SPI clock signal input for SC16IS762 controller&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO11 - SCLK0&amp;lt;br&amp;gt;pin 23, JP3&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO21 - SCLK1&amp;lt;br&amp;gt;pin 40, JP6&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;CE&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|SPI chip enable input for SC16IS762 controller&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO08 - CE0&amp;lt;br&amp;gt;pin 24, JP7&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO18&amp;lt;br&amp;gt;pin 12, JP9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;IRQ&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|IRQ interrupt output from SC16IS762 controller&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO25&amp;lt;br&amp;gt;pin 22, JP8&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO24&amp;lt;br&amp;gt;pin 18, JP10&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;EN CH1&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|Signal switching RS485-1 transceiver from receive mode (L) to transmit mode (H)&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO04&amp;lt;br&amp;gt;pin 7, JP12&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|GPIO27&amp;lt;br&amp;gt;pin 13, JP11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;EN CH2&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|Signal switching RS485-2 transceiver from receive mode (L) to transmit mode (H)&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO17&amp;lt;br&amp;gt;pin 11, JP16&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|GPIO22&amp;lt;br&amp;gt;pin 15, JP15&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_3.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All control signals are routed to the J2 connector (40-pin, compatible with Raspberry Pi boards). The default connection redirects control signals to the SPI-0 interface pins of the Raspberry Pi. In addition to the default connection, each signal can be redirected to an optional connection (SPI-1 interface signals of Raspberry Pi boards) by changing the connections on the SMD jumpers JP1…JP18. To change the connection configuration, cut the connection between the pads of one jumper and use a drop of solder to connect the pads of the other jumper for a given signal. The default and optional connection configurations are described in the table and on the bottom side of the board. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, control signals are routed to the J1 connector. Their arrangement is shown in the figure and described on the bottom side of the KAmod RPI RS485 X2 board.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_4.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Power Supply ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Element&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Function&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;J1 Connector&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|5 V power can be supplied to the J1 connector while maintaining correct polarity.&amp;lt;br&amp;gt;&lt;br /&gt;
The power lines are common for both J1 and J2 connectors, so care must be taken not to interfere with the base board operation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;J2 Connector&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|Power for the KAmod RPI RS485 X2 module is taken from the base board via the J2 connector. It is compatible with the Raspberry Pi 40-pin GPIO standard and features 5 V power lines.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;D1 Diode&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|Glowing D1 LED indicates the presence of power&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The arrangement of connectors and the signaling diode is shown in the figure.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_5.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Signaling Indicators ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Indicator&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Function&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;PWR &amp;lt;br&amp;gt;(D1)&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|Glowing D1 LED indicates the presence of power&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;RX &amp;lt;br&amp;gt;(D3, D6)&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|Flashing LED indicates receiving data from the RS485 bus&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;EN &amp;lt;br&amp;gt;(D4, D7)&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|Glowing or flashing LED indicates the RS485 transceiver is set to transmit mode; if the LED is off, the transceiver is in receive mode &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;TX &amp;lt;br&amp;gt;(D2, D5)&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|Flashing LED indicates transmitting data to the RS485 bus &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The power signaling LED is common for both interfaces, while the communication signaling LEDs are assigned to each RS485 interface separately.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_6.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== RS485 Operating Mode Configuration ====&lt;br /&gt;
The RS485 transceivers require a control signal to activate transmit mode. This control signal can be derived from the data signal sent to the bus (TXD), or it can be supplied independently – via the RTS line or a signal from the GPIO connector. The KAmod RPI RS485 X2 module allows selecting one of these options for each RS485-1 and RS485-2 interface. The available modes and jumper settings are described in the table.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 300px; background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Operating Mode&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;background-color:#99ccff;text-align: center;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;Automatic Control (default)&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
R1J1 - jumper in ON position,&amp;lt;br&amp;gt;J14 - shorted&amp;lt;br&amp;gt;&lt;br /&gt;
R2J1 - jumper in ON position,&amp;lt;br&amp;gt;J18 - shorted&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|The control signal activating transmit mode is derived from the data signal sent to the bus - TXD&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;Automatic Control&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
R1J1 - jumper in ON position,&amp;lt;br&amp;gt;J13 - shorted&amp;lt;br&amp;gt;&lt;br /&gt;
R2J1 - jumper in ON position,&amp;lt;br&amp;gt;J17 - shorted&lt;br /&gt;
(J14 and J18 cut)&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|The control signal activating transmit mode is connected to the RTS output of the SC16IS762 chip. The controlling application is responsible for the RTS output state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;GPIO Control&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
R1J1 - jumper in OFF position,&amp;lt;br&amp;gt;JP12 - shorted&amp;lt;br&amp;gt;&lt;br /&gt;
R2J1 - jumper in OFF position,&amp;lt;br&amp;gt;JP16 - shorted&lt;br /&gt;
| style=&amp;quot;background-color:#e3f2fd;text-align: left;&amp;quot;|Glowing or flashing LED indicates the RS485 transceiver is set to transmit mode; if the LED is off, the transceiver is in receive mode &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;GPIO Control &amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
R1J1 - jumper in OFF position,&amp;lt;br&amp;gt;JP11 - shorted&amp;lt;br&amp;gt;&lt;br /&gt;
R2J1 - jumper in OFF position,&amp;lt;br&amp;gt;JP15 - shorted (J12 and J16 cut)&lt;br /&gt;
| style=&amp;quot;background-color:#e0f2f1;text-align: left;&amp;quot;|The control signal activating transmit mode is connected to GPIO27 (pin 13, CH1) and GPIO22 (pin 15, CH2).&amp;lt;br&amp;gt;&lt;br /&gt;
The controlling application is responsible for the GPIO output states.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In the case of GPIO control, the selected control lines (GPIO04, GPIO17, GPIO22, GPIO27) should have a current capacity of up to 5 mA, as they will drive optocouplers.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The active state on the transceiver control inputs is signaled by the glowing of LEDs D7 and D4.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_7.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_8.jpg|none|680px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dimensions ====&lt;br /&gt;
The dimensions of the KAmod RPI RS485 X2 board are 65x56 mm, and it is compatible with Raspberry Pi type base boards. The board height is approx. 15 mm; additionally, the connector on the bottom side of the board fitting the base board has a height of approx. 13 mm.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_9.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Startup ====&lt;br /&gt;
Start the Raspberry Pi 5 with the operating system installed on a memory card or other medium. Once the desktop appears, open a console window (Terminal), e.g., using the Ctrl+Alt+T key combination, and type:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /boot/firmware/config.txt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
(in earlier versions of the OS, the config.txt file was located directly in the /boot directory)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In the file that opens, uncomment (remove the # sign) the line:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;dtparam=spi=on&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If such a line does not exist, it should be added.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_9_1.png|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Next, at the end of the file (scroll down with arrow keys), add the line:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;dtoverlay=sc16is752-spi0,int_pin=25&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_4_10.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Save changes using Ctrl+O, close the editor with Ctrl+X, and restart the system, e.g., by typing:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;sudo reboot&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After the desktop reappears, open the Terminal and type:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;sudo dmesg | grep -i spi&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If the previous steps were performed correctly, the following summary should appear:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_RPI_RS485_X2_9_12.png|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that the SC16IS762 controller has been correctly installed in the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
RS485 interfaces can be tested using the minicom program. For RS485-1, type:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;minicom -D /dev/ttySC0&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For RS485-2, type:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: &amp;#039;Courier New&amp;#039;, monospace&amp;quot;&amp;gt;minicom -D /dev/ttySC1&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The minicom program allows sending characters typed from the keyboard and displays characters received by the selected RS485 interface. During interface activity, LEDs D2…D7 will flash, but at high transmission speeds (e.g., 115200), the LED flashing will be barely noticeable.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Module Installation on the Raspberry Pi Connector ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI-RS485-X2_3.jpg|none|700px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
*[https://wiki.kamamilabs.com/images/c/cb/SC16IS752_SC16IS762.pdf SC16IS762 datasheet]&lt;br /&gt;
*[https://wiki.kamamilabs.com/images/d/d3/St485.pdf ST485 datasheet]&lt;br /&gt;
*[https://wiki.kamamilabs.com/images/7/78/KAmod_RPi-RS485-X2_3d.zip CAD Model (STEP)]&lt;/div&gt;</summary>
		<author><name>Grzegorzbecker</name></author>
	</entry>
</feed>