Emulate fan at minimum 6000rpm

Hi!

I'm trying to trick a computer into believing there's a fan connected that's spinning at 6000+rpm. I'm not very good at electronics and this seems to be too advanced for me.

I tried with this code without any success at all:

int pin = 7;

void setup()
{    
  pinMode(pin, OUTPUT);
}

void loop()
{
  digitalWrite(pin, HIGH);
    delayMicroseconds(10);
    digitalWrite(pin, LOW);
}

Googling haven't helped me much either, maybe because i don't understand how it works at all :)

How do i trick the damn computer?

6000 RPM is 100 rotations a second, or 1 rotation every 10 milliseconds.

Change delayMicroseconds(10) to delay(10);

Thank you. The fan monitor still reads 0 rpm though.

Do you think the monitor needs 12v volt on HIGH? The Arduino is only supplying 5v if i’m not mistaken. How do supply 12v on HIGH? Cna’t really put 12v into the Arduino can i?

Try putting a small delay after digitalWrite(pin, LOW);

digitalWrite(pin, HIGH);
    delay(10);
    digitalWrite(pin, LOW);

Read it carefully.

Maybe the monitor doesn't like the waveform generated by the code. I'd be inclined to put better code inside a local infinite loop, within "loop()"

#define ON_TIME 1
#define TOTAL_TIME 10
for (;;) {
  digitalWrite (pin, HIGH);
  delay (ON_TIME);   
  digitalWrite (pin, LOW);
  delay (TOTAL_TIME-ON_TIME);
}

Then you can vary the duty cycle. You could also check that your setup works by setting a more realistic fan-speed (TOTAL_TIME), and seeing if the monitor recognises it.

Well, i tried a few different values but it still read 0 rpm. Been looking around and found a forum post saying that the fan might use a tachometer. No idea what that means exactly though.

There is a small IC on the original fan witht he text 6407A. Maybe i can use that to emulate a spinning fan. Any ideas?

found a forum post saying that the fan might use a tachometer.

Well, yes, that's a pretty good bet! ;)

have you tried slowing things down to more fan-like speed?

Inverting the waveform?

Can you get hold of, and drive an oscilloscope? I wouldn't even consider hooking up two pieces of gear unless I had a pretty good idea of the voltages and waveforms involved.

Yep, tried all kinds of speeds.

Now i've tried to set LOW first and then HIGH. I also tried analogWrite from the PWM pins. No success whatsoever. I suspect that i need 12 volts for this to work. How do i supply 12 volts to the controlpin with the Arduino?

I also tried analogWrite from the PWM pins

Had it worked, that would've fooled it into thinking the fan was doing about 30000rpm.

Heh okey. Wouldn't have been too bad though since the stock fan speed was about 11000 rpm :p

I still haven't figured out to supply 12 volt to the sensor while not setting the arduino on fire. Any thoughts?

you don't want:-

digitalWrite(pin, HIGH);
    delay(10);
    digitalWrite(pin, LOW);

But you do want:-

digitalWrite(pin, HIGH);
    delay(5);
    digitalWrite(pin, LOW);
    delay(5);

How do i supply 12 volts to the controlpin with the Arduino?

Just put it through a transistor, control pin to 1K resistor, other end to transistor base, transistor emitter to ground. Transistor collector to fan input sense. Transistor emitter also to 10K resistor, other end of resistor to +12v.