Files

7.3 KiB

PbHUB

SKU:U041

Description

PbHub Expander unit is a single-bus board which is controlled using GROVE PortB connector (The black port on the M5Go Base). The expander unit contains 6 ports all in 1 unit. PortB can be used as GPIO and Analog in (the two data lines are connected to GPIO36 and GPIO26 on the ESP32 module).

Similar to the PaHub Unit, the PbHub provides solution for multiple devices control using a single port - PortB. With PbHub each of the IO can be configured as input and output, it has a built-in MEGA328 MCU with a simple driver firmware installed.

Notice: Please pay attention to the order of the channels while programing the PbHub



Notice2: Not all M5 Units with PortB (Black) are able to be extended by PbHUB. PbHUB can only apply to basic single-bus communication like digital read and write, analog read and write, which is implemented by I2C protocol (controlled by the MEGA328 MCU).

The PbHub extension mechanism that allows it to control IO using a single-bus data transfer wires is embedded inside the Mega328 with pre-programmed functionalities such as: GPIO, AD and DA to enable digital read and write and analog read and write features. In this case, the PbHub is sometimes not necessary for applications that doesn't require such specific features or require features outside of the scope of the IO pins both for analog and digital IO. For example, if some project requires PWM functionalities - the PbHub won't be useful for such application as there is no support for PWM.

Product Features

  • Single-Bus GROVE PORTB Expander
  • Two Lego-compatible holes
  • 1-To-6

Include

  • 1x PbHUB Unit
  • 1x Grove Cable

Specification

Resources Parameter
Communication protocol I2C: 0x61(can be modified by resistance A0, A1, A2)
Net weight 7g
Gross weight 19g
Product Size 48*24*12mm
Package Size 67*53*12mm

Change I2C Address

The Default I2C address of the unit is 0x61 (which can be changed by using solder resistors A0 ~ A2, the address range is 0x61 ~ 0x68).

A0 A1 A2 I2C Address
/ / / 0x61
Resistors / / 0x62
/ Resistors / 0x63
Resistors Resistors / 0x64
/ / Resistors 0x65
Resistors / Resistors 0x66
/ Resistors Resistors 0x67
Resistors Resistors Resistors 0x68

EasyLoader

download EasyLoader

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.

  1. After downloading the software, double-click to run the application, connect the M5 device to the computer through the data cable, select the port parameters, click "Burn" to start burning. (For M5StickC burning, please Set the baud rate to 750000 or 115200)
  1. Currently EasyLoader is only suitable for Windows operating system, Please install the corresponding driver according to the device type. Please click here to view the CP210X driver installation tutorial, M5StickC/V/T/ATOM series can be used without driver)

PinMap

Mega328 ISP footprint definition

Schematic

Example

1. Arduino

For the complete Arduino code please click here

2. UIFlow

For the Complete UIFlow example code please click here

  • protocol type - I2C
  • address - 0x61
  • Set oneLED Color : LED address(2bytes) + RGB value(3bytes)
  • Set moreLED Color : LED start address(2bytes) + LED end address(2bytes) + RGB value(3bytes)
stateIO0 Digital WriteIO1 Digital WriteIO0 Analog WriteIO1 Analog WriteIO0 Digital ReadIO1 Digital ReadIO0 Analog ReadreserveSet RGB LED NumSet oneLED Color*Set moreLED Color*Set Brightness
r/wwwwwrrrrwwww
data length (Byte)1111112/2571
ch0 cmd404142434445464748494A4B
ch1 cmd505152535455565758595A5B
ch2 cmd606162636465666768696A6B
ch3 cmd707172737475767778797A7B
ch4 cmd808182838485868788898A8B
ch5 cmdA0A1A2A3A4A5A6A7A8A9AAAB

Last updated: 2020-12-14

<script> var purchase_link = 'https://m5stack.com/collections/m5-unit/products/pb-hub'; anchor_search(purchase_link); scrollFunc(); </script>