1. Introduction
The M5Stack 4-Channel Relay 13.2 Module V1.1 is a versatile relay module designed for simplified circuit control. It features four onboard mechanical relay control channels (Normally Open, Common) and is ideal for reliable and efficient control of DC circuitry. Utilizing the I2C communication protocol, this module optimizes IO resources for seamless integration into various projects. Its jumper cap design allows for easy switching between active and passive relay modes, accommodating diverse circuit requirements. This module is specifically designed for DC circuit switching, supporting a maximum load capacity of 24W (DC 24V @ 1A) per channel. It also incorporates built-in external power voltage detection and a DC-DC circuit to power the host, enhancing overall safety and stability.
2. Features
- MCU: STM32G030F6® 32-bit Cortex®-M0+ CPU
- Communication: I2C communication interface (address: 0x26)
- Relay Channels: 4 independent relay control channels
- Load Capacity: Maximum load capacity 24W (DC 24V@1A) per channel
- Working Modes: Supports two modes of operation (active and passive)
- Voltage Detection: Built-in voltage detection capability
- Compatibility: Compatible with Arduino, UIFlow, and other programming platforms
3. Package Contents
- 1 x M5Stack 4Relay Module 13.2 V1.1
- 5 x 2.54mm-2P Wiring Terminal Blocks (green)
- 10 x Pin Jumpers
- 1 x Wiring Instructions (manual)
4. Specifications
| Specification | Parameter |
|---|---|
| MCU | STM32F030F4P6 |
| Communication Interface | I2C Communication @0x26 |
| Supported Working Modes | Active Control / Passive Control |
| Relay Channels | 4x (COM, NO interface) |
| Power Input Interface | DC5521 female jack 5.5 x 2.1mm@5-24V (inner positive, outer negative) |
| Load Capacity | Maximum load capacity 24W (DC 24V@1A) per channel |
| Relay Terminal Block | 2.54-2P |
| Single Relay Power Consumption | 5V@40mA |
| Coil Activation Time | 6ms |
| Coil Release Time | 4ms |
| Product Size | 54.0 x 54.0 x 19.7mm |
| Product Weight | 38.0g |
| Package Size | 134.0 x 95.0 x 20.0mm |
| Gross Weight | 58.1g |
5. Setup
5.1 Power Connection
- The module requires a DC input voltage of 5-24V.
- Connect the power supply to the DC INPUT terminals (VIN and GND). Ensure correct polarity (inner positive, outer negative for DC5521 jack).
- The module includes a DC-DC circuit to power the host M5Core.
5.2 Relay Connections
- The module provides four relay channels, each with Normally Open (N.O.) and Common (COM) terminals.
- Connect the load to be controlled to the appropriate N.O. and COM terminals for each relay (OUT1-OUT4).
- Ensure the load does not exceed 24W (DC 24V@1A) per channel.
5.3 I2C Communication
Connect the module to your M5Core or other compatible microcontroller via the I2C interface. The standard I2C pins are:
| M5Core Pin | 4Relay Module 13.2_V1.1 Pin |
|---|---|
| G22 | SCL |
| G21 | SDA |
| 5V | VCC |
| GND | GND |
5.4 Working Mode Selection (Jumper Caps)
The module supports active and passive working modes, selectable via jumper caps. Refer to the wiring instructions provided in the package for specific jumper configurations based on your application needs. The overview image (Figure 1) illustrates the concept of connecting HPWR to MBUS for power supply directly.
6. Operating Instructions
The 4Relay Module 13.2 V1.1 is controlled via the I2C communication protocol. The default I2C address is 0x26. You can control the status of the four relays and read ADC values using specific registers.
6.1 I2C Protocol Register Map
Key registers:
- Relay Control (Addr: 0x26, Reg: 0x10, R/W): This register controls the status of the four relays.
- Bit 0: Relay 1 status
- Bit 1: Relay 2 status
- Bit 2: Relay 3 status
- Bit 3: Relay 4 status
- Set the corresponding bit to 1 to activate the relay, 0 to deactivate.
- ADC 8Bits (Addr: 0x26, Reg: 0x20, R): Reads 8-bit ADC value (0-255).
- ADC 12Bits (Addr: 0x26, Reg: 0x30, R): Reads 12-bit ADC value (0-4095).
- Firmware Version (Addr: 0x26, Reg: 0xF0, R): Reads the firmware version number.
- I2C Address (Addr: 0x26, Reg: 0xF0, R/W): Allows changing the I2C address (1-127).
6.2 Software Libraries and Examples
M5Stack provides libraries and examples to facilitate programming with the module:
- Arduino: Module13.2 4Relay v1.1 Arduino Library
- Examples: Module13.2 4Relay v1.1 Example with M5Core, Module13.2 4Relay v1.1 Example with M5Core2
- Firmware: Module13.2 4Relay v1.1 Internal Firmware
These resources can be found on the official M5Stack documentation website or GitHub repository. For detailed programming instructions, refer to the specific library documentation.
7. Applications
The M5Stack 4-Channel Relay 13.2 Module V1.1 is suitable for a variety of applications, including:
- General on/off control for DC devices
- Solenoid valve control in automation systems
- Switching DC control loads
- Integration into Internet of Things (IoT) projects requiring switching capabilities
8. Schematics
For advanced users and developers, the detailed schematic diagram of the module is provided below:
A PDF version of the schematics is also available for download: Module13.2 4Relay v1.1 Schematics PDF
9. User Tips
- Power Supply: Always ensure the DC input voltage is within the 5-24V range to prevent damage to the module.
- Load Management: Do not exceed the maximum load capacity of 24W (DC 24V@1A) per relay channel. Overloading can lead to relay failure or damage.
- I2C Address: If using multiple I2C devices, verify that the 4Relay module's I2C address (default 0x26) does not conflict with other devices. The address can be changed via software if necessary.
- Jumper Settings: Double-check jumper cap configurations for active/passive modes before powering on to ensure desired operation.
- Wiring: Use appropriate gauge wires for your loads to prevent overheating and ensure stable connections.
10. Troubleshooting
- Module Not Responding:
- Check power supply connections and voltage.
- Verify I2C wiring (SDA, SCL, VCC, GND) and ensure the I2C address is correct (default 0x26).
- Confirm that the M5Core or host controller's I2C bus is initialized and functioning.
- Relay Not Activating:
- Ensure the load is correctly wired to the N.O. and COM terminals.
- Check the load's power requirements and ensure it does not exceed the relay's capacity.
- Verify the I2C command sent to the relay control register (0x10) is correct for the desired relay.
- Inspect jumper settings for active/passive mode.
- Incorrect ADC Readings:
- Ensure the voltage detection input is correctly connected.
- Verify the correct ADC register (0x20 for 8-bit, 0x30 for 12-bit) is being read.
11. Maintenance
- Cleaning: Keep the module clean and free from dust and debris. Use a soft, dry cloth for cleaning.
- Environment: Operate the module within its specified environmental conditions (temperature, humidity) to ensure longevity.
- Connections: Periodically check all wiring connections for tightness and corrosion, especially in industrial or high-vibration environments.
- Firmware Updates: Check the M5Stack official website for any available firmware updates that may improve performance or add features.
12. Warranty and Support
For warranty information, technical support, and additional resources, please refer to the official M5Stack website or contact M5Stack customer service directly. Keep your purchase receipt for warranty claims.