Getting Started

Last revision 2026/01/22

This guide introduces the DFR0566 IO Expansion HAT for Raspberry Pi, detailing its digital, analog, PWM, IIC, IIS, and SPI ports, and provides step-by-step instructions for enabling interfaces and executing programs, helping users effectively start their Raspberry Pi projects.

Overview

DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Board Overview DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Board Overview
Silkscreen Label Description
+ + 3.3V Positive
- - Negative
Binding post connect to external power positive
Binding post connect to external power negative
Digital 0-27 Raspberry Pi GPIO0-GPIO27
PWM 0-3 PWM signal output pin 0-3
Analog 0-3 Analog signal input pin 0-3
IIC C IIC port clock line
D IIC port data line
UART T UART Transmit port
R UART Receive port
5V 5V 5V positive
GND GND Negative
IIS SCK IIS serial clock line
DIN IIS serial data input
LCK IIS L/R channel selection line
BCK IIS system clock line
SPI MISO SPI data output line
SS SPI enable pin
SCLK SPI serial clock line
MOSI SPI data input line

Note:

  • The GPIO number in this board adopts BCM codes.
  • When the VP port is not power by external power, the voltage of PWM ⊕ is 5V.
  • When the VP port is powered by external power, the voltage of PWM ⊕ is equal to that of the VP external power (6-12V).

Port and Learning Guide

  • Digital Port: IO expansion board offers 28 groups (D0-D27) of digital ports that are led out via Raspberry Pi ports GPIO0~GPIO27 (BCM codes). GPIO Learning Guide.
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial
  • Analog Port: IO expansion board has four groups of analog ports A0-A3. The board integrates on-board MCU STM32, and 12-bits ADC. The input voltage of analog sensor is 12-bit ADC. After the analog data is converted into digital data, it will be sent to Raspberry Pi via IIC commnucation. Download Example Program.
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial
  • PWM Port: IO expansion board provides four groups of PWM ports. Connect the STM32 to PWM. Raspberry Pi will send data to STM32 via IIC to control. VP port can supply 6-12V external power to PWM port. When not powered, the voltage of PWM ⊕ is 3.3V. Download Example Program.
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial
  • IIC Port: IO expansion board has 3 groups of IIC ports that are led out via Raspberry Pi GPIO2(SDA.1)and GPIO3(SCL.1)(BCM code). IIC Learning Guide.
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial
  • IIS Port: there is 1 group of IIS port that is led out via Raspberry Pi GPIO ports: GIO21 (SCK), GPIO20(DIN), GPIO19(LCK), GPIO18(BCK).
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial
  • SPI Port: IO expansion board leads out a group of SPI ports via its GPIO port (BCM code): GPIO10(MOSI)and GPIO9(MISO), GPIO11(SCLK), GPIO8(SS). SPI Learning Guide.
DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ Tutorial

Preparatory work

IIC Usage Operation and Program Execution Introduction

  • Enable Raspberry Pi I2C interface. (Way to enable SPI is the same with IIC). Skip this step if it is already enabled.

Open Terminal and input the following commands, press "Enter":

command: sudo raspi-config

Use the "Enter" key to select: [Interfacing Options] or ([Advanced Options])->[I2C]->[Yes]->[OK]->[Finish]:

DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ IIC Usage Operation and Program Execution Introduction DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ IIC Usage Operation and Program Execution Introduction DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ IIC Usage Operation and Program Execution Introduction DFR0566 IO Expansion HAT for Raspberry Pi 4B/3B+ IIC Usage Operation and Program Execution Introduction
  • Install Phython demo library and git, and make sure the network connection of Raspberry Pi is fine. Skip this step if these have been installed.

command: sudo apt-get update

command: sudo apt-get install build-essential python-dev python-smbus git

  • Download the driver library and run.

command: cd ~

command: git clone https://github.com/DFRobot/DFRobot_RaspberryPi_Expansion_Board.git

Was this article helpful?

TOP