English
English
简体中文
日本語

Chain Angle ESPHome Component

Chain Angle is a potentiometer knob input node in the M5Stack Chain series. As the potentiometer knob rotates, the voltage at the sampling terminal changes within a fixed range. After ADC conversion by the built-in MCU, it outputs signal values with up to 12-bit resolution. It also integrates a programmable RGB LED for status indication and interactive display, making it suitable for human-machine interaction, smart home, and motor speed control applications.

Note
To use Chain series nodes, a compatible host is required for UART communication and control, such as the Chain DualKey host, or an Atom series device paired with the Atomic ToChain Base.

1. Component Overview

Item Information
Expansion module Chain Angle (U208)
Main functions Provides rotary knob input
Communication interface Chain Bus / UART
ESPHome components m5_chain_base, m5_chain_angle (external components)
ESPHome version requirement 2026.9.0 or later

2. Component Details

Include External Components

The Chain DualKey acts as the system's main controller. When connecting expansion sensors, set the connection direction and ID numbering order correctly.

Select the Direction

Select the corresponding uart_id according to the side of the Chain DualKey to which the expansion sensor is connected:

  • Connected to the left side of the Chain DualKey → use chain_uart_left.
  • Connected to the right side of the Chain DualKey → use chain_uart_right.

ID Numbering Rules

chain_index indicates the position of the expansion sensor relative to the Chain DualKey:

  • Start numbering from the module closest to the Chain DualKey.
  • Increase the ID sequentially (ID:1 → ID:2 → ID:3 …).
  • The left and right sides are numbered independently.
  • Refer to the diagram above to determine the correct order.

Configuration Example

  • Configure the host UART pins (using the Chain DualKey as an example)
uart:
  - id: chain_uart_right
    tx_pin: GPIO6
    rx_pin: GPIO5
    baud_rate: 115200

  - id: chain_uart_left
    tx_pin: GPIO47
    rx_pin: GPIO48
    baud_rate: 115200
  • Include the external components
external_components:
  - source: github://m5stack/esphome@feat-m5-chain
    components: [m5_chain_base, m5_chain_angle]
    refresh: 0s
  • Add the Chain Angle
m5_chain_angle:
  id: chain_angle
  uart_id: chain_uart_right
  chain_index: 1
  update_interval: 250ms

Set the correct index according to the actual position of the Chain.

  • Add Chain Angle ADC sensors
sensor:
  - platform: m5_chain_angle
    m5_chain_angle_id: chain_angle
    type: adc_12
    name: Chain Angle ADC 12
  - platform: m5_chain_angle
    m5_chain_angle_id: chain_angle
    type: adc_8
    name: Chain Angle ADC 8
  • Add the Chain Angle RGB LED
output:
  - platform: m5_chain_angle
    id: chain_angle_red
    m5_chain_angle_id: chain_angle
    channel: rgb_red
  - platform: m5_chain_angle
    id: chain_angle_green
    m5_chain_angle_id: chain_angle
    channel: rgb_green
  - platform: m5_chain_angle
    id: chain_angle_blue
    m5_chain_angle_id: chain_angle
    channel: rgb_blue

light:
  - platform: rgb
    name: "Chain Angle Light"
    red: chain_angle_red
    green: chain_angle_green
    blue: chain_angle_blue

3. Reference Example

After the Chain Angle expansion module is connected, you can view the corresponding Sensor and Light entities on the device page:

Dashboard card example

Page Tools
PDF
On This Page