Serial Expansion HAT in Raspberry Pi : Introduction for beginners

Serial Expansion HAT in Raspberry Pi : Introduction for beginners

Overview of Serial Expansion HAT

Raspberry Pi organisation designed the device Raspberry Pi with only UART port to transmit and receive data over serial communication. It becomes impossible for the user to plug in two or more devices simultaneously with the Raspberry Pi. Raspberry Pi Serial Expansion HAT developed to avoid this problem that makes the transmission possible to more than one device.

Features of Serial Expansion HAT

  • Raspberry Pi connectivity, compatible with Raspberry Pi Zero/Zero W/Zero WH/2B/3B/3B+/4B
  • Onboard SC16IS752, expands 2-channel UART and 8 programmable GPIO through I2C
  • It is arranged together up to 16 of this modules by setting the address jumper A0 and A1 that would make 32-ch UART
  • Onboard multi LEDs for indicating the working status of UART

Detailed specification

  • Operating voltage: 3.3V
  • Expansion chip: SC16IS752
  • Control interface: I2C
  • Mounting hole size: 2.8mm
  • Dimension: 65mm x 30mm

Process of configuration

  A user need to install the libraries first to begin the process, like Python libraries             

  • sudo apt-get install python-dev
  • sudo apt-get install python-smbus
  • sudo apt-get install python-spidev

Enable i2c Interface

  1. Execute command: sudo raspi-config
  2. Choose: Interfacing Options->I2C->Yes

How to run examples

  1. Clone this git repository by executing command                                                                      git clone
  2. open examples folder and edit UART interface on code as per your need (ttySC0 or ttySC1).
  3. Now type below command to run it.                                                                                            sudo python3 or sudo python3


Leave a comment

Your email address will not be published. Required fields are marked *

Please note, comments must be approved before they are published