Increasing the frequency of a 555 pwm generator?

Discussion in 'The Projects Forum' started by bytraper, Nov 3, 2010.

Thread Status:
Not open for further replies.
  1. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    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?

    [​IMG]

    [​IMG]

    Any suggestions? (Sorry for the small picture, its all i can find)
     
    Last edited: Nov 3, 2010
  2. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    4,165
    1,120
  3. bertus

    Administrator

    Apr 5, 2008
    16,967
    2,960
  4. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    Thanks guys, its like finding a gold mine!
     
  5. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    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
     
  6. bertus

    Administrator

    Apr 5, 2008
    16,967
    2,960
    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
     
  7. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    ?
    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?
     
  8. bertus

    Administrator

    Apr 5, 2008
    16,967
    2,960
  9. bytraper

    Thread Starter Active Member

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

    Is this right?

    [​IMG]

    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 ?
     
  10. bertus

    Administrator

    Apr 5, 2008
    16,967
    2,960
    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
     
    bytraper likes this.
  11. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    I understand now and can do the calculations for the correct ranges, thank you for taking the time to help me!
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,194
    1,761
    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: Nov 5, 2010
  13. Wendy

    Moderator

    Mar 24, 2008
    20,993
    2,731
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,194
    1,761
    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.
     
  15. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    Thanks guys, I now have a design for the pwm generator for my speed control!
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,194
    1,761
    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.
     
  17. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    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 ?
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,194
    1,761
    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.
     
  19. Wendy

    Moderator

    Mar 24, 2008
    20,993
    2,731
    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.
     
  20. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    127
    4
    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: Nov 6, 2010
Loading...
Thread Status:
Not open for further replies.