Stufin
Home Quick Cart Profile

M5 Stack 1 to 3 HUB Unit

Buy Now on Stufin

Module Expansion

Connect up to three M5Stack modules, such as GPS, Wi-Fi, Bluetooth, or sensor modules, to expand the capabilities of your IoT project.

Signal Routing

Intelligent routing with ESD protection

Power Distribution

The HUB Unit provides a convenient way to power multiple modules from a single power source, eliminating the need for multiple power cables.

Grounding

Common grounding point for all connected modules

Compact Design

The HUB Unit features a compact design, making it ideal for projects where space is limited.

Easy Module Connection

Modules can be easily connected and disconnected using the HUB Unit's foolproof socket design.

Wide Compatibility

The HUB Unit is compatible with a wide range of M5Stack modules, making it a versatile expansion solution for various IoT projects.

Improved Signal Integrity

The HUB Unit's intelligent signal routing and grounding system ensure reliable signal transmission and minimize signal noise.

Simple Power Management

The HUB Unit simplifies power management by providing a single power input for all connected modules.

Technical Specifications

Operating Voltage

3.3V to 5V

Power Input

USB-C or breadboard-friendly pins

Module Connection

3 x M5Stack module sockets

Dimensions

54 x 24 x 12 mm (2.13 x 0.94 x 0.47 in)

Weight

20g (0.71 oz)

Applications

The M5 Stack 1 to 3 HUB Unit is ideal for a wide range of IoT projects, including

Robotics

Connect multiple modules to create complex robotic systems.

Home Automation

Use the HUB Unit to connect sensors, actuators, and communication modules for comprehensive home automation systems.

Industrial Automation

Implement the HUB Unit in industrial automation projects to connect sensors, control systems, and communication modules.

Prototyping

Utilize the HUB Unit as a convenient and efficient way to prototype complex IoT projects.

By providing a flexible and efficient way to connect multiple M5Stack modules, the M5 Stack 1 to 3 HUB Unit simplifies the development of complex IoT projects, making it an essential component for any M5Stack-based project.

Pin Configuration

  • M5 Stack 1 to 3 HUB Unit Pinout Documentation
  • The M5 Stack 1 to 3 HUB Unit is a versatile IoT component designed for expands the possibilities of the M5 Stack series. This documentation provides a detailed explanation of each pin on the HUB Unit, enabling users to harness its full potential.
  • Pinout Structure:
  • The M5 Stack 1 to 3 HUB Unit features a 2x10-pin header with the following pinout structure:
  • | Pin Number | Pin Name | Description |
  • | --- | --- | --- |
  • | 1 | GND | Ground Pin |
  • | 2 | 5V | Power Pin (5V) |
  • | 3 | SCL | I2C Clock Pin |
  • | 4 | SDA | I2C Data Pin |
  • | 5 | TXD | UART Transmitter Pin |
  • | 6 | RXD | UART Receiver Pin |
  • | 7 | GPIO0 | General Purpose Input/Output Pin 0 |
  • | 8 | GPIO1 | General Purpose Input/Output Pin 1 |
  • | 9 | GPIO2 | General Purpose Input/Output Pin 2 |
  • | 10 | GPIO3 | General Purpose Input/Output Pin 3 |
  • | 11 | 5V | Power Pin (5V) |
  • | 12 | GND | Ground Pin |
  • | 13 | SCL | I2C Clock Pin |
  • | 14 | SDA | I2C Data Pin |
  • | 15 | TXD | UART Transmitter Pin |
  • | 16 | RXD | UART Receiver Pin |
  • | 17 | GPIO4 | General Purpose Input/Output Pin 4 |
  • | 18 | GPIO5 | General Purpose Input/Output Pin 5 |
  • | 19 | GPIO6 | General Purpose Input/Output Pin 6 |
  • | 20 | GPIO7 | General Purpose Input/Output Pin 7 |
  • Pin-by-Pin Explanation:
  • 1. GND (Pin 1 and 12): The Ground pins are used to provide a common ground reference for the HUB Unit and connected devices.
  • 2. 5V (Pin 2 and 11): The Power pins provide a 5V power supply to the HUB Unit and connected devices.
  • 3. SCL (Pin 3 and 13): The I2C Clock pins are used for clock signal transmission in I2C communication protocols.
  • 4. SDA (Pin 4 and 14): The I2C Data pins are used for data transmission in I2C communication protocols.
  • 5. TXD (Pin 5 and 15): The UART Transmitter pins are used for transmitting serial data in UART communication protocols.
  • 6. RXD (Pin 6 and 16): The UART Receiver pins are used for receiving serial data in UART communication protocols.
  • 7. GPIO0 (Pin 7): General Purpose Input/Output Pin 0 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 8. GPIO1 (Pin 8): General Purpose Input/Output Pin 1 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 9. GPIO2 (Pin 9): General Purpose Input/Output Pin 2 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 10. GPIO3 (Pin 10): General Purpose Input/Output Pin 3 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 11. GPIO4 (Pin 17): General Purpose Input/Output Pin 4 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 12. GPIO5 (Pin 18): General Purpose Input/Output Pin 5 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 13. GPIO6 (Pin 19): General Purpose Input/Output Pin 6 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • 14. GPIO7 (Pin 20): General Purpose Input/Output Pin 7 can be used for digital input/output operations, such as controlling LEDs or reading sensor data.
  • Connecting the Pins:
  • When connecting the pins, ensure that you match the corresponding pin numbers and functions. For example, connect the GND pin (1) to a ground reference, and the 5V pin (2) to a 5V power source.
  • When using I2C or UART communication protocols, connect the SCL, SDA, TXD, and RXD pins to the corresponding pins on the connected devices.
  • When using the GPIO pins, connect them to the desired devices or sensors, ensuring correct voltage levels and current limitations.
  • Important Notes:
  • Always handle the HUB Unit with care to prevent damage from static electricity or mechanical stress.
  • Ensure proper power supply and voltage levels to prevent damage to the HUB Unit and connected devices.
  • Refer to the M5 Stack documentation and datasheets for specific guidelines on using the HUB Unit with other M5 Stack components.
  • By understanding the pinout structure and function of each pin, you can unlock the full potential of the M5 Stack 1 to 3 HUB Unit and create innovative IoT projects.

