Connect with us

Variable duty cycle and frequency with a 555

Discussion in 'Electronic Design' started by captoro, Apr 25, 2013.

Scroll to continue with content
  1. captoro

    captoro Guest

    Hello,

    I'm on a quest here.
    I am trying to find a circuit with a 555 timer that can both independently control the frequency and duty cycle(1% to 99%).
    Most circuit I find is either or, A few was actually what I thought i needed but when completing the circuit, I found that when varying the frequency.. the duty cycle was also changing !! or vice versa.
    I know with a LM393, (and I have that circuit) it is possible. but it is not fast enough. I can see on the scope that the 555 pulse starts to deteriorates 2.5us while the lm393 starts about at 100us
    thanks for the help

    ken
     
  2. Since you seem to be operating at relatively high frequencies, you
    could alter the duty cycle with a pot and diodes and use a variable
    capacitor to change the frequency.

    You could also do it with a microcontroller with appropriate
    peripherals on-chip (ADC inputs and a suitable timing peripheral)
     
  3. captoro

    captoro Guest

    HI,

    With further testing today I found that with Pic chip i was able to get better rise and fall time. I am not looking for high frequency, just fast risetime. The Pic chip starts to deteriorate at 2.5us and the 555 chip at 50us... now i'm thinking maybe there is something else faster then that !!

    Ken
     
  4. Guest

    Which PIC? PIC32MX can toggle I/O at 80MHz (12ns cycle) with rise and falltime of 5ns.
     
  5. Jamie

    Jamie Guest

    Single digit ns comparator example
    http://www.ti.com/lit/ds/sbos321d/sbos321d.pdf

    You can do both the triangle oscillator and comparator with
    the dual version of that..

    THat is just an example, there are many that can do the low ns
    time.

    Jamie
     
  6. mike

    mike Guest

    When you personally applied this part to the task, how did you manage
    the reliable 1% and 99% duty factors with low jitter?
    And how did you compensate for the delay through the part?

    I used to design pulse/function generators for a living, so be
    as technical as necessary.
     
  7. Bill Sloman

    Bill Sloman Guest

    This is an ill-conceived quest. If you want independent control of frequency and duty cycle, use a pair of counters, one dividing a high frequency clock - to determine your repetition frequency - from (say) falling edge to falling edge - and the other to determine where the intervening (say) rising edge appears.

    If you used a 200MHz clock generator (which you can buy, off the shelf - Farnell has eleven in stock, several of them for about $A10 each in small quantities) and a pair of 20-bit counters in programmable logic device you'd be able to get down to 200Hz.

    You'd have to limit your maximum frequency to 2MHz to be able to have a 1%/99% range on duty cycle would limit your maximum frequency to 20MHz, but the edge speeds would be fine.

    If you went for ECLinPS counters, you could use the MC100EP195 delay generator to get finer positioning of the intermediate edge.

    http://www.onsemi.com/pub_link/Collateral/MC10EP195-D.PDF

    That provides up to 10nsec of delay, allowing you to drop back to a 100MHz oscillator programmable in roughly 10psec increments. The delay is depressingly temperature dependent (see figure 4) but if you were serious you couldset up and auto-calibration procedure where you set up a fast repetition rate waveform and measure it's DC contents as a function of the mark-to-space ratio set up by the delays in the MC100EP195. You'd need a 12-bit A/D converter or better, and a decent low pass filter in front of it but there's nothing complicated involved, and you can re-calibrate in few tens of milliseconds if you do it right.
     
  8. If one were to load it directly with a reasonably hefty MOSFET gate,
    it could easily degrade to microseconds. Maybe 100-200nC would do it.

    A driver circuit (a couple BJTs or a chip) would take care of it, were
    that to be the case.


    Best regards,
    Spehro Pefhany
     
  9. Guest

    I refer you to the "IC Timer Cookbook", copyright 1977 Walter G. Jung,
    Howard W. Sam's Publishing, cat# 21416, ISBN 0-672-21416-4 - Section
    5.9.1, page 128. Another hint - it's done with diodes (resistors
    charge/discharge the timing caps through different paths). Hint 3 -
    quoting from page 130 "A very interesting version of this circuit
    results when the timing resistances, Rta and Rtb, are made the center-
    to-end resistances of a single potentiometer. With the arm of the
    potentiometer centered, Rta=Rtb, so the duty cycle will be 50%
    producing square waves. As the arm is varied to either side of
    center, Rta increases as Rtb decreases (or vice-versa), but the total
    resistance remains the same. As a result, the duty cycle can be
    varied while the frequency remains the same."
     
  10. Jamie

    Jamie Guest

    I don't give a shit what you used to do. Just like you don't
    give a shit what I do or have done..

    Do you really think that since this person has started using the
    555's or LM393 that he is really worried about fucking jitter? If that
    was the case, he should of shot any one for suggesting to use those, but
    since this isn't the case, he obviously does not care about that and
    more than likely the equipment he is using wouldn't be able to detect
    it.

    You come off like you're some damn god or something, I can say that
    you are marginal compared to a few I know, they would make you look
    like you're just starting Electronics 101 with a fringing radio shack
    do it yourself kit.

    So, making pulse generators must of been a failed adventure for you, I
    can see where that could be a possibility, or was it your attitude of
    open mouth and insert foot, which is more likely.

    P.S.

    I've been here for some time now monitoring when I can and I can
    tell you, you aren't anything special. And you'd be a fool to think
    otherwise.

    And btw, I do know how to reduce jitter down to a minimum to the point
    where is almost nonexistent, but I'll leave that up to you, since you
    are the one that made PULSE! generates for a living, you must of been
    starving.


    Jamie
     
  11. mike

    mike Guest

    Sorry you're upset. I thought I'd just asked two questions so that
    I might learn something that might improve my designs. Just wanted
    you to know that you needn't dumb it down for me.

    If you'd care to teach me/us about reducing jitter to almost nonexistent,
    I'd appreciate having the techniques in my toolbox.
    I like to learn new things.
     
  12. Jamie

    Jamie Guest

    I don't care to teach any one anything to be frank..

    I answered the question at the same level as the request.. It was
    quite understandable at what level the expected reply would have been.

    Jamie
     
  13. mike

    mike Guest

    My first job, I had the good fortune to be assigned to one of the
    few competent mentors I've ever met.

    One of the most important and enduring lessons he taught...by example...
    was that it's always more efficient to teach a concept...more than
    once...often more than twice, in my case...
    than it is to tell someone that they're stupid for not knowing.

    When presented with a proposal, FIRST THINK. Then
    ask a few pointed questions to probe areas where their understanding
    exceeds yours. The worst that can happen is that you learn something.
    You can usually tell from the tone of their answer whether they have
    anything to
    contribute or are even receptive to learning.

    Unless they're your boss, you have the option to "opt-out". ;-)

    If your first reaction is a rebuttal, you're headed in the wrong
    direction.

    If your first reaction is personal denigration, you're
    in a newsgroup.

    YMMV
     
  14. Jamie

    Jamie Guest

    At age 13 was my first tutored exposure to electronics, I was always
    interested in it before that but struggled with reading, as in
    understanding the academic world with the reference materials I had.

    My first tutor was retired but still did electronic engineering
    design and prototype work out of his home. He started as a navy
    electronics tech and after he served, he then worked as an engineer at
    Lafayette,
    Raytheon, RCA and some government work shops, through out his years
    before he retired.

    He gave me lots and lots of technical manuals and had me help him at
    the prototype work and showed me designed engineering in the process.

    I got my very first Simpson 260 from him and I still have it, as a
    memory keepsake. He also gave me all kinds of tools to work with, scope,
    generator etc. All this after a couple of years visiting mostly in the
    summer months, because he was just down the road from me and I was
    in school of course.

    From there, that open the doors for me to get schooled, jobbed and
    adult training over the years in electronics and other related fields.

    How I remember building tube circuits and I don't think I ever want to
    do that gain. Between the thermal burns and HV burns, I've had my share.

    If Only I had the youth and ambition of then with the components of
    today, I'd be dangerous.

    These days, I only design/prototype when asked for something and not
    fill up my house with un-finished experiments!

    Jamie
     
  15. Ralph Barone

    Ralph Barone Guest

    Sounds like the type of person I would like to encounter on Usenet.
     
  16. Jasen Betts

    Jasen Betts Guest


    here's how to do it with 2 555s.
    You'll need to use a fixed-pitch font to make this legible

    +V
    |
    .---------------------------.
    | | |
    | .--------+--------------------+--------+------------+
    | | | | | | |
    | | . . . .|. . . . freq. | | . . . .|. . . . |
    | | . VCC(8) . __ | | . VCC(8) . |
    | | . . /| | | . . | out
    | `--RES(4) OUT(3)---/\/\/--+ +--RES(4) OUT(3)----------
    | . 555 . / | | . 555 . |
    +----TH(6) DIS(7)-- | +--TH(6) DIS(7)-- \
    | . . | . . \ / duty
    `----TR(2) CV(5)-- +------TR(2) CV(5)----->\ cycle
    . . | . . / /
    . GND(1) . === . GND(1) . | 10K
    . . . .|. . . . | . . . .|. . . . |
    | | | |
    ----------+----------------+------------+------------+--

    neither control will be particularly liner (freq will adjust the
    period in an approximately linear fashion) and duty cycle will be
    non-linear in two different ways (and have dead zones at each end)
    one of the non-linearities can be improved by adding an NPN
    emitter follower between the potentiometer and pin 5.
    (collector to +v)


    if you can use a variable capacitor for frequency you
    can use the single 555, two-diodes varialble duty cycle
    circuit that's all over the web.
    LM339 ? there may be a way to speed that up,.
     
  17. captoro

    captoro Guest

    Actually I have been working on a pic version of this. I get much faster rise time (not clocking) then a Lm393 or a 555 timer. Yes in the nanosecond, But the 555 is in the microseconds. Unless I am mistaken... which happened before :()

    Ken
     
  18. captoro

    captoro Guest

    Just to clear up a few things. I am looking to obtain dutycycle from 1% to 100% and frequency from 200 to 2khz with fast rise and fall time. I saw someone posted the mc10eo195 chip, very fast rise and fall time.... in picoseconds ! I will look into that.

    K
     
  19. Bill Sloman

    Bill Sloman Guest

    That was in the context of an all-digital solution. If you read that post more carefully, you'd realise that what you need is (for a 2kHz maximum frequency) a 2MHz clock oscillator and a pair of 14-bit counters. The MC100EP195 doesn't make sense if you don't want frequencies above 2MHz. For a 2kHz maximum they'd be ridiculous.

    As before, I'd recommend buying the 2MHz oscillator off the shelf, and realising the two 14-bit counters in a programmable logic device. I've got a weakness for the Xilinx CoolRunner parts, and they are quite big enough and fast enough for the job.

    You might want to use Binary-Coded Decimal thumb switches to set up the twodividers. That's four pins per decade, and you'd have to think about how finely you;d want to be able to program the frequency and the mark-to-space ratio - you'd need 16-bits (4 4-bit decade counters) to cover your range ifyou wanted 0.5usec resolution on both periods, and 32 input pins to tell the programmable logic part what you wanted.

    A PIC might be a bit easier. One with an A/D converter might decode your settings from a pair of potentiometers, which might offer a tidier and more intuitive user interface. Ten-turn pots and turns-counting dials have gottenrare and expensive in recent years, but they are tidier than direct digital inputs.
     
  20. Martin Brown

    Martin Brown Guest

    You have obviously never built this circuit. It "remains the same" only
    very roughly. ie - you don't have to be a musician to hear a change in
    frequency as the mark space ratio is altered away from 50%.

    I have wondered if it was possible to design a more complex network to
    get something closer to idealised behaviour. Obviously increasing the
    operating voltage and using Schottky diodes helps a bit.

    The lazy way I found was a pair of 555s with a regulated supply one to
    set frequency and the other as a triggered monostable - the purpose
    being for a demonstration on sound waveforms to show how the character
    of a sound at constant pitch changed with mark space ratio. I also had
    to make the total power remain about constant too for this and provide
    envelope modulation (piano or guitar backwards is particularly fun).

    It depends a bit on the range of frequencies it has to cover whether or
    not this would be an acceptable solution for the OP.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-