1. Introducció
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. Característiques
- MCU: STM32G030F6® 32-bit Cortex®-M0+ CPU
- Comunicació: I2C communication interface (address: 0x26)
- Canals de relé: 4 independent relay control channels
- Capacitat de càrrega: Maximum load capacity 24W (DC 24V@1A) per channel
- Modes de treball: Supports two modes of operation (active and passive)
- Voltage Detecció: Vol incorporattage detection capability
- Compatibilitat: Compatible with Arduino, UIFlow, and other programming platforms
3. Contingut del paquet
- 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. Especificacions
| Especificació | Paràmetre |
|---|---|
| MCU | STM32F030F4P6 |
| Interfície de comunicació | I2C Communication @0x26 |
| Supported Working Modes | Control actiu / Control passiu |
| Canals de retransmissió | 4x (COM, NO interface) |
| Interfície d'entrada d'alimentació | DC5521 female jack 5.5 x 2.1mm@5-24V (inner positive, outer negative) |
| Capacitat de càrrega | Maximum load capacity 24W (DC 24V@1A) per channel |
| Relay Terminal Block | 2.54-2P |
| Single Relay Power Consumption | 5 V a 40 mA |
| Coil Activation Time | 6 ms |
| Coil Release Time | 4 ms |
| Mida del producte | 54.0 x 54.0 x 19.7 mm |
| Pes del producte | 38.0 g |
| Mida del paquet | 134.0 x 95.0 x 20.0 mm |
| Pes brut | 58.1 g |
5. Configuració
5.1 Connexió d'alimentació
- The module requires a DC input voltage de 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 Connexions de relé
- 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. Instruccions de funcionament
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. Aplicacions
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. Esquemes
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. Consells d'usuari
- Font d'alimentació: Always ensure the DC input voltage is within the 5-24V range to prevent damage to the module.
- Gestió de càrrega: Do not exceed the maximum load capacity of 24W (DC 24V@1A) per relay channel. Overloading can lead to relay failure or damage.
- Adreça I2C: 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.
- Configuració del pont: Double-check jumper cap configurations for active/passive modes before powering on to ensure desired operation.
- Cablejat: Use appropriate gauge wires for your loads to prevent overheating and ensure stable connections.
10. Solució De Problemes
- El mòdul no respon:
- Comproveu les connexions de la font d'alimentació i el volumtage.
- 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.
- Relé no activat:
- 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:
- Assegureu-vos que el voltage detection input is correctly connected.
- Verify the correct ADC register (0x20 for 8-bit, 0x30 for 12-bit) is being read.
11. Manteniment
- Neteja: Mantingueu el mòdul net i lliure de pols i deixalles. Feu servir un drap suau i sec per netejar-lo.
- Medi ambient: Operate the module within its specified environmental conditions (temperature, humidity) to ensure longevity.
- Connexions: Periodically check all wiring connections for tightness and corrosion, especially in industrial or high-vibration environments.
- Actualitzacions de firmware: Check the M5Stack official weblloc web per a qualsevol actualització de firmware disponible que pugui millorar el rendiment o afegir funcions.
12. Garantia i Suport
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.





