Increasing the frequency of a 555 pwm generator?

Status
Not open for further replies.

Thread Starter

bytraper

Joined Sep 28, 2010
127
Hi Guys,

Im looking to create a PWM squarewave with 0-100% duty cycle and up to 33khz frequency. This is the circuit I am looking at which I found on these boards but the frequency only goes from 100hz to 22khz, how can I change this to increase the frequency to 33khz?





Any suggestions? (Sorry for the small picture, its all i can find)
 
Last edited:

Thread Starter

bytraper

Joined Sep 28, 2010
127
Ok, well after a few more days of reading, I'm more lost now than I was when I started.

While I found heaps of stuff for the 555 and PWM, a lot of what I saw is beyond my knowledge and understanding. The 555 schematic I posted up originally I can make use of, but I couldn't find a single schematic in referral posts that showed a schematic with 2 pots, 1 for frequency adjust and one for duty cycle in the ranges I was after.

Am I missing something? I just need that original circuit to go 11 khz higher, is it a simple component that I can change?

Thanks guys for any help
 

bertus

Joined Apr 5, 2008
22,278
Hello,

The circuit you posted will not change the duty cycle.
The circuits by Bill_Marsden (post #6 in the thread I gave) will.
In figure 4.3 R1 will change the frequency and R5 the duty cycle.

Bertus
 

Thread Starter

bytraper

Joined Sep 28, 2010
127
?
Maybe I am misunderstanding, the duty cycle is the speed from 0-100% isn't it?
And the frequency is how fast is pulses that duty cycle?
 

Thread Starter

bytraper

Joined Sep 28, 2010
127
I think I understand now...

Is this right?



The pwm output will go directly to a NOR gate so no big current required.

How can i work out the frequency it will go from-to ?
 

bertus

Joined Apr 5, 2008
22,278
Hello,

Take a look at fig 4.2 of post #5 of the thread I gave you.
It says F = 0.7 / RC.
In the picture of fig 4.3 of post #6 R will be R1 + R2 and C will be C1.

Bertus
 

SgtWookie

Joined Jul 17, 2007
22,230
I think I understand now...

Is this right?



The pwm output will go directly to a NOR gate so no big current required.

How can i work out the frequency it will go from-to ?
I put together a simulation using LTSpice; the simulation indicates that with R1, R2 and C1 as shown, it has a frequency range of ~660Hz to ~45kHz. Since you will not be using ideal components (they always have tolerances, and capacitors can be considerably higher or lower than what's printed on them), your mileage will vary somewhat, but it will be reasonably close.

Keep in mind that the LM339's output can only sink current, it cannot source current. In order for you to be able to see an output from the LM339, you must use a pull-up resistor from the output pin to Vcc; in your case +12v.

LM339s' outputs are rather limited in the amount of current that they can sink. If you stick with using ~4mA in your calculations, you will be OK.

So, what value to use for the pull-up resistor?
Rpullup = Vcc/4mA
Rpullup = 12v / 0.004A = 3,000 Ohms, or 3k Ohms. This is a standard value of resistance, so we lucked out on that one.

You can find out what the standard values are by looking at this decade table:
http://www.logwell.com/tech/components/resistor_values.html
The E24 (green) column values are the most common nowadays. You can get the E48 and higher values, but you will usually pay a good bit more for them.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Bill,
I suggest you change your R8 to 3k, or to a formula such as R8 = Vcc/0.004.

Also, changing R4 and R6 to 9.1k will guarantee that 0% to 100% PWM can be achieved. Much of the time, pots are somewhat under the value specified on them.
 

SgtWookie

Joined Jul 17, 2007
22,230
Thanks guys, I now have a design for the pwm generator for my speed control!
Keep in mind that the PWM output will have only a small current source/sink capability. If you are planning on driving a MOSFET or transistor with it, you will need to use a voltage follower/buffer to be able to drive a transistor or MOSFET.
 

Thread Starter

bytraper

Joined Sep 28, 2010
127
All it has to do is turn on a gate on a SN7402N (QUADRUPLE 2-INPUT POSITIVE-NOR GATES).

I dont think it needs much current at all to do that so I dont think I'll need to use the transistor will i ?
 

SgtWookie

Joined Jul 17, 2007
22,230
That'll probably work OK - but are you sure you want to use an SN7402? Those are pretty power-hungry. You might consider a 74HC02 instead.
 

Wendy

Joined Mar 24, 2008
23,429
Bill,
I suggest you change your R8 to 3k, or to a formula such as R8 = Vcc/0.004.

Also, changing R4 and R6 to 9.1k will guarantee that 0% to 100% PWM can be achieved. Much of the time, pots are somewhat under the value specified on them.
Did you mean R7? It was a demo value, since the power supply wasn't defined.

Given that R8 turns off the transistor almost anything will work. The current for the transistor comes directly from the output of the LM339, and if you are providing 30 ma to the LED the LM339 is sinking much, much less (0.3ma?). This is one of my better designs.
 

Thread Starter

bytraper

Joined Sep 28, 2010
127
Ok, I think I'll use the 74HC02..

Thanks Sarge for the advice and help, and thanks Bill for the great circuit!

For the LM339 though, its a 14 pin chip and the circuit only uses 3 of the pins! Is there another type of comparator that I can use that will use less board space?
 
Last edited:
Status
Not open for further replies.
Top