Skip to content

SPA06-003 Temperature+Pressure Sensor

The spa06 sensor platform allows you to use your Goertek SPA06-003 (datasheet, Adafruit or Seeed) temperature and pressure sensors with ESPHome. An I²C or SPI bus is required to be set up in your configuration for this sensor to work.

SPA06 Temperature and Pressure Sensor (Adafruit breakout).
# Example configuration entry for I2C connection
sensor:
- platform: spa06_i2c
temperature:
name: "Indoor Temperature"
pressure:
name: "Indoor Pressure"
# Example configuration entry for SPI connection
sensor:
- platform: spa06_spi
cs_pin: 12
temperature:
name: "Indoor Temperature"
pressure:
name: "Indoor Pressure"
  • temperature (Optional): The information for the temperature sensor.

    • oversampling (Optional): The oversampling rate for the temperature sensor. See Oversampling Options.

    • sample_rate (Optional): The internal sample rate for the temperature sensor See Sample Rate.

    • All other options from Sensor.

  • pressure (Optional): The information for the pressure sensor.

    • oversampling (Optional): The oversampling rate for the pressure sensor. See Oversampling Options.

    • sample_rate (Optional): The internal sample rate for the pressure sensor See Sample Rate.

    • All other options from Sensor.

  • update_interval (Optional, Time): The interval to check the sensor. Defaults to 60s.

  • address (Optional, int, I²C only): Manually specify the I²C address of the sensor. Defaults to 0x77. Another address can be 0x76.

  • cs_pin (Required, SPI only): Specify the chip select pin to use for this sensor.

  • i2c_bus (Optional, str) (I²C only): Manually specify the I²C bus to use, if your device has multiple I²C buses.

  • spi_bus (Optional, str) (SPI only): Manually specify the SPI bus to use, if your device has multiple SPI buses

By default, the SPA06 sensor oversamples pressure measurements by 16 and does not oversample temperature measurements. Higher oversampling rates can increase precision at the expense of slower update times and potentially higher current consumption. Possible oversampling values include:

  • NONE (sensor is sampled once, default for temperature)
  • 2x
  • 4x
  • 8x
  • 16x (default for pressure)
  • 32x
  • 64x
  • 128x

The datasheet (page 19) provides a table showing the tradeoff for oversampling:

Oversampling settingMeasurement Time (ms)Pressure Precision (PaRMS)
NONE3.62
2x5.21
4x8.40.7
8x14.80.6
16x27.60.5
32x53.20.4
64x104.40.3
128x206.80.2

The SPA06 can sample measurements as frequently as 200 samples per second and as infrequently as 1 sample per second. Note that if update_rate is a higher rate than the sensor sample rate, the sensor will report data from the previous reading. The full list of sample options are as follows:

  • 1: 1 Hz (default)
  • 2: 2 Hz
  • 4: 4 Hz
  • 8: 8 Hz
  • 16: 16 Hz
  • 32: 32 Hz
  • 64: 64 Hz
  • 128: 128 Hz
  • 25p16: 25 samples per 16 seconds (~1.56 Hz)
  • 25p8: 25 samples per 8 seconds (~3.13 Hz)
  • 25p4: 25 samples per 4 seconds (6.25 Hz)
  • 25p2: 25 samples per 2 seconds (12.5 Hz)
  • 25: 25 Hz
  • 50: 50 Hz
  • 100: 100 Hz
  • 200: 200 Hz

WARNING

The SPA06 sensor has a limit on the number of samples it can take per second, based on the oversampling and sample rate configuration for temperature and pressure sensors (datasheet page 26). Configured rates must meet the following equation:

1 > T_t * R_t + T_p * R_p

Where T_t is the equivalent measurement time for the configured temperature oversampling rate, R_t is the temperature update rate in hertz, T_p is the equivalent measurement time for the configured pressure oversampling rate, and R_p is the pressure update rate in hertz. If pressure is not configured, T_p*R_p is equal to 0.