Adding support for MAX31856 Thermocouple Temperature Sensor (feature #700)

This commit is contained in:
declanshanaghy 2020-05-24 15:49:47 -07:00 committed by GitHub
parent 5c72d16a14
commit ab6de0fb7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 73 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
_build
.DS_Store
.python-version
__pycache__/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 KiB

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,69 @@
MAX31856 Thermocouple Temperature Sensor
========================================
.. seo::
:description: Instructions for setting up MAX31856 Thermocouple temperature sensors.
:image: max31865.png
The ``MAX31856`` temperature sensor allows you to use your MAX31856 Thermocouple
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf>`__) with ESPHome
.. figure:: images/max31865-full.jpg
:align: center
:width: 50.0%
MAX31856 Sensor. Image by `Adafruit`_
.. _Adafruit: https://www.adafruit.com/product/3263
As the communication with the MAX31856 is done using SPI, you need
to have an :ref:`spi bus <spi>` in your configuration with both **miso_pin** and **mosi_pin** set.
- ``VIN`` connects to 5V (``3V3`` will output 3.3V), or directly connect ``3V3`` to 3.3V
- ``3Vo`` is not used by ESPHome
- ``GND`` connects to ground
- ``CLK`` connects to the SPI **clk_pin**
- ``SDO`` connects to the SPI **miso_pin**
- ``SDI`` connects to the SPI **mosi_pin**
- ``CS`` connects to a free GPIO pin
- ``FLT`` is not used by ESPHome
- ``DRDY`` is not used by ESPHome
.. code:: yaml
# Example configuration entry
spi:
clk_pin: GPIO18
miso_pin: GPIO19
mosi_pin: GPIO23
sensor:
- platform: MAX31856
name: "BBQ Temperature"
icon: "mdi:hamburger"
cs_pin: GPIO17
Configuration variables:
------------------------
- **name** (**Required**, string): The name for the temperature sensor.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Chip Select pin of the SPI interface.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **mains_filter** (*Optional*, string): The mains power frequency to reject (``50 Hz`` or ``60 Hz``). Defaults to ``60 Hz``.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------
- :ref:`sensor-filters`
- :doc:`dallas`
- :doc:`dht`
- :doc:`adc`
- :doc:`max6675`
- :doc:`max31855`
- :doc:`max31865`
- `MAX31856 Library <https://github.com/adafruit/Adafruit_MAX31856>`__ by `Adafruit <https://www.adafruit.com/>`__
- :apiref:`MAX31856/MAX31856.h`
- :ghedit:`Edit`

View File

@ -20,6 +20,7 @@ As the communication with the MAX31865 is done using SPI, you need
to have an :ref:`spi bus <spi>` in your configuration with both **miso_pin** and **mosi_pin** set.
- ``VIN`` connects to 5V (``3V3`` will output 3.3V), or directly connect ``3V3`` to 3.3V
- ``3Vo`` is not used by ESPHome
- ``GND`` connects to ground
- ``CLK`` connects to the SPI **clk_pin**
- ``SDO`` connects to the SPI **miso_pin**
@ -65,6 +66,7 @@ See Also
- :doc:`adc`
- :doc:`max6675`
- :doc:`max31855`
- :doc:`max31856`
- `MAX31865 Library <https://github.com/adafruit/Adafruit_MAX31865>`__ by `Adafruit <https://www.adafruit.com/>`__
- :apiref:`max31865/max31865.h`
- :ghedit:`Edit`

BIN
images/max31856.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -125,6 +125,7 @@ Sensor Components
HTU21D, components/sensor/htu21d, htu21d.jpg
HM3301, components/sensor/hm3301, hm3301.jpg
MAX31855, components/sensor/max31855, max31855.jpg
MAX31856, components/sensor/max31856, max31856.jpg
MAX31865, components/sensor/max31865, max31865.jpg
MAX6675, components/sensor/max6675, max6675.jpg
MH-Z19, components/sensor/mhz19, mhz19.jpg