> 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-mini-3a-relay-unit.md). Agents can also search and read this documentation through its [MCP server](https://wiki.openelab.io/~gitbook/mcp).

# M5Stack Mini 3A Relay Unit

{% hint style="info" %}
[**View M5Stack Mini 3A Relay Unit on OpenELAB**](https://openelab.io/products/mini-3a-relay-unit)

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

### M5Stack Mini 3A Relay Unit

***

### Product Link

{% embed url="<https://openelab.io/products/mini-3a-relay-unit>" %}

### Description <a href="#description" id="description"></a>

**RELAY** as it says is an M5Unit that implement a Relay functions. Relay can be used as an electrically operated switch, uses an electromagnet to mechanically operate a switch, where it is necessary to control a large power load circuit by a separate low-power signal such as digital signal output from a microprocessor.

The Relay support input voltage of up to 30V DC and 220V AC.

There are 3 pins named: ON, OFF, COM. You can program to make COM connect to ON or OFF, just by high and low out put of a digital GPIO.

### Features <a href="#product-features" id="product-features"></a>

* Single-BUS control
* Up to 3A @ 30 V DC or 220 V AC
* Software Development Platform: Arduino, UIFlow (Blockly, Python)
* Two Lego-compatible holes

### Applications <a href="#applications" id="applications"></a>

* Remote control of high-power appliances, such as refrigerators, air conditioners, TVs, etc.

### Specification <a href="#specification" id="specification"></a>

| Resources    | Parameter    |
| ------------ | ------------ |
| Net weight   | 12g          |
| Gross weight | 26g          |
| Product Size | 48\*24\*21mm |
| Package Size | 60\*57\*17mm |

![](https://static-cdn.m5stack.com/resource/docs/products/unit/relay/relay_05.webp) ![](https://static-cdn.m5stack.com/resource/docs/products/unit/relay/relay_06.webp)

### EasyLoader <a href="#easyloader" id="easyloader"></a>

EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification.

[Download Windows Version Easyloader](https://m5stack.oss-cn-shenzhen.aliyuncs.com/EasyLoader/Windows/UNIT/For%20M5Core/EasyLoader_Relay_UNIT_With_M5Core.exe) [Download MacOS Version Easyloader](https://m5stack.oss-cn-shenzhen.aliyuncs.com/EasyLoader/MacOS/UNIT/EasyLoader_Relay_UNIT_With_M5Core.dmg)

**Description:**\
The relay coil is turned on and off, and the contact is used as a switch for circuit control.

### Pinout <a href="#pinmap" id="pinmap"></a>

| M5Core(GROVE B) | GPIO36 | GPIO26                | 5V | GND |
| --------------- | ------ | --------------------- | -- | --- |
| RELAY Unit      |        | RELAY Controlling Pin | 5V | GND |

### Schematic <a href="#schematic" id="schematic"></a>

<figure><img src="https://static-cdn.m5stack.com/resource/docs/products/unit/relay/relay_sch_01.webp" alt=""><figcaption></figcaption></figure>

### Learn <a href="#learn" id="learn"></a>

<figure><img src="https://hackster.imgix.net/uploads/attachments/852848/fr6bqj5jsuoz6uq_9sEb58KypF.png?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Automation with SIM800L ESP32 M5Stack](https://www.hackster.io/merryq/automation-with-sim800l-esp32-m5stack-170a82)[Automation with SIM800L ESP32 M5Stack](https://www.hackster.io/merryq/automation-with-sim800l-esp32-m5stack-170a82)It is possible to turn a lamp or fan on and off through an SMS message.

<figure><img src="https://hackster.imgix.net/uploads/attachments/1283602/_vUOec0gbFj.blob?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Control sit/stand Desk height with a Paper E-Ink Display](https://www.hackster.io/baco/control-sit-stand-desk-height-with-a-paper-e-ink-display-51837e)[Control sit/stand Desk height with a Paper E-Ink Display](https://www.hackster.io/baco/control-sit-stand-desk-height-with-a-paper-e-ink-display-51837e)Control IKEA Bekant Desk sit/stand height with M5Stack M5Paper using two Relay units and a ToF (time-of-flight sensor VL53L0x) unit.

<figure><img src="https://hackster.imgix.net/uploads/attachments/1282037/_fSMZyTx5T4.blob?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Control sit/stand Desk height with a touch screen](https://www.hackster.io/baco/control-sit-stand-desk-height-with-a-touch-screen-b9f524)[Control sit/stand Desk height with a touch screen](https://www.hackster.io/baco/control-sit-stand-desk-height-with-a-touch-screen-b9f524)Control IKEA Bekant Desk sit/stand height with M5Stack Core2 using two Relay units and a ToF (time-of-flight sensor VL53L0x) unit.

<figure><img src="https://hackster.imgix.net/uploads/attachments/1138588/_FbVDqML1R7.blob?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Alexa enabled device with Atom Lite](https://www.hackster.io/vany5921/alexa-enabled-device-with-atom-lite-45a0b1)[Alexa enabled device with Atom Lite](https://www.hackster.io/vany5921/alexa-enabled-device-with-atom-lite-45a0b1)Atom Lite control device with Alexa. In my house, Amazon echo is located in every room, and the lighting of living room is controlled by Alex

<figure><img src="https://hackster.imgix.net/uploads/attachments/1188023/_GzEh9IFCW1.blob?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Portable Automatic Faucets Using M5StickC for COVID-19](https://www.hackster.io/mametarou963/portable-automatic-faucets-using-m5stickc-for-covid-19-a96f96)[Portable Automatic Faucets Using M5StickC for COVID-19](https://www.hackster.io/mametarou963/portable-automatic-faucets-using-m5stickc-for-covid-19-a96f96)Using the M5StickC, we developed a product that allows you to wash your hands without touching the device.

<figure><img src="https://hackster.imgix.net/uploads/attachments/1201470/_JgfrgsbsFX.blob?auto=compress%2Cformat&#x26;w=400&#x26;h=300&#x26;fit=min" alt=""><figcaption></figcaption></figure>

[Try to make a low temperature conditioner with M5Stack](https://www.hackster.io/vany5921/try-to-make-a-low-temperature-conditioner-with-m5stack-45b212)[Try to make a low temperature conditioner with M5Stack](https://www.hackster.io/vany5921/try-to-make-a-low-temperature-conditioner-with-m5stack-45b212)The mechanism is simple to monitor the value of the water temperature sensor with the M5Stack, and heater power is controlled by the relay

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

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

* [M5Unit-RELAY - with M5ATOM](https://github.com/m5stack/M5Unit-RELAY/blob/master/examples/Unit_RELAY_M5Atom/Unit_RELAY_M5Atom.ino)
* [M5Unit-RELAY - with M5CORE](https://github.com/m5stack/M5Unit-RELAY/blob/master/examples/Unit_RELAY_M5Core/Unit_RELAY_M5Core.ino)
* [M5Unit-RELAY - with M5CORE2](https://github.com/m5stack/M5Unit-RELAY/blob/master/examples/Unit_RELAY_M5Core2/Unit_RELAY_M5Core2.ino)
* [M5Unit-RELAY - with M5STICKC](https://github.com/m5stack/M5Unit-RELAY/blob/master/examples/Unit_RELAY_M5StickC/Unit_RELAY_M5StickC.ino)
* [M5Unit-RELAY - with M5STICKC-PLUS](https://github.com/m5stack/M5Unit-RELAY/blob/master/examples/Unit_RELAY_M5StickCPlus/Unit_RELAY_M5StickCPlus.ino)

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

<figure><img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/uiflow2/guide/uiflow2_cover.png" alt=""><figcaption></figcaption></figure>

[UIFlow2.0](https://docs.m5stack.com/en/uiflow2/uiflow_web)[UIFlow2.0](https://docs.m5stack.com/en/uiflow2/uiflow_web)This tutorial will show you how to initialize the configuration using the UIFlow2.0 graphical programming platform

[Relay Unit Programming Guide](https://uiflow-micropython.readthedocs.io/en/latest/unit/relay.html)

<figure><img src="https://static-cdn.m5stack.com/mpy_docs/unit/relay/example.svg" alt=""><figcaption></figcaption></figure>

**Feature Introduction**

By controlling the opening and closing of the relay to achieve the purpose of weak current control of strong electricity

* **set COM connect ON** Control relay closure
* **set COM connect OFF** Control relay disconnect

**Usage**

* [Click here to download the UIFlow example](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RELAY/UIFlow)

<figure><img src="https://static-cdn.m5stack.com/resource/docs/products/unit/relay/relay_uiflow_01.webp" alt=""><figcaption></figcaption></figure>

## Official documentation and development resources

Use [Unit Relay](https://docs.m5stack.com/en/unit/Unit_Relay) for the manufacturer's complete model reference, diagrams and maintained examples. The official product code is **`U023`**; 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/U023_Unit_Relay/Structures)                |
| Mechanical / CAD files       | [Read mechanical / cad files](https://github.com/m5stack/M5_Hardware/blob/master/Products/U023_Unit_Relay/Structures/Unit_Relay.stl) |
| Arduino development tutorial | [Read arduino development tutorial](https://docs.m5stack.com/en/arduino/projects/unit/unit_relay)                                    |

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.
