Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    PWM frequencies higher than 1Khz?

    Scheduled Pinned Locked Moved Solved
    Documentation
    2
    4
    187
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zaptaundefined
      zapta
      last edited by zapta

      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.27

      M308 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.

      zaptaundefined 1 Reply Last reply Reply Quote 0
      • zaptaundefined
        zapta @zapta
        last edited by

        ... 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

        droftartsundefined 1 Reply Last reply Reply Quote 2
        • Phaedruxundefined Phaedrux moved this topic from General Discussion
        • droftartsundefined
          droftarts administrators @zapta
          last edited by

          @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

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          zaptaundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined droftarts marked this topic as a question
          • droftartsundefined droftarts has marked this topic as solved
          • zaptaundefined
            zapta @droftarts
            last edited by

            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).

            1b585080-2341-42c4-8140-4e46a55979eb-image.png

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA