<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Why high frequency PWM?</title>
        <description> So I was on the Gen7 forum topic with Traumflug and we were both wondering why all the firmwares seem to be moving to high frequency PWM for heater control. This tends to make selection of FET&#039;s more difficult and more expensive, not to mention all the electrical noise you are injecting into the system using high power high frequency signals. So the question is what are the benefits to kHz PWM? Would PWM at a few tens of Hz accomplish the lions share of stabilizing temps without the baggage for the electronics designers?</description>
        <link>https://reprap.org/forum/read.php?147,80433,80433#msg-80433</link>
        <lastBuildDate>Fri, 14 Aug 2026 08:52:36 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,81505#msg-81505</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,81505#msg-81505</link>
            <description><![CDATA[ I use PWM (at 100Hz) on my heater output (including my modified Klimentkip) because I'm using a 19.5V Dell laptop PSU with a standard 6 ohm MakerGear heatcore (nichrome wire).  I need to limit the total dissipation to 38% ( (12/19.5)^2 ).  This is pretty easy to accomplish in FiveD and Teacup and it's why I had to add PWM to Klimentkip before I could try it.<br />
<br />
100Hz cycling should not be a challenge to a FET.<br />
<br />
BTW I also read the temp sensor at 100Hz but average it over 100 samples (1s) for M105 output.  The PID runs at 100Hz because it's possible to choose reasonably scaled constants at that speed and the net effect averages out the noise in Gen6 just like using the averaged value but without feeling like I have to verify the stability of the double integrator.]]></description>
            <dc:creator>BenJackson</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Wed, 20 Apr 2011 18:40:55 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80581#msg-80581</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80581#msg-80581</link>
            <description><![CDATA[ bryanandaimee Wrote:<br />
-------------------------------------------------------<br />
&gt; Sounds good, and is the PID control frequency also<br />
&gt; configurable, or would that be a firmware change?<br />
<br />
find next_read_time in temp.c:220. This controls how often sensors are polled, in 10ms units. It defaults to zero for thermistors. Set it to 100 for 1hz read. PID is calculated once every time the sensor is read, so this also controls PID frequency.]]></description>
            <dc:creator>Triffid_Hunter</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 21:28:06 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80579#msg-80579</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80579#msg-80579</link>
            <description><![CDATA[ PWM is set up in mendel.c line 145ff and heater_init() in heater.c. As far as I can see at a quick glance, the prescaler is unused, so PWM frequency is at the 62.5 kHz default. An ATmega reference manual will tell how low one can go with with the prescaler, or wether software-PWM is required for 10/100Hz.]]></description>
            <dc:creator>Traumflug</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 21:04:50 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80574#msg-80574</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80574#msg-80574</link>
            <description><![CDATA[ Sounds good, and is the PID control frequency also configurable, or would that be a firmware change?]]></description>
            <dc:creator>bryanandaimee</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 20:07:15 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80572#msg-80572</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80572#msg-80572</link>
            <description><![CDATA[ bryanandaimee Wrote:<br />
-------------------------------------------------------<br />
&gt; would it work to sample at say 1 or 2 Hz<br />
&gt; and then run the PWM at 10 or 20 Hz?<br />
<br />
yep sure that should work fine, let us know how it goes :)]]></description>
            <dc:creator>Triffid_Hunter</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 20:02:40 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80570#msg-80570</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80570#msg-80570</link>
            <description><![CDATA[ OK, so I understand that the PID function needs to be able to control the PWM each time it wants to change control output, so the PWM frequency must be at least equal to the PID control frequency (not necessarily equal to the sampling rate) and the PWM frequency should also be different than the sampling rate to minimize interference.   From Nophead's comment, it seems that there are a few alternatives. <br />
<br />
1. keep the 100 Hz sampling rate but time average the samples down to say a few Hz and run the PID at that frequency. The PWM could then be run at 10x that or a few tens of Hz. <br />
<br />
2. Drop the sampling rate down to a few Hz and run 20 or 30Hz PWM. <br />
<br />
comments?]]></description>
            <dc:creator>bryanandaimee</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 19:29:57 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80460#msg-80460</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80460#msg-80460</link>
            <description><![CDATA[ Thermistors have a time constant of a few seconds so not much point in reading at 100 Hz and certainly need no for high frequency PWM.]]></description>
            <dc:creator>nophead</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 04:54:13 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80453#msg-80453</guid>
            <title>Re: Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80453#msg-80453</link>
            <description><![CDATA[ We're reading the temp sensors at 100hz in teacup if you have thermistors, running the PWM  at that frequency would impact the temperature readings significantly. Running it lower doesn't make any sense and would piss off the PID, the only sensible option is up. Above a few hundred hertz it becomes audibly annoying until we reach 30khz or so. Feel free to alter the clock initiations in mendel.c for 1khz pwm if you like, that should work fine if you can handle the noise :)]]></description>
            <dc:creator>Triffid_Hunter</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 03:27:15 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?147,80433,80433#msg-80433</guid>
            <title>Why high frequency PWM?</title>
            <link>https://reprap.org/forum/read.php?147,80433,80433#msg-80433</link>
            <description><![CDATA[ So I was on the Gen7 forum topic with Traumflug and we were both wondering why all the firmwares seem to be moving to high frequency PWM for heater control. This tends to make selection of FET's more difficult and more expensive, not to mention all the electrical noise you are injecting into the system using high power high frequency signals. So the question is what are the benefits to kHz PWM? Would PWM at a few tens of Hz accomplish the lions share of stabilizing temps without the baggage for the electronics designers?]]></description>
            <dc:creator>bryanandaimee</dc:creator>
            <category>Firmware - experimental, borrowed, and future</category>
            <pubDate>Tue, 12 Apr 2011 00:03:22 -0400</pubDate>
        </item>
    </channel>
</rss>
