I have read in several places that 3 wire 12v fans are controllable via PWM (low frequency). However I dont have a ton of understanding on PWM or the difference between low and High frequency. I am also not coming up with much when it comes to wiring diagrams as to how this will work. I dont particularly care about the tach output, but if I can make it work without an obsurd amount of effort I would like to retain that as well.
the goal is to have several onewire temp sensors (already have those working) feed a temp to the board and have the board turn the fans on at different speeds based on the average temperature that the sensors are reading.
The reason for using 3 wire is that I work for an electronics retailer and have access to 3 wire 80mm fans for $1 each. I also have access to 4 wire fans but they are 120mm and I dont think that will fit into my project.
Please let me know if you have any input on this one.
Thanks!
No matter how many wires (not less than 2 though ), you can control it with Pwm. You will need power transistors, to switch a high current fan, and a flyback diode,and pwm is quite easy to setup in arduino ide. As far as your third wire is concerned, it is used to keep track of the fans RPM, incase you want it at a certain speed.
And you programming also wont be too difficult you can use the simple analog in analog out example to your needs.
int ledPin = 9; // LED connected to digital pin 9
void setup() {
// nothing happens in setup
}
void loop() {
// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
}
int potPin = 0; // Analog pin 0 connected to the potentiometer
int transistorPin = 9; // connected from digital pin 9 to the base of the transistor
int potValue = 0; // value returned from the potentiometer
void setup() { // set the transistor pin as an output
pinMode(transistorPin, OUTPUT);
}
void loop() { // read the potentiometer, convert it to between 0 - 255 for the value accepted by the digital pin.
potValue = analogRead(potPin) / 4; // potValue alters the supply from pin 9 which in turn controls the power running through the transistor
analogWrite(9, potValue);
}
This is the code i found for simpler pwm control, you can replace the pot with your temperature sensor, ofcourse you will need a few more calculations...