components/ads131m08
2026-05-04 00:45:29 +02:00
..
sensor Fixed osr calculation. Added DC block. With OSR = 512, sps = 8k, however noise is higher with values swinging wildly 2026-05-04 00:45:29 +02:00
sensor_rms Publishing directly to sensors from component (hub) loop. Appears to be aorund 4000sps. DC stable, but AC still fluctuating a lot. 20ms sample time. Will try loop sampling instead of ISR sampling next. 2026-05-03 00:06:23 +02:00
__init__.py adding to local git repo 2026-05-01 15:36:27 +02:00
ads131m08_defs.h Fixed osr calculation. Added DC block. With OSR = 512, sps = 8k, however noise is higher with values swinging wildly 2026-05-04 00:45:29 +02:00
ads131m08.cpp Fixed osr calculation. Added DC block. With OSR = 512, sps = 8k, however noise is higher with values swinging wildly 2026-05-04 00:45:29 +02:00
ads131m08.h Fixed osr calculation. Added DC block. With OSR = 512, sps = 8k, however noise is higher with values swinging wildly 2026-05-04 00:45:29 +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.