You might need a capacitor to smooth out the output signal of the transistor, going to the motor. Just put a capacitor from the between the motor contacts, make sure you wire it correctly (polarized). It should get rid of any noise, unless the noise is not from the PWM but from a defect in the motor itself.

470uf should be more than enough.

thanks soo much that really worked sorry about everyones else suggestions didnt really help :/

You might need a capacitor to smooth out the output signal of the transistor, going to the motor. Just put a capacitor from the between the motor contacts, make sure you wire it correctly (polarized). It should get rid of any noise, unless the noise is not from the PWM but from a defect in the motor itself.

470uf should be more than enough.

thanks soo much that really worked sorry about everyones else suggestions didnt really help :/

That solution has two problems: (a) you are probably exceeding the current rating of the transistor, because there will be a surge of current to charge the capacitor every time the transistor turns on; (b) you will probably find that you have only a small amount of control over the fan speed, it will mostly run near full speed.

If you want to control a PC-type fan, the best solution is to buy a 4-pin fan designed for PWM control. These have a separate PWM input. They are designed to work using a PWM frequency around 25KHz, so you need to increase the Arduino PWM frequency.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

You might need a capacitor to smooth out the output signal of the transistor, going to the motor. Just put a capacitor from the between the motor contacts, make sure you wire it correctly (polarized). It should get rid of any noise, unless the noise is not from the PWM but from a defect in the motor itself.

470uf should be more than enough.

thanks soo much that really worked sorry about everyones else suggestions didnt really help :/

That solution has two problems: (a) you are probably exceeding the current rating of the transistor, because there will be a surge of current to charge the capacitor every time the transistor turns on; (b) you will probably find that you have only a small amount of control over the fan speed, it will mostly run near full speed.

If you want to control a PC-type fan, the best solution is to buy a 4-pin fan designed for PWM control. These have a separate PWM input. They are designed to work using a PWM frequency around 25KHz, so you need to increase the Arduino PWM frequency.

i do have one actually it was the one i was using in the first place i already set it up for pwm control however the pwm control of the fan has limits so i decided not to use it anymore and went back to the positive and negative side of the fan also about the transistor dont worry it has a current rating of 1 amp so dont worry yourself there bro XD i know my electronics its just i forget about these things sometimes ;P