How to go about controlling and powering 4 x 120mm PWM Fans


hey guys,

first want apologize lack of knowledge. haven't ever looked building system arduino or similar raspberry pi. working on carpentry project server isolation cabinet. cabinet needs intake , exhaust thought use 4 x 120mm fans.

the problem running into: how power 4 fans without computer? trying explore option instead of trying rig larger computer.

before posted have done quite bit of reading think ignorance might have me looking in areas either don't understand or software steps vs. actual hardware config.

so question: can point tutorials simple minded folks myself :d. or provide basic information. maybe guesstimate on how long project take , if there alternative options come mind.

thank you,
kevin

edit: stumbled upon tutorial https://www.youtube.com/watch?v=_lccgfsmor4 seems explain software aspect , parts of hardware. can understand how cut off 4 pin fan connector , wire doing in tutorial there way using connectors? how should assemble final build it's not on test bench?

i going continue looking @ basic tutorials. looks jumped gun , should have started these verses looking fan related information.

any resources appreciated.

thanks,
kevin

pwm computer fans great arduino. except 1 thing: never turn off when pwm goes zero. standard specifies minimum rotational speed should 30% of max when pwm zero. may or may not problem you.

if need arduino turn fan off need chip, relay or transistor. i'm guessing server cabinet won't necessary.

the connector slightly-unusual 4-pin "polarized header" type connector. it's unusual because must fit 3-pin plugs on same connector. this connector @ sparkfun possibly close enough. or grab 1 of this 4-way splitter , cut off 'head' end.

i've built custom pcb teensy board. if can share pcb design , tell made. air circulation in aircraft cabin work on server cabinets too.

code: (super-simple fan controller, modified "knob" example) [select]
/*
  analog input, analog output, serial output

 reads analog input pin, maps result range 0 255
 and uses result set pulsewidth modulation (pwm) of output pin.
 also prints results serial monitor.

 the circuit:
 * potentiometer connected analog pin 0.
   center pin of potentiometer goes analog pin.
   side pins of potentiometer go 3.3v , gnd
 * pwm output on pin 10 , built-in led
   (on nano, builtin led has pwm, on uno , teensy doesn't.)

modification history
  aug 2 2016 v2.0 m sandercock
    changed teensy, on "dehumidifier control v1.0" pcb (modified connect pin 10 output)

 */


// these constants won't change.  they're used give names
// pins used:
const int analoginpin = a0;  // analog input pin potentiometer attached to
const int ledpin = 13;
const int pwmpin = 10;      //fan control wire attached pin

int sensorvalue = 0;        // value read pot
int outputvalue = 0;        // value output pwm (analog out)

void setup() {
  // initialize serial communications @ 9600 bps:
  serial.begin(9600);
}

void loop() {
  // read analog in value:
  sensorvalue = analogread(analoginpin);
  // map range of analog out:
  outputvalue = map(sensorvalue, 1, 1023, 255, 0);
  // change analog out value:
  analogwrite(ledpin, outputvalue);
  analogwrite(pwmpin, outputvalue);

  // print results serial monitor:
  if(serial) {
    serial.print("v2.0 (hardware 1.0, pin 10 modification)");
    serial.print(" compiled ");
    serial.print(__date__);
    serial.print(" ");
    serial.print(__time__);
    serial.print("  sensor = ");
    serial.print(sensorvalue);
    serial.print("\t output = ");
    serial.println(outputvalue);
  }
 
  // wait 2 milliseconds before next loop
  // analog-to-digital converter settle
  // after last reading:
  delay(2);
}


Arduino Forum > Using Arduino > Project Guidance > How to go about controlling and powering 4 x 120mm PWM Fans


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'