SPS30 Particulate Matter Sensor

The sps30 sensor platform allows you to use your Sensirion SPS30 (datasheetExternal link) sensors with ESPHome. The I²C Bus is required to be set up in your configuration for this sensor to work. This sensor supports both UART and I²C communication. However, at the moment only I²C communication is implemented.

SparkfunExternal link

# Example configuration entry
sensor:
  - platform: sps30
    pm_1_0:
      name: "Workshop PM <1µm Weight concentration"
      id: "workshop_PM_1_0"
    pm_2_5:
      name: "Workshop PM <2.5µm Weight concentration"
      id: "workshop_PM_2_5"
    pm_4_0:
      name: "Workshop PM <4µm Weight concentration"
      id: "workshop_PM_4_0"
    pm_10_0:
      name: "Workshop PM <10µm Weight concentration"
      id: "workshop_PM_10_0"
    pmc_0_5:
      name: "Workshop PM <0.5µm Number concentration"
      id: "workshop_PMC_0_5"
    pmc_1_0:
      name: "Workshop PM <1µm Number concentration"
      id: "workshop_PMC_1_0"
    pmc_2_5:
      name: "Workshop PM <2.5µm Number concentration"
      id: "workshop_PMC_2_5"
    pmc_4_0:
      name: "Workshop PM <4µm Number concentration"
      id: "workshop_PMC_4_0"
    pmc_10_0:
      name: "Workshop PM <10µm Number concentration"
      id: "workshop_PMC_10_0"
    pm_size:
      name: "Typical Particle size"
      id: "pm_size"
    address: 0x69
    update_interval: 10s

Configuration variables: Copy link to header

  • pm_1_0 (Optional): The information for the Weight Concentration sensor for fine particles up to 1μm. Readings in µg/m³.

  • pm_2_5 (Optional): The information for the Weight Concentration sensor for fine particles up to 2.5μm. Readings in µg/m³.

  • pm_4_0 (Optional): The information for the Weight Concentration sensor for coarse particles up to 4μm. Readings in µg/m³.

  • pm_10_0 (Optional): The information for the Weight Concentration sensor for coarse particles up to 10μm. Readings in µg/m³.

  • pmc_0_5 (Optional): The information for the Number Concentration sensor for ultrafine particles up to 0.5μm. Readings in particles/cm³.

  • pmc_1_0 (Optional): The information for the Number Concentration sensor for fine particles up to 1μm. Readings in particles/cm³.

  • pmc_2_5 (Optional): The information for the Number Concentration sensor for fine particles up to 2.5μm. Readings in particles/cm³.

  • pmc_4_0 (Optional): The information for the Number Concentration sensor for coarse particles up to 4μm. Readings in particles/cm³.

  • pmc_10_0 (Optional): The information for the Number Concentration sensor for coarse particles up to 10μm. Readings in particles/cm³.

  • pm_size (Optional): Typical particle size in μm.

  • auto_cleaning_interval (Optional): The interval in seconds of the periodic fan-cleaning.

  • address (Optional, int): Manually specify the I²C address of the sensor. Defaults to 0x69.

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

Wiring Copy link to header

The sensor has a 5 pin JST ZHR type connector, with a 1.5mm pitch. (Matching connector housingExternal link, datasheetExternal link) To force the sensor into I²C mode, the SEL pin (Interface Select, pin no.4) should be shorted to ground (pin no.5)

For better stability, the SDA and SCL lines require suitable pull-up resistors. Sensirion shows 10 kΩ resistors between VDD (5V, pin no.1) and SDA (pin no.2) and SCL (pin no.3) in the manual.

Automatic Cleaning Copy link to header

The SPS30 sensor has an automatic fan-cleaning which will accelerate the built-in fan to maximum speed for 10 seconds in order to blow out the dust accumulated inside the fan. The default automatic-cleaning interval is 168 hours (1 week) of uninterrupted use. Switching off the sensor resets this time counter. Disabling of automatic-cleaning or setting a manual interval is not supported at the moment.

Manual Cleaning Copy link to header

This action manually starts fan-cleaning.

on_...:
  then:
    - sps30.start_fan_autoclean: my_sps30

To be able to trigger the fan cleaning feature from Home Assistant, add a button as shown below, and trigger it with a (periodic) automation.

button:
  - platform: template
    name: "SPS30 fan clean"
    on_press:
      then:
        - sps30.start_fan_autoclean: my_sps30

sensor:
  - platform: sps30
    id: "my_sps30"
    ...

Sensirion recommends cleaning at least once per week.

See Also Copy link to header

CURRENT