WSAL21648 – RS485 RS232 HAT/en
Erscheinungsbild
Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.
Summary
The Waveshare RS485 RS232 HAT is an isolated expansion module for the 40-pin GPIO interface of Raspberry Pi boards. It uses a multi-chip combination of SC16IS752, SP3485 and SP3232 to enable both RS485 and RS232 communication via SPI (up to 921600 baud). The module features built-in power isolation, ADI magnetic coupling, TVS, fuse and protection diodes, as well as indicators for supply voltage and serial communication status.
Related products at JW Tech
Technical overview
- Based on the 40-pin GPIO interface, suitable for the Raspberry Pi series.
- Uses SC16IS752 (UART expansion chip), SP3485 (RS485 transceiver) and SP3232 (RS232 transceiver) in a multi-chip combination.
- Communication rate: 300 to 921600 baud.
- Operating voltage: 3.3 V / 5 V.
- Dimensions: 65 mm × 56.5 mm; via diameter: 3.0 mm.
- RS485 supports manual or automatic transmit/receive switching, configurable via DIP switch.
- Built-in TVS (transient voltage suppression), resettable fuse and protection diodes guard against overvoltage, overcurrent and static discharge.
- Onboard indicators for power supply and serial communication simplify status checks.
- Leads out the SPI control interface for easy access from main control boards such as Arduino.
- Provides complete supporting information manuals (C and Python sample programs and user manuals).
Commands and examples – verify before use:
sudo nano /boot/config.txt
dtoverlay=sc16is752-spi1,int_pin=24
sudo reboot
ls /dev
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
sudo apt-get install wiringpi
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo apt-get update
sudo apt-get install python-pip
sudo pip install RPi.GPIO
sudo apt-get install python-serial
sudo apt-get install python3-pip
sudo pip3 install RPi.GPIO
sudo apt-get install python3-serial
sudo apt-get install p7zip-full
Notes and version constraints
- The exact pinout of the IRQ pin depends on the actual soldering method; int_pin must be adjusted accordingly.
- For Ubuntu Bullseye systems, 'apt-get' must be replaced with 'apt'; only Python3 is supported and wiringPi is absent.
- On the Raspberry Pi system dated 2020-05-27, gpiochip3 did not become gpiochip2.
- For the C and Python demos, an additional RS485-to-serial-port module connected to channel 1 is required to see the effect; test.py requires channel 1 and channel 2 to be connected.
- If RS485 communication is abnormal: Check whether A and B of the 485 lines match the controlled 485 devices, first use a USB-to-RS485 device to communicate with the module to ensure the Raspberry Pi settings are correct, and check the parity bit settings of the serial communication parameters.
- The config.txt file cannot be changed directly on the Raspberry Pi; it must be edited via a card reader on a computer.
Source and revision record
- RS485 RS232 HAT - Waveshare Wiki
- Source revision: 84536
- Captured: 2026-09-03T03:09:25+00:00
- SHA-256:
2b46fb951a3ba97f75cc014bdb039837a033776effd9335470f8bee0e309c559