Electric Fan Control

User avatar
Laecaon
Site Admin
Posts: 3711
Joined: Wed Jun 26, 2013 7:21 pm
Cars: '71 510 Wagon, 02 BMW 325i Wagon
Location: PDX, West side.

Electric Fan Control

Postby Laecaon » Fri Jul 17, 2015 11:46 pm

After deciding to switch to electric fans I started to look at fan controllers. There are a few ways to do this, but I dont like spending money, I dont like cheap products, and I do like lots of options.

You could go super simple, and use a basic fan switch that simply will turn on a fan at a certain coolant temp (Temp predetermined by the switch manufacturer).

Or you can go with a fan controller. These tend to allow adjustment to when the fan(s) come on. They get fancier with multiple fan (independent), and even variable speed controls. The problem, the cheap ones are well cheaply made and tend to have bad reviews. The good ones cost more than the fans themselves.

Then there is the DIY option, which is my favorite, because I get to be cheap and have all the options, and well its more fun.

The idea is to use an Arduino (https://www.arduino.cc/); have it read two different temperature sensors; and based off those temperature readings turn on and vary the speed of the fans (two in this case).

Hardware is all pretty basic:
Arduino Board, Currently using a Uno R3.
Some resistors (10K ohm)
Diodes, in case of any backwards spin of the fans (dont want any reverse current)
aMOSFET, this is like a relay that can be turned on and off way faster and barely require any current to do so.
Fans (of your choice)
Temperature Sensors.


I dont currently have a temperature sensor, and I havent hooked up a full size automotive fan, but I do have trial done with a potentiometer and a computer fan.

The code the Arduino runs on:

Code: Select all

    int tempPin = A1;   // Temp Sensor
    int fan = 10;       // The output pin for the Fan
    int led = 13;        // led pin
    int temp;
    int tempMin = 900;   // the temperature to start the fan
    int tempMax = 60;   // the maximum temperature when fan is at 100%
    int fanSpeed;
     
    void setup() {
      pinMode(fan, OUTPUT);
      pinMode(led, OUTPUT);
      pinMode(tempPin, INPUT); 
    }
     
    void loop() { 
       temp = readTemp();     // get the temperature
       if(temp > tempMin) {   // if temp is lower than minimum temp
           fanSpeed = 0;      // fan is not spinning
           digitalWrite(fan, LOW);       
       }
       if((temp <= tempMin) && (temp >= tempMax)) {  // if temperature is higher than minimum temp
           fanSpeed = map(temp, tempMin, tempMax, 32, 255); // the actual speed of fan
           analogWrite(fan, fanSpeed);  // spin the fan at the fanSpeed speed
       }
       
       if(temp < tempMax) {        // if temp is higher than tempMax
         digitalWrite(led, HIGH);  // turn on led
       } else {                    // else turn of led
         digitalWrite(led, LOW);
       }
         
    }
     
    int readTemp() {  // get the temperature
      temp = analogRead(tempPin);
      return temp;
    }


The code needs tweaking for proper fan speeds, proper reading of a temperature sensor and well 2 fans... But it works.


Ill update about the circuit later.

Image
User avatar
Laecaon
Site Admin
Posts: 3711
Joined: Wed Jun 26, 2013 7:21 pm
Cars: '71 510 Wagon, 02 BMW 325i Wagon
Location: PDX, West side.

Re: Electric Fan Control

Postby Laecaon » Sat Jul 18, 2015 12:05 am

Quick video of it working.

Notice at the end an orange light shows up on the board on the left of the video. If you can read the code above, you will notice that it comes on when the temperature is too high, as a warning.

https://www.youtube.com/watch?v=bXGqjV7fO4g
User avatar
Laecaon
Site Admin
Posts: 3711
Joined: Wed Jun 26, 2013 7:21 pm
Cars: '71 510 Wagon, 02 BMW 325i Wagon
Location: PDX, West side.

Re: Electric Fan Control

Postby Laecaon » Sat Jul 18, 2015 1:15 pm

Managed to get a temperature sensor working with the system. Its just hard to like, well change the temperature. An Ice cub and a lighter work, but that is messy and dangerous... around computers and electronics...

My goal with this mini project is to make it fairly easy for anyone to replicate, and maybe even sell a couple of quick "kits" (what happens when I order PCBs, they come in sets of 3)
User avatar
izzo
Site Admin
Posts: 5615
Joined: Wed Jun 26, 2013 6:32 pm
Title: Save a pimp, Rent a bitch.
Cars: Too many
Location: Astoria, OR
Contact:

Re: Electric Fan Control

Postby izzo » Tue Aug 04, 2015 7:43 pm

Now this is pretty damn neat

You ever check out mp3car?
8========D ~~~ ( o Y o )
jayden71: titty ponk

devilsbullet wrote: 1400 obo. and best offer doesn't mean 300 bucks you cheap bastards
User avatar
Laecaon
Site Admin
Posts: 3711
Joined: Wed Jun 26, 2013 7:21 pm
Cars: '71 510 Wagon, 02 BMW 325i Wagon
Location: PDX, West side.

Re: Electric Fan Control

Postby Laecaon » Tue Aug 04, 2015 9:25 pm

yea... some useful stuff. A messy looking website.

Return to “Electrical”

Who is online

Users browsing this forum: No registered users and 1 guest