Skip to content

Commit

Permalink
Expose MAX31865 50Hz Filter setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbro committed Jul 3, 2021
1 parent c3f4343 commit 5a1f5b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,9 @@
#define DUMMY_THERMISTOR_998_VALUE 25
#define DUMMY_THERMISTOR_999_VALUE 100

// Number of probe wires, and resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
//#define MAX31865_SENSOR_WIRES_0 2 // Number of wires the connected probe uses, 2-4 (default: 2)
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
//#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
//#define MAX31865_SENSOR_WIRES_1 2
//#define MAX31865_SENSOR_OHMS_1 100
//#define MAX31865_CALIBRATION_OHMS_1 430

Expand Down
11 changes: 6 additions & 5 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@
* Configuration options for MAX Thermocouples (-2, -3, -5).
* FORCE_HW_SPI: Ignore SCK/MOSI/MISO pins and just use the CS pin & default SPI bus.
* MAX31865_WIRES: Set the number of wires for the probe connected to a MAX31865 board, 2-4. Default: 2
* MAX31865_50HZ: Enable 50Hz filter instead of the default 60Hz.
*/
//#define TEMP_SENSOR_FORCE_HW_SPI
//#define MAX31865_SENSOR_WIRES_0 2
//#define MAX31865_SENSOR_WIRES_1 2
//#define MAX31865_50HZ_FILTER


//
// Hephestos 2 24V heated bed upgrade kit.
// https://store.bq.com/en/heated-bed-kit-hephestos2
//
/**
* Hephestos 2 24V heated bed upgrade kit.
* https://store.bq.com/en/heated-bed-kit-hephestos2
*/
//#define HEPHESTOS2_HEATED_BED_KIT
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#undef TEMP_SENSOR_BED
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,9 @@ void Temperature::init() {
MAX31865_CALIBRATION_OHMS_0,
MAX31865_WIRES(MAX31865_SENSOR_WIRES_0) // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE
);
#ifdef MAX31865_50HZ_FILTER
max31865_0.enable50HzFilter(1);
#endif
#endif

#if TEMP_SENSOR_IS_MAX(1, 6675) && HAS_MAX6675_LIBRARY
Expand All @@ -2096,6 +2099,9 @@ void Temperature::init() {
MAX31865_CALIBRATION_OHMS_1,
MAX31865_WIRES(MAX31865_SENSOR_WIRES_1)
);
#ifdef MAX31865_50HZ_FILTER
max31865_1.enable50HzFilter(1);
#endif
#endif
#undef MAX31865_WIRES
#undef _MAX31865_WIRES
Expand Down

0 comments on commit 5a1f5b9

Please sign in to comment.