Change PWM freq to 25kHz
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
e6d928ef4e
commit
069e178966
@ -18,8 +18,8 @@ const MAX_TEC_I: f64 = 3.0;
|
||||
const MAX_USER_FAN_PWM: f64 = 100.0;
|
||||
const MIN_USER_FAN_PWM: f64 = 1.0;
|
||||
const MAX_FAN_PWM: f64 = 1.0;
|
||||
// below this value motor circuit assumes there is no signal and runs full speed
|
||||
const MIN_FAN_PWM: f64 = 0.02;
|
||||
// below this value motor's autostart feature may fail
|
||||
const MIN_FAN_PWM: f64 = 0.04;
|
||||
|
||||
const DEFAULT_K_A: f64 = 1.0;
|
||||
const DEFAULT_K_B: f64 = 0.0;
|
||||
|
@ -226,11 +226,9 @@ impl Pins {
|
||||
hclk: clocks.hclk(),
|
||||
};
|
||||
|
||||
// Though there is not enough evidence available for concrete fan model,
|
||||
// it is generally advised to have higher PWM frequencies for brushless motors,
|
||||
// so that it would produce less audible noise.
|
||||
// Source: https://www.controleng.com/articles/understanding-the-effect-of-pwm-when-controlling-a-brushless-dc-motor/
|
||||
let fan = Timer::new(tim8, &clocks).pwm(gpioc.pc9.into_alternate(), 80u32.khz());
|
||||
// According to `SUNON DC Brushless Fan & Blower(255-E)` catalogue p.36-37
|
||||
// Model name: MF35101V1-1000U-G99
|
||||
let fan = Timer::new(tim8, &clocks).pwm(gpioc.pc9.into_alternate(), 25u32.khz());
|
||||
|
||||
(pins, leds, eeprom, eth_pins, usb, fan)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user