dc42:
MadMatt:
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
HazardsMind:
The simplest things can sometimes make the biggest differences.
could not have said it better myself
Osgeld:
MadMatt:
sorry about everyones else suggestions didnt really helpnp, wont bother again
next time google + motors, good luck
sheesh ill say thank you then for everyone who tried to help (i think i did already so sorry if i didnt i really did like everyones suggestions but i guess the capacitor one really did work for me )
dhenry:
sorry about everyones else suggestions didnt really help
Don't feel bad for others, feel bad for yourself for missing a good chance to learn.
ive learnt alot from this experience thank you very much >:\