PWM frequencies higher than 1Khz?
-
I am trying to set the PWM frequency of heater 1 (nozzle) to 5Khz using M950 Q5000, but am getting only 1Khz, as measured with an oscilloscope. Am I missing something?
Board: Duet 3 Mini 5+ (Mini5plus)
Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.4.6 (2023-07-21)
Duet WiFi Server Version: 1.27M308 S1 A"Nozzle" P"temp1" Y"thermistor" T100000 B4725 C7.060000e-8 ; Define temp sensor 1 (Revo) M950 H1 C"out1" T1 Q5000 ; Define heater at out1 and controlled by temp sensor 1 M307 H1 B0 R4.199 C119.5:100.0 D1.74 S1.00 ; PID parameters M143 H1 S260 ; Max temp 260C
EDIT: Are the heaters PWM frequencies available in the object model plugin? I could not find any.
-
... found this line. I understand the need to limit the high current switching. I suggest to mention it in the M950 documentation.
constexpr PwmFrequency MaxHeaterPwmFrequency = 1000; // maximum supported heater PWM frequency, to avoid overheating the mosfets
https://github.com/Duet3D/CANlib/blob/d2210cd9cdde4e40c4c575b273b58ddc75600b91/src/RRF3Common.h#L92
-
-
@zapta Thanks, I've updated M950 in the Gcode dictionary. Going back through the history of CANlib and then configuration.h, it seems this has been a limit for a long time, at least back to RRF 2.03, which is as far as I went back. I think in RRF 1.x and 2.x it was set by the F parameter in M307, but there's no mention of this limit, or the default, in the M307 Gcode dictionary entry.
Ian
-
-
-
Thanks @droftarts. 1Khz is high enough for my use case. I wanted to measure the power of my Revo 40W and higher PWM frequencies makes it easier with the RMS to DC integration.
BTW, in my system, with 24V supply, Duet Min 5+, and Revo 40W, the average power during the 100% PWM phase of warming to 245C, is only 25.5W. This is due to the intentional increase of resistance with temperature (PTC).