I'm trying to design a project for an enclosure that I need to ventilate, and I am going to run the system on a 12V battery. My plan is to use 4 4-pin 12V fans and use a DHT11 humidity sensor. If the humidity is too high, I want to be able to turn the fans on, and when it gets to a suitable level, I want to be able to turn the fans off to conserve power. I am also thinking about using a voltage divider or trimpot to reduce the battery voltage enough to be able to monitor the battery status with the Arduino and turn the fans off if it gets too low in order to not drain the battery and wreck it.
I was thinking of using the Micro because it has enough pins for the fans, humidity sensor, and battery monitoring; it can run on 7-20V (though 7-12V is recommended) so I can get away with the slightly increased voltage of a charged battery; the 5V signal from the DHT11 should be fine (though it can operate from 3.3V-5.5V from what I understand); and the board is a small form factor that will make it easy to enclose.
I am wondering about the clock speed though. I know that you can run computer fans with Arduinos without the 25 kHz clock speed, but I am trying to keep any potential noise down and fans can get a bit of wine when they aren't running on the right clock speed from what I understand.
Is there a way to adjust the clock speed of a Micro to run the fans with the right 25 kHz signal? Or should I be looking at a different board? Thanks!
It sounds like it should work for you but packaging will be important. Post an annotated schematic showing how you plan on connecting these devices. Be sure to annotate it with part numbers etc and of course the Micro. You want the hardware design basically finished before starting the software.
Before complicating your life with frequencies, just try your fan with the frequency your arduino gives out of the box. Many 4-pin fans accept wide range of control signal and it doesn't effect the noise. Fan datasheet can give for example 30Hz-300000Hz range for control signal but the fan is internally driven with fixed frequency.
Yes, they are run on PWM, but that is calculated in reference to the clock. The clock speed/frequency of Micro is 16 kHz, but PC fans are 25 kHz, so it's essentially overclocking the chips (the chips are often capable of running at different speeds, but are set to 16 kHz with ways to set that higher or lower).
No, the clock speed of the Micro is 16 MHz, not kHz. To get the PWM frequency the system clock is divided down. You can easily get a PWM frequency of 25 kHz.
You will have to get your numbers right A 32U4 on an Arduino Micro runs on 16MHz.
And there is no way to overclock the 32U4 with some internal settings; it's not some kind of x86 type processor. You might be able to squeeze 20 MHz out of it, some people did (for fun) overclock AVR based processors; there is somewhere an older topic about it.
I remembered that I saw a similar thing recently, here is a sketch I tested a fan with. As it turned out, the speed control also worked with the default Arduino PWM rate, but I guess not all fans may respond the same way.