Maker Pro
Maker Pro

How to get a certain duty time

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
I've been trying to make a PWM circuit, i've made the astable circuit fine but im really struggling to get a certain duty time with the resistors. I want it to be variable but best values I can get is to change from 54% and 83% where as I want it to be adjustable between like 20% to 80%. I don't know how the resistor values would get it me I've tried plucking in values in the formulas without success

New-Schematic-2 (2).gif
 
Last edited by a moderator:

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
It is necessary to control the capacitor charge AND discharge.

Here is a circuit but it is wrong, one diode should be the other way round.
 

Attachments

  • MotorPWM.gif
    MotorPWM.gif
    4.5 KB · Views: 113

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
It is necessary to control the capacitor charge AND discharge.

Here is a circuit but it is wrong, one diode should be the other way round.

Thank you, I've seen that circuit before but I ignored it because I didn't understand the bit where there are 2 diodes and the potentiometer. Could you please explain? Thank you.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The correct picture is here.
D1 is conducting when the 100nF capacitor is charged through the left side of the potentiometer.
D2 is conducting when teh 100nF capacitor is discharged through the right side of the potentiometer.
As the wiper is moved the resistance on one side of the potentiometer changes inverse to the resistance of the other side. Thus charge time is increased when discharge time is decreased and vice versa while the total time is constant and therefore the frequency is constant, too.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
The correct picture is here.
D1 is conducting when the 100nF capacitor is charged through the left side of the potentiometer.
D2 is conducting when teh 100nF capacitor is discharged through the right side of the potentiometer.
As the wiper is moved the resistance on one side of the potentiometer changes inverse to the resistance of the other side. Thus charge time is increased when discharge time is decreased and vice versa while the total time is constant and therefore the frequency is constant, too.

Thanks dude that's genius :D
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
The correct picture is here.
D1 is conducting when the 100nF capacitor is charged through the left side of the potentiometer.
D2 is conducting when teh 100nF capacitor is discharged through the right side of the potentiometer.
As the wiper is moved the resistance on one side of the potentiometer changes inverse to the resistance of the other side. Thus charge time is increased when discharge time is decreased and vice versa while the total time is constant and therefore the frequency is constant, too.

Just last question on pin 5, is the tiny capacitor there necessary nad if so why?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
This capacitor is used to stabilize the operation of the IC. Do not leave it out. The exact value is not critical. 100 nF is a typical and very common value.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
This capacitor is used to stabilize the operation of the IC. Do not leave it out. The exact value is not critical. 100 nF is a typical and very common value.
Thanks a lot man, you helped so much
 

73's de Edd

Aug 21, 2015
3,613
Joined
Aug 21, 2015
Messages
3,613
Just relating to your initial schematic . . . . . . Duke's revision corrects it . . . .
Lastly is that motor so small . . .so as to be compatible with that 2N3904 driver transistor power carrying capacity . . . . . . . .that it is powering the windshield wipers on a gnats go kart ?
Or will be more realistic to use a darlington / or / darlington configured transistor pair in place of it ?
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
Just relating to your initial schematic . . . . . . Duke's revision corrects it . . . .
Lastly is that motor so small . . .so as to be compatible with that 2N3904 driver transistor power carrying capacity . . . . . . . .that it is powering the windshield wipers on a gnats go kart ?
Or will be more realistic to use a darlington / or / darlington configured transistor pair in place of it ?

Sorry I just found a basic motor and transistor on the EDA program, in reality I'm using a 5V motor and a 2N3906, and I just burnt it, and my fingers.
 

Stoneww

Apr 18, 2017
42
Joined
Apr 18, 2017
Messages
42
Just relating to your initial schematic . . . . . . Duke's revision corrects it . . . .
Lastly is that motor so small . . .so as to be compatible with that 2N3904 driver transistor power carrying capacity . . . . . . . .that it is powering the windshield wipers on a gnats go kart ?
Or will be more realistic to use a darlington / or / darlington configured transistor pair in place of it ?

Thanks for the help think I'm going to need to do more theory before I can make this PWM work because it just doesn't seem to like me.
 

Electrobrains

Jan 2, 2012
259
Joined
Jan 2, 2012
Messages
259
Sorry I just found a basic motor and transistor on the EDA program, in reality I'm using a 5V motor and a 2N3906, and I just burnt it, and my fingers.

No wonder that you burnt it. 2N3906 is a low-power PNP transistor and will not work in that circuit
(at least not in the sinking position).
You can use an NPN darlington transistor like the one shown in the first diagram (BD679).
See corrected schematics attached.
Or if you want a better, real efficient power unit, then plug in an N-MOSFET instead.
Suggested cheap, available type: FQP30N06L (logic gate type 60V, up to 32A)
With a MOSFET you can also remove the base resistor totally (or if you want to soften the switching characteristics a bit and give an easier life to the Gate, you could leave it, but reduce it to 22Ω)
 

Attachments

  • MotorPWM.gif
    MotorPWM.gif
    4.5 KB · Views: 109
Last edited:
Top