I was testing a Noctua NF-A4x20 PWM fan with Adafruit's EMC2101 breakout board and noticed that the fan speed maxes out at 5000 rpm already at a 75% manual fan speed setting:
I first thought this was a property of my fan, but reading the EMC2101 data sheet, I noticed:
The PWM Frequency RegisterPWM_F defaults to 0x17 after reset, not the maximum and recommended 0x1f.
The PWM duty cycle is determined by both the Fan Setting Register and the PWM_F register. From Appendix A: DUTY_CYCLE = FAN_SETTING / (PWM_F * 2) * 100%.
The manual_fan_speed property is using MAX_LUT_SPEED as a divisor instead of PWM_F * 2. This means that the actual PWM duty cycle reaches 100% at emc.fan_speed = PWM_F * 2 / MAX_LUT_SPEED which is about 73%, matching my graph.
The divisor in the manual_fan_speed functions should be PWM_F * 2 when running in PWM mode and 64 in DAC mode. This should also cause more trouble when setting the pwm_frequency property, although I haven't tried that yet.
I was testing a Noctua NF-A4x20 PWM fan with Adafruit's EMC2101 breakout board and noticed that the fan speed maxes out at 5000 rpm already at a 75% manual fan speed setting:
I first thought this was a property of my fan, but reading the EMC2101 data sheet, I noticed:
PWM_F
defaults to 0x17 after reset, not the maximum and recommended 0x1f.PWM_F
register. From Appendix A:DUTY_CYCLE = FAN_SETTING / (PWM_F * 2) * 100%
.The
manual_fan_speed
property is usingMAX_LUT_SPEED
as a divisor instead ofPWM_F * 2
. This means that the actual PWM duty cycle reaches 100% atemc.fan_speed = PWM_F * 2 / MAX_LUT_SPEED
which is about 73%, matching my graph.The divisor in the
manual_fan_speed
functions should bePWM_F * 2
when running in PWM mode and 64 in DAC mode. This should also cause more trouble when setting thepwm_frequency
property, although I haven't tried that yet.I'll put together a PR for this.