Maker Pro
Maker Pro

PWM circuit

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
PWM.png Wanted to make a pulse width modulation circuit for a motor. I managed to successfully make an astable with a potentiometer which allows me to change the duty time. I managed to get it to work with an LED with the use of a transistor but I cannot seem to get it working with a motor. Im assuming it's because I am using the wrong transistor/MOSFET so if anyone could give me and idea what is a good one to use? The power supply is 5v and its a 5v motor, I don't know what the resistor value before the transistor should be as well.

transistor: 2N3906
 

Bluejets

Oct 5, 2014
6,920
Joined
Oct 5, 2014
Messages
6,920
Most 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.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
Most 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.
Sorry man, added now
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
The 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
 

Bluejets

Oct 5, 2014
6,920
Joined
Oct 5, 2014
Messages
6,920
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.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
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 know the values are not correct for what I need they were just some base values I used.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
The 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
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 much :)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,719
Joined
Nov 17, 2011
Messages
13,719
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.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
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.


Thanks a lot man :)
 
Top