components/ads131m08
2026-05-10 23:22:54 +02:00
..
sensor Added config items to hub. Improved recovery process. 2026-05-10 23:22:54 +02:00
sensor_rms Fixed recovery from reset. Recovery working ok now. Added more hub configs. Need stil to update hub dump_config and calculation of settling times 2026-05-09 22:50:30 +02:00
__init__.py Added config items to hub. Improved recovery process. 2026-05-10 23:22:54 +02:00
ads131m08_defs.h Fixed recovery from reset. Recovery working ok now. Added more hub configs. Need stil to update hub dump_config and calculation of settling times 2026-05-09 22:50:30 +02:00
ads131m08.cpp Added config items to hub. Improved recovery process. 2026-05-10 23:22:54 +02:00
ads131m08.h Added config items to hub. Improved recovery process. 2026-05-10 23:22:54 +02:00
git_errors.txt adding to local git repo 2026-05-01 15:36:27 +02:00
README.md adding to local git repo 2026-05-01 15:36:27 +02:00
uint_str.h adding to local git repo 2026-05-01 15:36:27 +02:00

ESPHome components/ads131m08

This folder contains source code files and related resources for external ads131m08 component.

Example .yaml config


substitutions:
  ESP32_S3_SPI0_SCK: GPIO12
  ESP32_S3_SPI0_MISO: GPIO13
  ESP32_S3_SPI0_MOSI: GPIO11
  ADC_SYNC_RESET_PIN: GPIO21
  ADC_CS_PIN: GPIO41
  ADC_DRDY_PIN: GPIO42

external_components:
  - source:
      type: local
      path: components  # Path relative to this YAML file
    components: [ ads131m08 ]

spi:
  - id: spi_bus0
    clk_pin: ${ESP32_S3_SPI0_SCK}
    mosi_pin: ${ESP32_S3_SPI0_MOSI}
    miso_pin: ${ESP32_S3_SPI0_MISO}
    interface: hardware

ads131m08:
  id: highres_adc
  spi_id: spi_bus0
  cs_pin: ${ADC_CS_PIN}
  drdy_pin: ${ADC_DRDY_PIN}
  sync_reset_pin: ${ADC_SYNC_RESET_PIN}
  reference_voltage: 1.25
  data_rate: 10MHz
  clock_frequency: 8192kHz
  oversampling_ratio: 512

sensor:
  - platform: ads131m08
    ads131m08_id: highres_adc
    channel: 0
    id: ads_ch0
    gain: 1
    input_select: normal
    offset_calibration: 0
    gain_calibration: 0.986
    ac:
      name: "Channel 0 AC"
      id: ads_ch0_ac
    dc:
      name: "Channel 0 DC"
      id: ads_ch0_dc

  - platform: ads131m08
    ads131m08_id: highres_adc
    channel: 1
    id: ads_ch1
    gain: 1
    input_select: normal
    offset_calibration: 0
    gain_calibration: 0.986
    ac:
      name: "Channel 1 AC"
      id: ads_ch1_ac
      accuracy_decimals: 6
      state_class: measurement
      device_class: voltage
    dc:
      name: "Channel 1 DC"
      id: ads_ch1_dc
      accuracy_decimals: 6
      state_class: measurement
      device_class: voltage

For more information, visit the ESPHome documentation.