Code Examples

M5 Stack 1 to 3 HUB Unit Documentation
Overview
The M5 Stack 1 to 3 HUB Unit is a versatile IoT component designed to expand the capabilities of M5 Stack devices. This module provides three additional I/O hubs, allowing users to connect more peripherals and sensors to their M5 Stack projects. The HUB Unit is compact, easy to use, and compatible with a wide range of M5 Stack devices.
Technical Specifications
Dimensions: 54.2 x 25.4 mm
 I/O Hubs: 3
 Power consumption: 5V, 50mA (max)
 Compatible with M5 Stack devices: M5StickC, M5StickV, M5Atom
Connecting the HUB Unit
To use the M5 Stack 1 to 3 HUB Unit, connect it to your M5 Stack device using the provided Grove connector. Make sure to align the pins correctly to ensure a secure connection.
Code Examples
### Example 1: Using the HUB Unit with Multiple Sensors
In this example, we'll demonstrate how to connect multiple sensors to the HUB Unit and read data from them using an M5StickC device.
Hardware Requirements:
M5StickC
 M5 Stack 1 to 3 HUB Unit
 3 x Grove Sensors (e.g., temperature, humidity, and pressure sensors)
Code:
```c
#include <M5StickC.h>
#include <Wire.h>
#define HUB_UNIT_I2C_ADDRESS 0x1A
// Define sensor objects
Sensor tempSensor(HUB_UNIT_I2C_ADDRESS, 0x01);
Sensor humiSensor(HUB_UNIT_I2C_ADDRESS, 0x02);
Sensor presSensor(HUB_UNIT_I2C_ADDRESS, 0x03);
void setup() {
  M5.begin(); // Initialize M5StickC
  Wire.begin(); // Initialize I2C communication
}
void loop() {
  // Read data from sensors
  float temp = tempSensor.read();
  float humi = humiSensor.read();
  float pres = presSensor.read();
// Print sensor data to serial monitor
  Serial.print("Temperature: ");
  Serial.print(temp);
  Serial.println(" C");
  Serial.print("Humidity: ");
  Serial.print(humi);
  Serial.println(" %");
  Serial.print("Pressure: ");
  Serial.print(pres);
  Serial.println(" hPa");
delay(1000);
}
```
### Example 2: Using the HUB Unit with a Display and Button
In this example, we'll demonstrate how to connect a display and a button to the HUB Unit and use them to create a simple user interface using an M5Atom device.
Hardware Requirements:
M5Atom
 M5 Stack 1 to 3 HUB Unit
 1 x Grove Display (e.g., SSD1306)
 1 x Grove Button
Code:
```c
#include <M5Atom.h>
#include <Wire.h>
#define HUB_UNIT_I2C_ADDRESS 0x1A
// Define display and button objects
Display display(HUB_UNIT_I2C_ADDRESS, 0x3C);
Button button(HUB_UNIT_I2C_ADDRESS, 0x04);
void setup() {
  M5.begin(); // Initialize M5Atom
  Wire.begin(); // Initialize I2C communication
}
void loop() {
  // Read button state
  bool buttonState = button.read();
// If button is pressed, display a message
  if (buttonState) {
    display.clear();
    display.setTextSize(2);
    display.setCursor(0, 0);
    display.print("Button pressed!");
    display.update();
  }
delay(50);
}
```
Note: These code examples are for illustration purposes only and may require modifications to work with your specific hardware setup. Be sure to consult the datasheets and documentation for your sensors, displays, and other peripherals for specific usage guidelines.