Submitted by charliemic on Wed, 15/01/2014 - 13:33
All,
I'm intending to get my Arduino Uno/EmonTX to operate some DC fans using PWM and an h-bridge. I need to use a higher frequency of PWM to avoid nasty noises being produced from the fans. I can achieve this by setting the PWM frequency for timer 2 which controls pins 3 and 11 (arduino pin numbers --> 5 & 17 Atmega328 pins) as per here: http://playground.arduino.cc/Main/TimerPWMCheatsheet.
I've tested this at 31,372Hz and it works well. It also avoids the issues of changing millis() and delay() speeds which occurs if changing the other timers.
However, I've been having some issues with the readings from the device (which is also sensing a few temperatures), which has given some strange spikes.
I'm wondering whether the faster PWM is affecting the behaviour of the RFM12B, which uses pin 17 (Atmega)/11 (Arduino) for SDI?
Can anyone advise? I'm not familiar enough with how the RFM12B works.
Arduino PWM Frequencies & RFM12B
Submitted by charliemic on Wed, 15/01/2014 - 13:33All,
I'm intending to get my Arduino Uno/EmonTX to operate some DC fans using PWM and an h-bridge. I need to use a higher frequency of PWM to avoid nasty noises being produced from the fans. I can achieve this by setting the PWM frequency for timer 2 which controls pins 3 and 11 (arduino pin numbers --> 5 & 17 Atmega328 pins) as per here: http://playground.arduino.cc/Main/TimerPWMCheatsheet.
I've tested this at 31,372Hz and it works well. It also avoids the issues of changing millis() and delay() speeds which occurs if changing the other timers.
However, I've been having some issues with the readings from the device (which is also sensing a few temperatures), which has given some strange spikes.
I'm wondering whether the faster PWM is affecting the behaviour of the RFM12B, which uses pin 17 (Atmega)/11 (Arduino) for SDI?
Can anyone advise? I'm not familiar enough with how the RFM12B works.
Chris