> For the complete documentation index, see [llms.txt](https://wiki.openelab.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.openelab.io/aiot/m5stack/m5stack-i-o-hub-1-to-6-expansion-unit-stm32f0.md). Agents can also search and read this documentation through its [MCP server](https://wiki.openelab.io/~gitbook/mcp).

# M5Stack I/O Hub 1 to 6 Expansion Unit (STM32F0)

{% hint style="info" %}
[**View M5Stack I/O Hub 1 to 6 Expansion Unit on OpenELAB**](https://openelab.io/products/m5stack-i-o-hub)

**Store SKU / option:** `M5-U041-B`. Match the purchased model and revision to the official reference below.
{% endhint %}

### M5Stack I/O Hub 1 to 6 Expansion Unit (STM32F0)

***

### Product Link

{% embed url="<https://openelab.io/products/m5stack-i-o-hub>" %}

### Introduction

**PbHUB Unit** is a 6-channel expansion Unit with I2C control. Each Port B interface is capable of GPIO, PWM, Servo control, ADC sampling, RGB light control and other functions. Adopts STM32F030 for internal control.

<figure><img src="https://1292444914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtgOfPnscWebs1eh82EKq%2Fuploads%2F6TpxuvFpOoltrHtbuAxk%2Fimage.png?alt=media&amp;token=1cbb4e90-bdec-4c34-aee8-3652018c8fcf" alt=""><figcaption></figcaption></figure>

### Features

* 6 x GPIO Ports Expansion
* 1 x I2C Input
* Internal STM32F030 control
* 2 x Brick holes

### Specifications

| Spec                   | Parameter                      |
| ---------------------- | ------------------------------ |
| Communication protocol | I2C:0x61(Modified by register) |
| Net weight             | 6.7g                           |
| Gross weight           | 11.8g                          |

### Pinout

<figure><img src="https://1292444914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtgOfPnscWebs1eh82EKq%2Fuploads%2FP0uCfBZTrIW84RgtriAf%2Fimage.png?alt=media&amp;token=ad069763-f08c-4e18-a38c-0f35fa98b6bf" alt=""><figcaption></figcaption></figure>

### Dimensions

| Product Size | 48\*24\*12mm    |
| ------------ | --------------- |
| Package Size | 13.6\*9.1\*12mm |

### How to Use

#### UIFlow <a href="#uiflow" id="uiflow"></a>

**Feature Introduction**

<figure><img src="https://static-cdn.m5stack.com/resource/docs/products/unit/pbhub_1.1/pbhub_1.1_uiflow_01.webp" alt="" width="375"><figcaption></figcaption></figure>

* **Servo CH IO angle** Set rotation angle of the servo
* **Servo CH IO pulse** Write digital values to IOs
* **read status** Read firmware version/I2C address
* **init I2C address** Initialize I2C address
* **set I2C address** Set I2C address

#### Example <a href="#example" id="example"></a>

* Case study: Controlling repeated rotation of the servo
* Communication protocols: I2C
* I2C address: 0x61

<figure><img src="https://static-cdn.m5stack.com/resource/docs/products/unit/pbhub_1.1/pbhub_1.1_uiflow_02.webp" alt="" width="375"><figcaption></figcaption></figure>

#### Arduino <a href="#arduino" id="arduino"></a>

* [analog\_read](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/analog_read)
* [digital\_write\_read](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/digital_write_read)
* [pwm](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/pwm)
* [rgb\_led](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/rgb_led)

  Here, the RGB driver can only be WS2812, not sk6812.
* [servo](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/servo)

## Official documentation and development resources

Use [Unit PbHub v1.1](https://docs.m5stack.com/en/unit/Unit_PbHub_v1.1) for the manufacturer's complete model reference, diagrams and maintained examples. The official product code is **`U041-B`**; match the board/Unit label before choosing a firmware or host example. The references below complement this guide's local instructions.

| Development need                          | Model-specific reference                                                                                                                         |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Mechanical / CAD files                    | [Read mechanical / cad files](https://github.com/m5stack/M5_Hardware/tree/master/Products/U041-B_Unit_PbHub_v1.1/Structures)                     |
| Mechanical / CAD files                    | [Read mechanical / cad files](https://github.com/m5stack/M5_Hardware/blob/master/Products/U041-B_Unit_PbHub_v1.1/Structures/Unit_PbHub_v1.1.stl) |
| Example source: M5Unit-PbHub              | [Read example source: m5unit-pbhub](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/analog_read)                                      |
| Example source: M5Unit-PbHub              | [Read example source: m5unit-pbhub](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/digital_write_read)                               |
| Example source: M5Unit-PbHub              | [Read example source: m5unit-pbhub](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/pwm)                                              |
| Example source: M5Unit-PbHub              | [Read example source: m5unit-pbhub](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/rgb_led)                                          |
| Example source: M5Unit-PbHub              | [Read example source: m5unit-pbhub](https://github.com/m5stack/M5Unit-PbHub/tree/main/examples/servo)                                            |
| Official source: M5Unit-PbHub-Internal-FW | [Read official source: m5unit-pbhub-internal-fw](https://github.com/m5stack/M5Unit-PbHub-Internal-FW)                                            |

Keep the example's host model, interface pins and dependency versions together when reproducing a result. A schematic or SDK link does not establish that another revision uses the same wiring. Official model pages and accessible tutorial links reviewed **23 November 2026**. Other downloads above are manufacturer-listed resources; listing a file is not a test of its contents. Compilation, firmware flashing and hardware operation were **not performed** in this review.
