Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.45k stars 5.3k forks source link

Read Duet Ethernet MCU and Stepper temps. #3255

Closed paulhew69 closed 4 years ago

paulhew69 commented 4 years ago

I have been through the list of Pins at the top of the Duet-Duex config file and am unable to see any reference to temps for the MCU and Steppers, as I would like to view them on MainSail. RRF uses 'virtual heaters' 100 for the MCU temp and 101, 102 for the steppers.

DC42 replied 'The sensor is built into the microcontroller, so it doesn't use a pin', when I asked him about Logical pins.

Can these be read please?

Kind Regards,

Paul klippy.log

paulhew69 commented 4 years ago

Someone kindly left a further comment on my info request.


echo boards[0].mcuTemp.current```

Have no idea how to implement this.
KevinOConnor commented 4 years ago

Many micro-controllers do implement a temperature sensor within the micro-controller. However, Klipper doesn't currently support reading from these sensors. It would require an interested developer to take that on (it will require both C micro-controller code and a little bit of Python host code).

The tmc2660 stepper motor drivers does not supply a temperature. It only has two flags: a "very hot warning" and a "shutdown due to heat".

-Kevin

paulhew69 commented 4 years ago

OK, I cannot write C or Python, so i will not even try!

Appreciate the prompt response Kevin.

KevinOConnor commented 4 years ago

FYI - there is preliminary support for this up at #3407 . I don't have a sam4e micro-controller, so I haven't been able to confirm support on that chip. (I have tested it on my sam4s chip (Duet2 Maestro).) If you do run a test, let me know the results (success or failure).

-Kevin