3-Wire fan failure on PWM

Hello all i have a small problem Trying to get a 3-Wire fan to work on a uno with a lm35. I Try to use a potentiometer to see if i can change the value but 1/4 way up buzzing noise same as if 1/2 same thing but motor slightly moves 3/4 of the way up can still here slightly buzzing but motor moves and all he way up buzzing stops and full speed of a motor. I'm using 12v fan and a 2n2222 transsitor with a 5k resistor between the input pin and transistors. not sure what else to do trying to get it as smoothly as can but getting no where i try to use a smiple code like this one

    const byte POTENTIOMETER = 0;
    const byte CONTROL = 9;
    int reading;
    int value;
    void setup() {
    pinMode(CONTROL, OUTPUT);
    void loop() {
    reading = analogRead(POTENTIOMETER);
    value = map(reading, 0, 1024, 0, 255);
    analogWrite(CONTROL, value);

and it works but don't know what to do can someone please help me?

Hi, the three wire fan ,has positive and negative and a speed feedback wires.

If you use the Arduino to power the supply then you are applying PWM to the motor supply wires.

The fan has a small drive circuit inside, it is not just a motor, the PWM does not control the motor directly, in fact the drive circuit does not like this sort of pulsed supply.

http://www.pcbheaven.com/circuitpages/PIC_3-Wire_Fan_RPM_Controller/ This will help as the writer had the same problem.

Tom... :)

hello thank you for the reply i have seen this video before he was using a pic controller never used one before never even sure if my wiring or what hardware i need this is a little over my head here. i try to contact pcbheaven but so far no reply yet.


Hi, post a copy of your circuit, CAD or pic of hand drawn and a picture of your project. We will see if we can be of assistance. Try putting say 10uF capacitor across the power leads of the fan and see if that is enough to filter the PWM. Tom.... :)

@TomGeorge hello i did check out the site he using in one sample 8 resistors 10ohms each i will look into it also he uses dioides as well sense i will look into this later on thank you once again. i will keep you posted.


i tryed it out with saying the 8 resistors of 10 ohms each one and that worked didn’t use a arduino or anything and i can manually control the flow to the power it went down to 6. something volts and that was awesome no buzzing or any noise but now how can i control this this is what i did Electronic theory - PCB Heaven now trying to figure out how to make it work with the arduino can’t do it directly because there is more then 5v in it.