We have solved this problem, and now you can visit my website to see how to do it. Here's my website: https://sites.google.com/site/arduinosoapy29/home
So how are you wiring it up and how are you driving it?
To control the speed you need to feed the transistor with a PWM signal and using analogWrite(pin); Note than not all pins a capable of producing a PWM output.
If you want to know more about PWM se here:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html
Ok. I drew out a diagram (Problley not very good,) and it's on my website here: https://sites.google.com/site/arduinosoapy29/motor-speed-controller
My drawing stinks cause I'm on a Windows 7 Laptop and also I'm not a very good drawer with 7. Sorry!
That looks OK (providing the collector and emitter are the right way round) so now feed it from a PWM capable pin with an analogWrite(), note speed control only works on a loaded motor, if it is free running you won't see much speed variation.
Which pin is a PWM pin?
What arduino board do you have?
I have the Uno board. Not the new Uno SML or whatever it is.
In that case:-
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
Sweet!! It works! Thanks. Now I don't need an expensive motor controller!
Nice, could you share u'r circuit diagram...?
I want control a dc motor with speed like u.
Sure! If you goto my website, I'll create a page for controlling a DC motor with an Arduino. Here's my site: https://sites.google.com/site/arduinosoapy29/
Edit: The page is done and up and running. PM me if you have any questions. ;D