Alessandro Polselli
Published © Apache-2.0

Smart Pellet Stove: a wood pellets heating system made smart

How to innovate a pellet stove for remote monitoring, control and home automation integration with ESPHome, an ESP32, sensors and relay

IntermediateFull instructions provided4 hours5,925
Smart Pellet Stove: a wood pellets heating system made smart

Things used in this project

Hardware components

ATOM Matrix ESP32 Development Kit
M5Stack ATOM Matrix ESP32 Development Kit
×1
Mini 3A Relay Unit
M5Stack Mini 3A Relay Unit
×1
Adafruit Waterproof DS18B20 Digital temperature sensor
Adafruit Waterproof DS18B20 Digital temperature sensor
×1
Maxim Integrated MAX6675 K Type Thermocouple
×1
Maxim Integrated Current Transformer (CT) Clamp sensor
×1

Software apps and online services

Home Assistant
Home Assistant
ESPHome

Story

Read more

Schematics

M5Stack Atom Matrix / Lite pinout

ESP32 development board with sensors attached

Code

smart-pellet-stove.yaml

YAML
This is the YAML file to build the ESPHome firmware for the Smart Pellet Stove
substitutions:
  devicename: smart-pellet-stove
  upper_devicename: Smart Pellet Stove

esphome:
  # This will allow for (future) project identification,
  # configuration and updates.
  project:
    name: apolselli.${devicename}
    version: "2.2"
    
packages:
  m5atom: !include m5atom-common.yaml

# Enable Home Assistant API
api:

web_server:

# MAX6675
spi:
  miso_pin: GPIO23
  clk_pin: GPIO22
  
# DS18B20
dallas:
  - pin: GPIO21
    update_interval: 5s

sensor:
  - platform: max6675
    name: $upper_devicename Smoke Temperature
    cs_pin: GPIO19
    update_interval: 5s

  - platform: dallas
    index: 0
    name: $upper_devicename Water Temperature

  - platform: ct_clamp
    sensor: adc_sensor
    id: current1
    name: $upper_devicename Motor Current
    update_interval: 2s
  - platform: adc
    pin: GPIO33
    id: adc_sensor

binary_sensor:
  - platform: template
    name: $upper_devicename Feeding
    id: feeding1
    lambda: |-
      return id(current1).state > 0.27;
    filters:
      - delayed_off: 15s

switch:
  - platform: gpio
    pin:
      number: GPIO26
    name: $upper_devicename Relay
    id: relay1
    on_turn_on:
      - delay: 8s
      - switch.turn_off: relay1

m5atom-common.yaml

YAML
This is a "common" YAML for M5Stack Atom ESP32 devices that sets boilerplate definitions and pinouts: it is included by the Smart Pellet Stove YAML, but can be re-used for any other ESPHome project built for the same platform
esphome:
  name: ${devicename}
  comment: ${upper_devicename}
  platform: ESP32
  board: m5stack-atom
  platformio_options:
    upload_speed: 115200

# Enable logging
logger:

ota:

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap: {}

# In combination with the `ap` this allows the user
# to provision wifi credentials to the device.
captive_portal:

# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
#esp32_improv:
#  authorizer: none

sensor:
  - platform: wifi_signal
    name: ${upper_devicename} WiFi Signal
  - platform: uptime
    name: ${upper_devicename} Uptime

button:
  - platform: restart
    name: ${upper_devicename} Restart

switch:
  - platform: safe_mode
    name: ${upper_devicename} Restart (Safe Mode)

Credits

Alessandro Polselli

Alessandro Polselli

3 projects • 16 followers

Comments