Will this work? Ultimaker Original with PT100 / MAX31865 on RPi 3+ GPIO6 (reddit crosspost)

Sorry, for the crosspost.

I had issues with the original K-type thermocouple running the config given here: Ultimaker Original config - need help - #4 by vp135

So I though, I’d try to use the RPi as an MCU as outlined in the various docs listed at the bottom of this post. I now have a PT100 / MAX31865 wired to the RPi 3+ on GPIO6.

However, in the log I get:

MCU 'host' error during config: Unable to open spi device

The config has:

[mcu]

serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_95238343234351600270-if00

restart_method: command

[mcu host]

serial: /tmp/klipper_host_mcu

As given in these docs:

https://github.com/KevinOConnor/klipper/blob/master/config/sample-raspberry-pi.cfg

https://www.klipper3d.org/RPi_microcontroller.html

One Github issue mentioned the RPi could be used as serial communication, but I could not find info on how to do that.

https://github.com/KevinOConnor/klipper/issues/2916#issuecomment-633605010

See Kevin’s comprehensive answer
:wink:

FYI, if you’re trying to use the SPI feature on the Raspberry Pi, you must also run sudo raspi-config and enable SPI under the “Interfacing options” menu. Finally, you would need to wire the spi device to GPIO08, GPIO09, GPIO10, GPIO11, and declare the device in the config with cs_pin: rpi:None.

There’s an example SPI config at https://www.klipper3d.org/Measuring_Resonances.html (though for a different device).

-Kevin

Thank you! With all the instructions, I got it working measuring. Next step is to install the sensor properly etc.

I got the sensor installed, but it seems the main board of the Ultimaker cuts off the heating if there is no signal from the original sensor. I think this is the case, because I am getting this error message:

 Heater extruder not heating at expected rate
See the 'verify_heater' section in docs/Config_Reference.md
for the parameters that control this check.

Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown
Klipper state: Not ready
18:08:58 Heater extruder not heating at expected rate

The heater used to heat fine with the original sensor. However, the old sensor did read ~20degC off. I also can hear something click once the heating process is supposed to start, but then the error occurs. And the error persists even when restarting OctoPrint.

Do you get a sensible reading from the sensor at room temperature? For a cold bed and cold extruder both sensors should show basically the same value (ambient temp).

Edit:
Please always attach a klippy.log showing the issue on every report

Yes, I pointed a heat gun at the sensor as it is installed in the extruder and the temperature rose accordingly.

As you wish. This is the log, right after I sent a command to heat to 180degC through the Octoprint temperature tab:

Edit, I tried to put the log, but the website complained:

Body is limited to 32000 characters; you entered 83430.

So, I put it here:

Easiest way is to just attach the log as a file to your post

From your log:

Heater extruder approaching new target of 180.000
extruder: target=180 temp=38.4 pwm=1.000
extruder: target=180 temp=38.4 pwm=1.000
extruder: target=180 temp=38.4 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.3 pwm=1.000
extruder: target=180 temp=38.2 pwm=1.000
extruder: target=180 temp=38.2 pwm=1.000
extruder: target=180 temp=38.2 pwm=1.000
extruder: target=180 temp=38.2 pwm=1.000
extruder: target=180 temp=38.2 pwm=1.000
extruder: target=180 temp=38.1 pwm=1.000
extruder: target=180 temp=38.1 pwm=1.000
extruder: target=180 temp=38.1 pwm=1.000
extruder: target=180 temp=38.1 pwm=1.000
Heater extruder no longer approaching target 180.000
Stats 687.0: gcodein=200 mcu: mcu_awake=0.002 mcu_task_avg=0.000034 mcu_task_stddev=0.000038 bytes_write=5848 bytes_read=16415 bytes_retransmit=0 bytes_invalid=5 send_seq=841 receive_seq=841 retransmit_seq=0 srtt=0.004 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=15986689 host: mcu_awake=0.004 mcu_task_avg=0.000051 mcu_task_stddev=0.000074 bytes_write=4889 bytes_read=52439 bytes_retransmit=0 bytes_invalid=0 send_seq=789 receive_seq=789 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=49998577 adj=50045052 sysload=0.00 cputime=15.621 memavail=706656 print_time=650.980 buffer_time=0.000 print_stall=0 extruder: target=180 temp=38.1 pwm=1.000
Heater extruder not heating at expected rate
Transition to shutdown state: Heater extruder not heating at expected rate
See the 'verify_heater' section in docs/Config_Reference.md
for the parameters that control this check.
  1. Klipper commands the heating to target temp 180 °C
  2. Klipper monitors if the temperature actually rises
  3. Temp stays at 38 °C
  4. Klipper throws an error that something is wrong with the heating

Possible causes:

  • Temperature probe not working → is the 38 °C correct?
  • Heater dead → Does the hotend actually get warm? Even during this short period you should feel the hotend heating up
  • Wrong pin assignment for the heater → Does the heater get power? With a multimeter you should be able to measure the voltage across your heater pins. With pwm=1.000 it should be 12 or 24 V (whatever your printer uses)

It takes a very short for the heater to go on and off. I can not feel anything in this short time frame. When the sensor was connected directly to the Ultimaker mainboard the heater worked fine.

38 is correct, that is just after I tried the heat gun test.

As above, I suspect, it has nothing to do with Klipper, but it is something the Ultimaker hardware does?

I have no experience with this board so everything weird may be possible. Although I do not think so: You have flashed Klipper to your board, so the “intelligence” of the board is the Klipper firmware, which controls heating pins and other periphery. I would be surprised if the board contained some obscure hardware protection.

Try:
sensor_pin = host:None
instead of
sensor_pin = host:gpio6

What are you hoping to establish with that setting?

Log attached.
klippy.log (211.8 KB)

Well, apparently there is a disconnect between the temperature measurement that Klipper “knows” and what your board thinks it should do.

One last idea would be to “fake” a PT100 on your board. Shorten the relevant pins with a 100 Ohm plus a 10 Ohm resistor in series. This would simulate around 26 °C.
If your heater then works then the board really has some strange hardware protection.