
transistor: 2N3906
Sorry man, added nowMost of the people here are pretty good at their job but they are not mind readers or have connections with crystal balls so please provide details, drawings, parts used etc.
I know the values are not correct for what I need they were just some base values I used.The way it is drawn, you have a frequency of something like 0.1hz and a period around 9.5 seconds.
Is this what you designed?
As well, it is not adjustable.
I'll just use a 9v supply then, and is there any way to calculate the value of the resistor for the transistor, for future projects? And thank you very muchThe 2N3906 is rated for a collector current of 200mA (from memory) - is this sufficient for your motor. The motor would also need a protection (BEMF) diode across it. Without it you may have simply blown the transistor!
Double check the transistor pin out too - those TO92 packages often have unpredictable pin outs.
Vsat is around 1V leaving only 4V to drive the motor. You may not get the motor to 'start' with such a low voltage. Consider increasing the supply voltage to 6V minimum.
The 1k resistor is ok
As an approximation:
ideal: Rbase = (Vsupply - 1V)/(Icollector*hfe)
practical: Rbase <= 0.8*(Vsupply - 1V)/(Icollector*hfe) to ensure saturation even with parameters varying.
The frequency of your PWM should be in the kHz range.
You need to protect the transistor from the motor's back EMF by a reverse diode from collector to emitter (alternatively across the motor), see e.g. here. cf. post #5.
You need to connect the potentiometer's wiper to one of the two ends to make the frequency adjsutable.
This is an improved version of your circuit with constant frequency.
Here's a complete PWM motor controller circuit based on the 555.