Files

144 lines
5.0 KiB
Markdown
Raw Permalink Normal View History

2020-09-25 15:30:48 +08:00
# 4-Relay {docsify-ignore-all}
2020-10-09 17:43:45 +08:00
<el-tag effect="plain">SKU:U097</el-tag>
2020-09-25 15:30:48 +08:00
2020-10-09 17:43:45 +08:00
<div class="product_pic"><img src="assets/img/product_pics/unit/4_relay/4relay.webp"></div>
2020-09-25 15:30:48 +08:00
## Description
2021-03-12 18:21:50 +08:00
**4-Relay** unit is an integrated 4-way relay module which can be controlled by I2C protocol. The maximum control voltage of each relay is AC-250V/DC-28V, the rated current is 10A and the instantaneous current can hold up to 16A. Each relay can be controlled independently, each on it's own. Each relay has status (LED) indictor as well to show the state of the relay at any given time.
2020-09-25 15:30:48 +08:00
## Product Features
- 4-way relay
2021-03-12 18:21:50 +08:00
- AC-250V/DC-28V/10A
2020-09-25 15:30:48 +08:00
- LED status indication
2021-01-29 14:47:53 +08:00
- I2C communication (0x26)
2020-09-25 15:30:48 +08:00
## Include
- 1x 4-Relay Unit
- 1x Grove Cable(20cm)
2020-10-23 17:47:27 +08:00
- 4x VH-3.96-4P Plug terminal
2020-09-25 15:30:48 +08:00
## Applications
- Digital signal switching
2020-10-09 17:43:45 +08:00
- Programmable power switch
2020-09-25 15:30:48 +08:00
## Specification
2020-11-26 15:54:34 +08:00
2020-09-25 15:30:48 +08:00
<table>
<tr style="font-weight:bold">
<td>Resources</td>
<td>Parameter</td>
</tr>
<tr>
<td>Maximum input voltage</td>
2021-03-12 18:21:50 +08:00
<td>AC-250V/DC-28V</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
<td>Rated current</td>
2020-10-22 18:38:04 +08:00
<td>10A</td>
</tr>
<tr>
<td>Maximum instantaneous currenta</td>
<td>16A</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
<td>Communication</td>
2021-01-29 14:47:53 +08:00
<td>I2C(0x26)</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
2020-10-22 18:38:04 +08:00
<td>Net Weight</td>
<td>40g</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
<td>Gross Weight</td>
2020-10-22 18:38:04 +08:00
<td>84g</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
<td>Product Size</td>
2020-10-22 18:38:04 +08:00
<td>112*23*18mm</td>
2020-09-25 15:30:48 +08:00
</tr>
<tr>
<td>Package Size</td>
2020-10-22 18:38:04 +08:00
<td>125*65*22mm</td>
2020-09-25 15:30:48 +08:00
</tr>
</table>
## EasyLoader
2020-11-26 15:54:34 +08:00
>EasyLoader is a precise and fast program writer which has a built-in functionalities related to the 4-Relay unit. The Easyloader program can burn the firmware to the main controller board by simple easy to follow steps. Please install the corresponding driver according to the device type. [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver)
2020-09-25 15:30:48 +08:00
<div class="easyloader-box">
<div style="background-color:white;">
<div><img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/easyloader_intro.webp"></div>
<div class="easyloader-btn">
2020-10-22 18:38:04 +08:00
<a href="https://m5stack.oss-cn-shenzhen.aliyuncs.com/EasyLoader/Windows/UNIT/For%20M5Core/EasyLoader_4_Relay_Unit.exe">Windows</a>
2020-10-09 17:43:45 +08:00
<a href="https://m5stack.oss-cn-shenzhen.aliyuncs.com/EasyLoader/MacOS/UNIT/EasyLoader_4Relay_Unit_for_M5Core.dmg">MacOS</a>
2020-09-25 15:30:48 +08:00
</div>
</div>
<div>
<video id="example_video" controls>
2020-10-23 17:47:27 +08:00
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Product_example_video/Unit/4-RELAY_UNIT.mp4" type="video/mp4">
2020-09-25 15:30:48 +08:00
</video>
<div class="easyloader-mask">
<a>
<svg id="play-btn" t="1583228776634" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4152" width="75" height="75"><path d="M512 0C229.216 0 0 229.216 0 512s229.216 512 512 512 512-229.216 512-512S794.784 0 512 0z m0 928C282.24 928 96 741.76 96 512S282.24 96 512 96s416 186.24 416 416-186.24 416-416 416zM384 288l384 224-384 224z" p-id="4153" fill="#007aff"></path></svg></a>
<p>Description:</p>
2020-10-09 17:43:45 +08:00
<p>ButtonA switches relay number, ButtonB switches led sync/ async, Button C controls all relays</p>
2020-09-25 15:30:48 +08:00
</div>
</div>
</div>
## Schematic
<img src="assets/img/product_pics/unit/4_relay/4-relay_sch.webp">
### PinMap
<table>
<tr><td>M5Core(GROVE A)</td><td>SDA(GPIO21)</td><td>SCL(GPIO22)</td><td>5V</td><td>GND</td></tr>
<tr><td>4-relay Unit</td><td>SDA</td><td>SCL</td><td>5V</td><td>GND</td></tr>
</table>
2021-03-02 19:09:07 +08:00
## Protocol
- Protocol type I2C
- I2C Address: **0x26**
```clike
/*-----------------------------------------------------------------------------*/
2021-04-09 17:43:23 +08:00
|RELAY control reg | 0x10-0x11
2021-03-02 19:09:07 +08:00
|-----------------------------------------------------------------------------
2021-04-09 17:43:23 +08:00
|Relay_ctrl_mode_reg[0] 0x10 | R/W | System control
2021-03-02 19:09:07 +08:00
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| R | R | R | R | R | R | R | Sync Mode |
| -Sync Mode:0 LED&Relay Async
| -Sync Mode:1 LED&Relay Sync
//---------------------------------------------------------------------------------
2021-04-09 17:43:23 +08:00
|Relay_ctrl_mode_reg[1] 0x11 | R/W | Relay & LED control
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LED1| LED2| LED3| LED4| RLY1| RLY2| RLY3| RLY4|
2021-03-02 19:09:07 +08:00
/*-------------------------------------------------------------------------------*/
```
2021-04-09 17:43:23 +08:00
2020-09-25 15:30:48 +08:00
## Example
2021-02-05 16:54:45 +08:00
### 1. Arduino
2020-09-25 15:30:48 +08:00
2020-10-22 18:38:04 +08:00
[click here to get Arduino example](https://github.com/m5stack/M5Stack/tree/master/examples/Unit/4-RELAY)
2020-09-25 15:30:48 +08:00
2020-12-11 16:09:47 +08:00
<el-divider content-position="right">Last updated: 2020-12-11</el-divider>
2020-09-25 15:30:48 +08:00
<script>
2020-10-23 17:47:27 +08:00
var purchase_link = 'https://m5stack.com/products/4-relay-unit';
2020-09-25 15:30:48 +08:00
anchor_search(purchase_link);
scrollFunc();
2020-11-26 15:54:34 +08:00
</script>