I'm running Mega with Marlin firmware (as my 3d printer controller) which to my understanding has its PWM set to 1 kHz.
I want to control a 4-wire fan (Pfc0612de) with PWM from 30% to 100% and to reduce noise I've decided to use the manufacturer's recommended 25 kHz (I won't need to read the tacho). I think I won't need to worry about phase and only need to control the duty cycle and frequency(?)
After searching I came up with a couple of options but I don't know which is easier or more plausible so here I am
change Mega's timer :
I don't know If there are any unused timers by Marlin or not, and if there are, is it possible without affecting its other functionalities?
using a standalone driver with 25 kHz output like MAX31790 (which I can't source, any alternatives?) :
I'll have to send Marlin's fan control commands through I2c
using PLL frequency multiplier from 1 to 25 kHz :
3.1. 4046 with divide by 25 (2 MOD-5 7490) (0.3$ + 2x0.5$= 1.3$)
3.2. lm565 with divide by 25 (2 MOD-5 7490) (4$ + 2x0.5$= 5$) (don't know if it's any better or not)
I don't know if PLL preserves the duty cycle or not
using another MCU (Attiny85 or ATmega328) to read the 1 kHz PWM and generate 25 kHz accordingly (4$) :
with the same price as 3.2, I'll have unused pins for 2 more fans?
My thinking …. Your link is to a brushless motor , which must therefore have a built in speed controller . The PWM input , I think is just to speed control it and therefore
PWM frequency may not affect it at all . The data sheet allows for a very wide range of PWM.( 30-300kHz)
I assume you have connected the motor to a suitable steady 12v DC supply ( say 2A min) and an Arduino PWM pin ( “analog output” ) to the pwm wire , with a common ground between the Arduino and motor supply.
I’ve never changed PWM frequency and someone may be along to help , or google it
hey hammy
thanks for the quick response
yes, it has built-in speed control, and I can run it with 1 kHz as it supports 30-300k Hz.
my main concern is the noise it'll make so I wanted to use the recommended 25 kHz
and those options are the ones I came up with after googling it
It's pretty easy to adjust PWM frequency, Just need to determine the type of PWM needed and work through the steps.
Here is an excellent guide: Secrets of Arduino PWM
I need to achieve this without making fundamental changes to the code and its functionality as a 3d printer controller, that's why most of the options I came up with, are hardware.
of course, I'd prefer option 1 if it's possible as it has no additional cost, but ...