Need guidance with Adjustable PWM with 555 Timers

Discussion in 'The Projects Forum' started by ahchah08, Jun 17, 2013.

  1. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Hello All,

    I am working on a project where I have to make a PWM generator (adjustable with a pot) using a 555 timer. What I need done is to create a circuit that keeps the output at 200hz while being able to adjust the duty cycle from 10% to 100% using a pot or rotary switch actually.

    I'm relatively new with electronics. I've read the data sheet for the 555 and read up astable operation. So far from what I've come up with, adjusting resistor values will change both duty cycle and frequency. I need to be able to keep the frequency stable at around 200 hz, while changing the duty cycle. Also, another problem with that is that, I can't calculate it to get below 50% duty cycle for some reason.

    Does anyone have any recommendations? I am not very creative with this.

    Thanks a lot
     
  2. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    I think I can use a diode in parallel with Rb to solve the less than 50% duty cycle issue. Right?
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    Take a look here. Should help you along.

    Also, you might be interested in this, thanks to another recent thread here. Tough to justify building something when you can buy so cheaply.

    And while we're at it, if you want to drive a larger current than the 555 can handle itself, this might help you (bottom of the page).
     
    Last edited: Jun 17, 2013
  4. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Hi, I looked at those links you gave me.

    That first article doesn't really mention that I am able to adjust the PWM while keeping the frequency constant. That's my main issue at the moment. It does mention the ability to adjust frequency while not changing duty cycle.

    Do you have an idea on how to do it? I think the circuits that were given in the article all effect frequency when the duty cycle is adjusted. Thanks
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    Maybe the words don't specifically address that issue but I think that's why there are those 2 diodes on the timing pins of the 555 in PWM#1.
     
  6. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Hmm I'll go ahead and try and test it. But do you know if it's possible? To even adjust duty cycle and keep frequency constant?
    For instance in this article: http://www.learnabout-electronics.org/Oscillators/osc44.php If you scroll all the way down, they said the best they could do is from 35% to 75% with constant frequency.

    I don't know if doing 0 to 100% is possible with constant is it?
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    If you need tight frequency control, you may want a different approach. I think you could use a crystal oscillator as your clock to ensure precise frequency control. Then trigger the 555 as a one-shot monostable with adjustable "on time".

    For example, let's say the clock is running at 1Hz and thus produces a negative going trigger every second. Your 555 could be set to produce a pulse from microseconds to a full second from that single trigger. It would wait for the next negative going trigger before producing another pulse.
     
  8. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,009
    1,530
    According to everything I've read, using the two diode method of 555 PWM does NOT give a stable frequency, when the pulse width is adjusted. To do that, you need to put a comparator into the circuit. Bill Marsden has a circuit in one of his blogs that works good. At the bottom of this page, Fig. #5.3.

    http://forum.allaboutcircuits.com/blog.php?b=378
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    I would break the task down to two separate functions:

    1) 200Hz clock

    2) variable pulse width

    Don't attempt to tackle both functions with one 555 timer chip. Use one 555 timer to generate the stable 200Hz clock. If you need very high accuracy, you can use a crystal oscillator and obtain accuracy and stability to 5 parts per million.

    For the variable pulse width you can use a monostable multivibrator or a second 555 chip in monostable mode.
     
  10. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    You're right, I sent the OP to the wrong circuit on that page. The comparator approach should give 0-100% control with almost no effect on frequency.

    But the two-step approach Mr. Chips and I both suggested may be the better way to go anyway. It could be accomplished with a single 556 IC.
     
    shortbus likes this.
  11. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Here is what I got so far:

    [​IMG]

    I've tackled the problem with the two diode method. The problem now is getting the output to output a constant 200mA. The output seems to change current as I adjust the duty cycle with the pot. I have the ammeter into it correctly right?
     
  12. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    The meter measures the time-average current, so it's responding as you would expect.
     
  13. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    Using one 555 timer you can produce this PWM. The frequency is 1 kHz and the modulation is 50 Hz. The signal Original Ckt is the Williamson Lab's 50% duty cycle circuit. I left it there to illustrate the frequency did not change with a modulation index approaching 1.
     
  14. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Okay. I need it to output a constant 200mA after the NPN transistor though. It's outputting different values as I change the pot. What would you suggest to output a constant current at the output?
     
  15. ahchah08

    Thread Starter Member

    Nov 13, 2008
    11
    0
    Sorry, am I being an idiot? Am I supposed to measure the current in AC?
     
  16. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,009
    1,530

    As Wayneh said, PWM gives a constant voltage with variable current. This is why PWM is used.
     
  17. wayneh

    Expert

    Sep 9, 2010
    12,118
    3,042
    It depends what you're trying to accomplish. If you were lighting LEDs that can handle 200mA, you'd want to have each pulse hit 200mA for the time that it is on, but the meter would show the average, maybe 100mA if the duty cycle is 50%. And the LEDs would be dimmed compared to fully on.
     
Loading...