How to controll a Delta Electronics brushless fan by arduino

I can't get my Delta electronics brushless fan working, it will only slow down when i connect the blue and yellow wire to eachother, nothing else will slow it down. I tried PWM on the blue and on the yellow wire but it doesn't work..Blue or Yellow connected to ground also gives no result.

Then i read the text below, but how can i use this on a Arduino Mega 2560?

My fan is the Delta Electronics BFB1012VH-5D84

Delta Electronics Pulse Width Modulation Fans regulate the voltage signal between fully on and fully off, controlling the speed of a fan with a very low power loss in the switching device. When a switch is off, there is practically no current, and when it is on, there is almost no voltage drop across the switch. As a result, power loss is close to zero.

A wide range of options are available including:

Power rating from 1.68 to over 100W
Noise rating from 25 to 80dBA
Fan speed from 3200 to over 16,000RPM
Advantages over external PWM-controlled devices:
Wide PWM frequency range input (30Hz-30kHz)
Lower vibration at lower duty cycle
Prevent spike current on fan speed control
Better motor efficiency
Lower fan switching noise

Yellow is pwm
red is plus 12V
black is ground
blue is tacho

http://www.mouser.cn/new/delta-fans/delta-pwm-fans/

Connect the black wire to Gnd, and yellow to PWM.

DrDiettrich:
Connect the black wire to Gnd, and yellow to PWM.

It’s a 4 wire fan with it’s own power supply and even own chip to drive it.

Can the arduino mega stand 1.8 amps max on the pwm-pin?

Here this guy got it running but i still don’t understand his code, he uses an Arduino uno i guess.

Turbine: Delta Electronics BFB1012VH-5D84

Picture of its and schematic in the attachments. The blue circuit is just this sensor cable. Yellow is PWM.

#include <Wire.h>
#include <TimerOne.h>
#include <LiquidCrystal_I2C.h> // pobrany lib od I2C

#define btnUp 4
#define btnDown 5
#define ctrlPwm 3
#define sensePin 2

// LCD na 0x3F
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6 ,7, 3, POSITIVE);

// speed
unsigned int ctrl;
unsigned int pwm;
unsigned int rpm;
unsigned int counts;

void licznik() {
counts++;
}

void pomiarRPM() {
Timer1.detachInterrupt();
rpm = counts;
counts=0;
Timer1.attachInterrupt(pomiarRPM);
}

void bar() {
switch (ctrl){
case 1:
lcd.setCursor(5,0);
lcd.print("");
break;
case 2:
lcd.print("[# ]");
break;
case 3:
lcd.print("[## ]");
break;
case 4:
lcd.print("[### ]");
break;
case 5:
lcd.print("[#### ]");
break;
case 6:
lcd.print("[##### ]");
break;
case 7:
lcd.print("[###### ]");
break;
case 8:
lcd.print("[####### ]");
break;
case 9:
lcd.print("[######## ]");
break;
case 10:
lcd.print("[#########]");
break;
}
}

void sterowanie() {
while(digitalRead(btnUp) == LOW){
if(ctrl < 10){
ctrl++;
lcd.setCursor(5,0);
bar();
delay(200);
} else {
lcd.setCursor(5,0);
lcd.print("[ - MAX - ]");
delay(200);
}
}
while(digitalRead(btnDown) == LOW){
if(ctrl > 1){
–ctrl;
lcd.setCursor(5,0);
bar();
delay(200);
} else {
lcd.setCursor(5,0);
lcd.print("[ - MIN - ]");
delay(200);
}
}
}

void regulacja() {
unsigned int spd;
spd = ctrl*20+55;
// sprawdzenie czy za wolno
if(pwm < spd){
for (pwm; pwm < spd; pwm++) {
analogWrite(ctrlPwm, pwm);
delay(50);
lcd.setCursor(3,1);
lcd.print((pwm/10)*4);
lcd.print("%");
}
} else {
}
// sprawdzenie czy za szybko
if(pwm > spd){
for (pwm; pwm > spd; --pwm) {
analogWrite(ctrlPwm, pwm);
delay(50);
lcd.setCursor(3,1);
lcd.print((pwm/10)*4);
lcd.print("%");
}
} else {
}
lcd.clear();
}

void setup() {
// sterowanie (przyciski)
pinMode(btnUp, INPUT_PULLUP);
pinMode(btnDown, INPUT_PULLUP);
pinMode(ctrlPwm, OUTPUT);
// pomiar
pinMode(sensePin, INPUT);
Timer1.initialize(500000); // 0,5 sekund
attachInterrupt(digitalPinToInterrupt(sensePin), licznik, RISING);
Timer1.attachInterrupt(pomiarRPM);
// reset zmiennych
ctrl = 1;
pwm = 0;
// wyswietlacz
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("REG: ");
lcd.setCursor(0,1);
lcd.print("P: ");
lcd.setCursor(8,1);
lcd.print("R: ");
}

void loop() {
unsigned int spd;
spd = ctrl*20+55;
// czytanie przyciskow
sterowanie();
// uruchomienie
if(pwm == 0){
analogWrite(ctrlPwm, 75);
pwm = 75;
} else {
}
// sprawdzanie
if(pwm != spd){
regulacja();
} else {
lcd.setCursor(0,0);
lcd.print("REG: ");
bar();
lcd.setCursor(0,1);
lcd.print(“P: “);
lcd.print((pwm/10)*4);
lcd.print(”%”);
}
lcd.setCursor(8,1);
lcd.print("R: ");
lcd.print(rpm);
delay(25);
//koniec
}

Please enclose your code in code tags </>

For a first test it’s sufficient to supply a PWM signal, and the 12V of course.

Hi,
This thread is associated with this

Please use code tags >:( >:( >:( >:( >:( >:(

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.

It will be formatted in a scrolling window that makes it easier to read.

How have you got the fan connected to the arduino and its power supply?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Have you tried yourself to write a very simple PWM code to try and control the fan?

Please... Tom... :slight_smile:

Are fan GND (negative of the 12V) and Arduino GND connected?

Yes all grounds are connected, my brushed fan works fine on the same code and connections.

Red goes to +12V
Black to common Ground
Yellow to pin8 of arduino

I posted the whole code so i can study it better than on the original Polish language forum in that small scrollingwindow.

That guy from the code uses analogwrite as well and timer1 library...

I tried my own code which works for the brushed fan but this Delta fan just won't slow down a bit. It has it's own chip onboard (i learned) for speedcontrol.

When i only connect ground and the yellow-pwm to arduino (red wire not connected) the fan won't spin.

If you pull the plug, no electric device can work. The fan must always be supplied its 12V operating voltage.

The timer library in the code is used for the tacho signal, that allows to determine the actual fan speed, and to control the speed by PWM and e.g. a PID controller.