KAmodRPi CAN RS485 HAT: Difference between revisions
From Kamamilabs.com - Wiki
No edit summary |
No edit summary |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
__jzpdf__ | __jzpdf__ | ||
====== Description ====== | ====== Description ====== | ||
[https://kamami.pl/en/moduly-rozszerzajace-do-raspberry-pi/581674-nakladka-do-raspberry-pi-z-can-oraz-rs485.html KAmodRPi RS485 CAN HAT] is an extension for the Raspberry Pi computer extending its interfaces with RS485 and CAN. The board is equipped with MCP2515 and MCP2551 systems to support the CAN bus, while the conversion of the signal to the levels corresponding to the RS485 bus is the ST3485 system. It allows communication of Raspberry computers with buses used, for example, in automation and vehicles. | [https://kamami.pl/en/moduly-rozszerzajace-do-raspberry-pi/581674-nakladka-do-raspberry-pi-z-can-oraz-rs485.html KAmodRPi RS485 CAN HAT] is an extension for the Raspberry Pi computer extending its interfaces with RS485 and CAN. The board is equipped with MCP2515 and MCP2551 systems to support the CAN bus, while the conversion of the signal to the levels corresponding to the RS485 bus is the ST3485 system. It allows communication of Raspberry computers with buses used, for example, in automation and vehicles. | ||
Line 17: | Line 18: | ||
** Automatic detection of transmission direction (direction control possible after two resistors are soldered) | ** Automatic detection of transmission direction (direction control possible after two resistors are soldered) | ||
* Signals on the goldpin connectors and terminal strips | * Signals on the goldpin connectors and terminal strips | ||
* | * Additional 2,54mm connector, allowing for work with computers like Arduino | ||
* Built-in jumpers for connecting 120 Ohm terminating resistors | * Built-in jumpers for connecting 120 Ohm terminating resistors | ||
* Dimensions: 65mm x 30mm x 20mm | * Dimensions: 65mm x 30mm x 20mm | ||
Line 31: | Line 32: | ||
| style="text-align: left;"| | | style="text-align: left;"| | ||
* Assembled and running module | * Assembled and running module | ||
|- | |||
| style="text-align: center;"|4 x Spacer sleeve <p></p>8 x Mounting screw | |||
| style="text-align: left;"| | |||
*Kit for screwing the hat to the Raspberry board | |||
|} | |} | ||
</center> | </center> | ||
===== Raspberry Pi Configuration ===== | |||
To use this hat, you need to properly configure the Raspberry Pi (e.g. by the sudo raspi-config command): | |||
* In order to use the RS485 bus, UART must be turned on with the indication that the system shell should be turned off | |||
* To use the CAN bus, you must enable SPI and add the following line in the config.txt file: | |||
{| class="wikitable" style="width: 1000px;" | |||
|- | |||
! style="text-align: left;"|dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000 | |||
|} | |||
===== Electronic Schematics ===== | ===== Electronic Schematics ===== | ||
Line 38: | Line 54: | ||
[[File: RPi_CAN_RS485_HAT_schemat.png | none | 1000px | thumb | center]] | [[File: RPi_CAN_RS485_HAT_schemat.png | none | 1000px | thumb | center]] | ||
</center> | </center> | ||
===== Pin description - bus connectors ===== | ===== Pin description - bus connectors ===== | ||
Line 77: | Line 94: | ||
</center> | </center> | ||
===== | ===== Additional connector ===== | ||
The | The module has been equipped with an additional connector that allows it to be connected to computers other than those equipped with a 40-pin connector of the Raspberry standard. The pins of the connector are described on the bottom side of the board. | ||
<center> | <center> | ||
[[File: | [[File:RPi_CAN_RS485_HAT_zlacze.png|none|650px|thumb|center]] | ||
</center> | </center> | ||
Line 88: | Line 105: | ||
[[File: RPi_CAN_RS485_HAT_wymiary_PCB.png | none | 500px | thumb | center]] | [[File: RPi_CAN_RS485_HAT_wymiary_PCB.png | none | 500px | thumb | center]] | ||
</center> | </center> | ||
===== External Links ===== | ===== External Links ===== |
Latest revision as of 10:57, 24 October 2023
Description
KAmodRPi RS485 CAN HAT is an extension for the Raspberry Pi computer extending its interfaces with RS485 and CAN. The board is equipped with MCP2515 and MCP2551 systems to support the CAN bus, while the conversion of the signal to the levels corresponding to the RS485 bus is the ST3485 system. It allows communication of Raspberry computers with buses used, for example, in automation and vehicles.
Basic Features and Parameters
- Connector compatible with the 40-pin Raspberry standard
- CAN interface
- CAN MCP2515 controller controlled by SPI
- MCP2551 transceiver
- RS485 interface
- ST3485 transceiver (MAX485 compatible)
- Half-duplex transmission
- Automatic detection of transmission direction (direction control possible after two resistors are soldered)
- Signals on the goldpin connectors and terminal strips
- Additional 2,54mm connector, allowing for work with computers like Arduino
- Built-in jumpers for connecting 120 Ohm terminating resistors
- Dimensions: 65mm x 30mm x 20mm
Standard Equipment
Code | Description |
---|---|
KAmodRPi RS485 CAN HAT |
|
4 x Spacer sleeve 8 x Mounting screw |
|
Raspberry Pi Configuration
To use this hat, you need to properly configure the Raspberry Pi (e.g. by the sudo raspi-config command):
- In order to use the RS485 bus, UART must be turned on with the indication that the system shell should be turned off
- To use the CAN bus, you must enable SPI and add the following line in the config.txt file:
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000 |
---|
Electronic Schematics
Pin description - bus connectors
JP1 | Function | |
---|---|---|
4 (A) | RS485 - inverted signal | |
3 (B) | RS485 - non-inverted signal | |
2 (L) | CAN Low | |
1 (H) | CAN High |
Selecting the operating mode
The KAmodRPi RS485 CAN HAT module is equipped with a system that automatically detects the transmission direction. This system, however, is not active; the transmission direction is selected by the GPIO 4 pin state of the Raspberry Pi. In order to save this output, it is possible to switch on the above-mentioned system:
- The jumpers soldered in the DIR CTRL fields (default configuration) mean manual selection of the transmission direction
- Jumpers soldered in AUTO fields mean automatic detection of the transmission direction
Terminating resistors
The module is equipped with terminating resistors for both CAN and RS485 buses. These resistors can be disconnected using the following jumpers:
Additional connector
The module has been equipped with an additional connector that allows it to be connected to computers other than those equipped with a 40-pin connector of the Raspberry standard. The pins of the connector are described on the bottom side of the board.
External Dimensions
The board has been designed so that the dimensions and mounting holes correspond to the Raspberry Pi Zero board: