-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pwm at 25Khz #17
Comments
Please clarify your question. |
I solved the problem using this code `#define PWM_PERIOD 125000 #define PWM_CHANNELS 3 // PWM setup (choice all pins that you use PWM) uint32 io_info[PWM_CHANNELS][3] = { Thanks |
hi there, i tried to run a 4 wire pwm fan which needs 25khz pwm signal... without success..
the code i tried was this void setup() { // PWM setup // initial duty: all off pwm_init(period, pwm_duty_init, PWM_CHANNELS, io_info); void loop() { i copierd the pwm.h from the arduino folder to my project folder, also the pwm.c from the git repo result: fan didnt care about the set duty cycles .. doesnt matter what i set... the only thing i recognized was, if a wire up the pin to pwm it reduces the speed a little bit... buts thats it... any ideas... what did i miss ?! Thanks |
hi @2bedom any luck sorting your problem out? I think the period needs to be smaller, not bigger. eg the example states a period of 256 (8 bit res) for 19khz. So maybe try 128 but maybe that would be too fast? I am about to experiment with this as well, i'll post results soon as I get the hardware together. My fans are 24v and on an isolated ground, so I need to find an opto coupler to drive the pwm input with a 3.3v signal. |
@gordonthree yes i was .. i am using the wemos d1 mini , all worked fine i had 2 things to deal with... one was my own stupidity. 1.) my fan had a pwm range from 300rpm-1700rpm so setting the duty to zero will never stop him :) so now iam using a noctua pwm fan, common ground and everything worked fine .. |
25kHz is 1/25000 seconds, i.e. 40 microseconds or 40000 nanoseconds. Thus the correct period for 25kHz is: period * ticktime = 40000 |
@StefanBruens hmm seems to be clear ... but why does my 125000 work Oo ? i setthe duty in 10k steps from 10k to 125k ... so if i switch to 200 period i'll have to scale/map 0-100% from 0-200 right ? |
hi,in the rtos v3.0 SDK,when i add the pwm.c , build find error:ETS_FRC_TIMER1_INTR_ATTACH() undefine .. |
Hi, i should want to drive a 3 wire pc fan with this library. Wich is the better way to set pwm to the 25Khz need to smooth operations of the fan ? Thank you
The text was updated successfully, but these errors were encountered: