marketslmka.blogg.se

Pwm fan controller
Pwm fan controller









pwm fan controller

I've provided some defaults for the algorithm that should basically work. It also requires some tuning for different fans. It would be more accurate to say it dramatically reduces jitter, eliminating it in most situations. Note that this code can still encounter situations where it will result in jitter, especially when setting the RPM significantly below the minimum operating RPM. The basic operating theory of the code is to continuously sample the RPM, and then adjust the duty cycle upward or downward until the target RPM is hit, or is close enough that trying to get closer would cause jitter. It also needs to be fairly graceful, avoiding jitter which is cycling between the nearest lower value and nearest higher value when it can't land right on the target. So, to that end, we need something adaptive in order to hit a target RPM. If you obstruct the airflow you'll notice that the fan's RPM changes even if the signal stays the same. Hardware doesn't necessarily behave the same device to device, or sometimes over time the device characteristics can change, in addition to the variance caused by environmental factors. You can purchase widely available PC chassis fans that have this feature, and that's what I tested this code with - specifically a Noctua NF-A14.

pwm fan controller

Mainly, we'll be covering 4 pin fans that have a tachometer. This is to ensure a best effort attempt at achieving the target RPM. The code needed to control for environmental conditions and hardware variance that can influence the response curve of the fan with respect to the PWM duty cycle versus the RPM response. I needed some code to control a 12 volt fan with a 5 volt PWM input and a 5 volt tachometer output.











Pwm fan controller