Short:
- Question: How do you configure BTT EBB36 v1.2 with MAX31865 to accurately, reliably measure temp from NTC100K thermistor like the one in a BIQU H2 V2S Revo. Asked for my V1 Engineering MP3DP v4 Repeat build.
- Answer: Don’t. Use TH0 connector instead. MAX31865 is NOT meant for NTC100K thermistors. MAX31865 is meant for platinum based PT100 and PT1000 thermistors/thermo-couples, @Sineos’s posts has details.
Long:
Anyone able to share working config using MAX31865 on EBB36-v1.2, ideally with BIQU H2 V2S Revo, or some other 40W Revo hotend? Cheers!
Basic Information:
Printer Model: V1 Engineering MP3DP v4 Repeat
MCU / Printerboard: Octopus v1.1, EBB36 v1.2 with MAX31865, BIQU H2 V2S Revo Extruder
klippy.log (uploaded to github, pasted fragment at end of this post)
Shared my printer.cfg on github.
60 sec build montage. Tagged by 3D printing legends at the end…
Describe your issue:
Start fails with Klipper reports: SHUTDOWN, MCU ‘EBBCan’ shutdown: Thermocouple reader fault
Klippy log contains… MCU ‘EBBCan’ shutdown: Thermocouple reader fault, log line above has Fault = 129
-
Config :
- Usable : 250x250x250mm
- Controller : BTT Octopus v1.1
- CanBus-Expansion : BTT EBB36-v1.2 with MAX31865 and ADXL345
- Extruder-HotEnd : BIQU H2 V2S Revo Extruder
- Spec says Thermistor Type : Semitec 104NT-4-R025H42G(NTC100K)
- Probe : ANTCLABS BLTouch Auto Bed Leveling Sensor v3.1
-
MAX31865 Klipper settings are not mentioned in EBB User Manual @ EBB/EBB CAN V1.1 (STM32G0B1)/EBB36 CAN V1.1/BIGTREETECH EBB36 CAN V1.1 User Manual.pdf at master · bigtreetech/EBB · GitHub
- MAX31865 related content from User Manual…
- MAX31865 related content from User Manual…
-
Found some MAX31865 related setttings in an BTT’s EBB repo @ EBB/EBB CAN V1.1 (STM32G0B1)/sample-bigtreetech-ebb-canbus-v1.2.cfg at master · bigtreetech/EBB · GitHub
sensor_type:MAX31865 sensor_pin: EBBCan: PA4 spi_bus: spi1 rtd_nominal_r: 100 rtd_reference_r: 430 rtd_num_of_wires: 2
-
Read Config_Reference.html#maxxxxxx-temperature-sensors and tried explicitly setting SPI pins instead of
spi_bus: spi1
, same result.sensor_type: MAX31865 sensor_pin: EBBCan: PA4 spi_software_sclk_pin: EBBCan: PA5 spi_software_miso_pin: EBBCan: PA6 spi_software_mosi_pin: EBBCan: PA7
-
Couldn’t find same/related issues in BTT’s EBB repo
- MAX31865 related issues @ Issues · bigtreetech/EBB · GitHub
- Open/Closed issues @ Issues · bigtreetech/EBB · GitHub
-
Tried verifying my understanding of temp settings by temporarily using
Generic 3950
and commenting out the Max31865 related settings. This works, but won’t be as accurate I guess. Am even considering using that as a work around if I can’t figure out the correct magic combination of Max31865 settings needed. Will requires moving 2 thermostat wires to EBB’s TH0 connector.sensor_type: Generic 3950 sensor_pin: EBBCan: PA3
Physical layout :
- Hard to see DIP switches, but they’re set to On,On,On,Off for 2 lines PT100
Fragment from klippy.log …
Receive: 93 37.930785 37.658936 17: seq: 1d, thermocouple_result oid=8 next_clock=2905037956 value=65535 fault=129
Receive: 94 38.021595 38.021319 8: seq: 1f, stepper_position oid=9 pos=0
Receive: 95 38.028713 38.024522 18: seq: 10, tmcuart_response oid=4 read=b'\n\xfaO-\x80\x00\x02\x08\xa5\xac'
Receive: 96 38.230834 38.024522 17: seq: 10, thermocouple_result oid=8 next_clock=2924237956 value=65535 fault=129
Receive: 97 38.492199 38.491783 11: seq: 12, clock clock=2921761932
Receive: 98 38.531265 38.491783 17: seq: 12, thermocouple_result oid=8 next_clock=2943437956 value=65535 fault=129
Receive: 99 38.532093 38.491783 12: seq: 12, shutdown clock=2924240736 static_string_id=Thermocouple reader fault
Transition to shutdown state: MCU 'EBBCan' shutdown: Thermocouple reader fault
Dumping gcode input 0 blocks
gcode state: absolute_coord=True absolute_extrude=True base_position=[0.0, 0.0, 0.0, 0.0] last_position=[0.0, 0.0, 0.0, 0.0] homing_position=[0.0, 0.0, 0.0, 0.0] speed_factor=0.016666666666666666 extrude_factor=1.0 speed=25.0
Reactor garbage collection: (36.520441182, 0.0, 0.0)
MCU 'mcu' shutdown: Command request
clocksync state: mcu_freq=180000000 last_clock=8080895315 clock_est=(35.554 7686589297 180010647.809) min_half_rtt=0.000110 min_rtt_time=35.670 time_avg=35.554(0.236) clock_avg=7686589297.247(42500198.138) pred_variance=22402647097.532
Dumping serial stats: bytes_write=2683 bytes_read=6461 bytes_retransmit=0 bytes_invalid=0 send_seq=232 receive_seq=232 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0
Dumping send queue 100 messages
static void
thermocouple_handle_max31865(struct thermocouple_spi *spi
, uint32_t next_begin_time, uint8_t oid)
{
uint8_t msg[4] = { MAX31865_RTDMSB_REG, 0x00, 0x00, 0x00 };
spidev_transfer(spi->spi, 1, 3, msg);
uint32_t value;
memcpy(&value, msg, sizeof(value));
value = (be32_to_cpu(value) >> 8) & 0xffff;
// Read faults
msg[0] = MAX31865_FAULTSTAT_REG;
msg[1] = 0x00;
spidev_transfer(spi->spi, 1, 2, msg);
uint8_t fault = (msg[1] & ~0x03) | (value & 0x0001);
thermocouple_respond(spi, next_begin_time, value, fault, oid);
}
...
static void
thermocouple_respond(struct thermocouple_spi *spi, uint32_t next_begin_time
, uint32_t value, uint8_t fault, uint8_t oid)
{
sendf("thermocouple_result oid=%c next_clock=%u value=%u fault=%c",
oid, next_begin_time, value, fault);
/* check the result and stop if below or above allowed range */
if (fault || value < spi->min_value || value > spi->max_value) {
spi->invalid_count++;
if (spi->invalid_count < spi->max_invalid)
return;
try_shutdown("Thermocouple reader fault");
}
spi->invalid_count = 0;
}
Cheers!
Edit: Digging through spec for fault codes/causes MAX31865 RTD-to-Digital Converter - Analog Devices https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31865.pdf (fault detection logic flow is described on p12). New to this, but maybe fault 129 == 0x81 is measured resistance being higher than threshold. Double checked DIP switches, and checked their continuity in on/off positions.