Multiple MCU Temp Monitoring

I'm currently working on configuring temperature sensors for multiple MCUs in Klipper to monitor temperatures on all the devices on my printer. However, I'm having trouble getting the sensors to work for all three MCUs, raspberry_pi, XBRD, and ZBRD.

I've tried various configurations, but can only get readings from the first MCU. Whenever I try to configure temperature sensors for the other MCUs, I receive errors indicating a bad configuration. One specific error message I've received is 'pin ADC_TEMPERATURE used multiple times in config.'

I've also tried using different variations of code to configure temperature sensors for each board, but haven't had much luck. While I was able to get a temperature reading for the ZBRD MCU, I'm unsure if it's showing the correct board.

Can anyone suggest a way I can properly configure temperature sensors for all three MCUs in Klipper? Unfortunately, I can't find the pin for the MCU temp.

This is some of what I've tried:

[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100 

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

[temperature_sensor XBRD_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

[temperature_sensor ZBRD_temp]
sensor_type: temperature_host
min_temp: 0
max_temp: 100

Posted Mar 12, 2023, 8:45 PM UTC

15
DopeBoogie•

Like this:

[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100 

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
sensor_mcu: mcu
min_temp: 0
max_temp: 100

[temperature_sensor XBRD_temp]
sensor_type: temperature_mcu
sensor_mcu: XBRD
min_temp: 0
max_temp: 100

[temperature_sensor ZBRD_temp]
sensor_type: temperature_mcu
sensor_mcu: ZBRD
min_temp: 0
max_temp: 100

As shown in the Config Reference

In addition to needing to specify the sensor_mcu, you also had the last one set to:

sensor_type: temperature_host

instead of:

sensor_type: temperature_mcu
2
MatrixTekOP•

I will certainly test this. The most promising thing I've seen.

1
DopeBoogie•

How'd it go?

I mean I know what I wrote is valid, but I made some assumptions about your mcu names.

And it's always nice to hear if things worked out

2
MatrixTekOP•

F'n worked great. Thank you so much. I used what you wrote and gave it to the guy who asked me the question on a support channel. So we are both thrilled.

Again Thank you.

1
DopeBoogie•

Awesome, glad it worked out :)

2
lesfb•

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
sensor_mcu: mcu
min_temp: 0
max_temp: 100

thank you so much added a bttpico to my v400 and this worked perfectly

1
OldFartButt•

Thanks guy, I'm using these parts in my .cfg

1