+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 18

Thread: How can I make square wave pulses have a 50% duty cycle?

  1. #1
    tony ennis Newbie
    Join Date
    May 2009
    Location
    Louisville, KY USA
    Posts
    45

    Default How can I make square wave pulses have a 50% duty cycle?

    I have a 555 circuit generating square wave pulses between 1Hz and 60KHz. I'm using a variable resistor. As the resistance changes, the character of the square wave will change - the proportion of time-high to time-low will differ.

    I feel I'll be better off if the square wave has a 50% duty cycle.

    One idea I had was to run the pulses into a counter or flip-flop. This would reduce my frequency by a factor of 2 but this is ok as I planned for it.

    But what are other ways?


  2. #2
    crutschow Excellent crutschow Excellent crutschow Excellent crutschow Excellent crutschow Excellent crutschow Excellent
    Join Date
    Mar 2008
    Location
    USA
    Posts
    3,020

    Default

    Running the signal through a divide by 2 flip-flop is the standard way to guarantee a 50% duty cycle.
    Carl
    Curmudgeon Elektroniker

  3. #3
    dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent
    Join Date
    May 2006
    Location
    Alberta, Canada
    Posts
    6,028

    Default

    You have to think of a way to get the timing capacitor to charge and discharge through the same resistance to get 50% duty cycle. It's on Google somewhere...if I remember right it involved using bypass diodes so the charge and discharge current only flows through certain resistors which means you can choose the discharge and charge resistance independently of each other (rather than just Ra+Rb on charge and Rb on discharge which means the resistances will always be different).

    The other method involves using other pins to charge and discharge the capacitor instead of the normal ones charge/discharge pins.
    Page 10 FIgure 14 shows this method:
    http://www.national.com/ds/LM/LM555.pdf
    Attached Images
    Last edited by dknguyen; 17th June 2009 at 04:23 AM.
    Tanaka Sensei (avatar) says: Please spell it "ridiculous" correctly! Not "rediculous". ^^

  4. #4
    MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent
    Join Date
    Mar 2009
    Location
    Utah
    Posts
    2,859

    Default

    You can add a diode and resistor to the 555 astable timing network and get a 50% duty cycle at one frequency (or maybe over a narrow range of frequencies) but getting it to track over your wide frequency range is not doable.

  5. #5
    BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent
    Join Date
    Jun 2009
    Location
    Huntsville, Alabama USA
    Posts
    2,174

    Default

    I have one operating at 50%. If it can wait till tomorrow, I'll post a schematic.

  6. #6
    Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent
    Join Date
    Jul 2008
    Location
    Out there
    Posts
    1,761

    Default

    Just run one resistor from pin 3 output to the cap, and don't connect discharge pin 7. You will get 50:50 duty cycle if it is a CMOS 555, almost 50:50 for the olf TTL version.

    Replace the resistor with a pot and you get a wide frequency range but always with 50:50 duty.

    Even better still make the oscillator using one schmidt inverter from a 74HC14 or any CMOS hex schmidt inverter chip. Same deal, put a cap from input to ground and a resistor from the output pin back to the input. They make very nice square wave oscillators and you get 5 more inverters in the chip to use as power drivers, signal inverters, other oscillators etc.

  7. #7
    dougy83 Good dougy83 Good dougy83 Good
    Join Date
    May 2008
    Location
    Brisbane, Australia
    Posts
    756

    Default

    See attached schem (ignore component values). The duty cycle should stay constant over the frequency range. You may want to put a series resistor inline with the pot.

    If you use a CMOS version of the 555, it's quite easy to get quite close to 50% D/C.

    In fact, if you adjust the voltage on pin 5 you should be able to get 50% D/C using a non-cmos part (for a given suply voltage).
    Attached Images

  8. #8
    audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent audioguru Excellent
    Join Date
    Mar 2004
    Location
    Canada, of course!
    Posts
    19,864

    Default

    A CD4047 is a Cmos chip with an RC oscillator that can have its frequency changed over a wide range by changing the value of its resistor. It also has a divide-by-2 flip-flop inside that gives a perfect 50:50 duty-cycle for its two outputs. One output is inverted from the other.
    Uncle $crooge

  9. #9
    Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent Hero999 Excellent
    Join Date
    Apr 2006
    Location
    England
    Posts
    13,108

    Default

    Technically nothing gives an exact 50% duty cycle.

    For example a flip-flop will have different propagation delays when turning on and off.

    I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong.

    Please ask on the open forum if you have a question and I'll be happy to help,
    if I know the answer.

  10. #10
    BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent
    Join Date
    Jun 2009
    Location
    Huntsville, Alabama USA
    Posts
    2,174

    Default

    If you used This Circuit you can fine tune the duty cycle for 50%. Try replacing the 500K variable resistor with a smaller value trimpot, and change the 10K fixed resistor for a high-value variable for frequency variation.

    You'll have to trade off range of duty-cycle tuning for frequency tuning range, but it shouldn't take much to maintain 50% since mid-point in the trimmer should be pretty close to start with. If you don't get enough frequency range, add a switch for different capacitor values.

    I build and tested a very similar circuit. If memory serves, the duty cycle was pretty consistant over the range of frequencies.

  11. #11
    Banned nike6 Bad
    Join Date
    May 2009
    Location
    Ireland
    Posts
    123

    Default

    why not use a 16F54 (for high frequency),
    or 10f200 (which has internal 4MHz clock source)?

    then you can program any duty cycle, different frequencies etc.

    16f54 costs about 70 cents, and is a small 18pin SMD IC.

  12. #12
    tony ennis Newbie
    Join Date
    May 2009
    Location
    Louisville, KY USA
    Posts
    45

    Default

    There are other chips I could use. But I have a 555 and a counter

  13. #13
    Siddhanth Newbie
    Join Date
    Jun 2009
    Posts
    4

    Default

    if you're operating the IC in astable mode, attach a diode in parallel across the resistor b/w pin 4 & pin 7. The purpose of the diode is to bypass this resistor during charging so that charging occurs only through R76 instead of R47 + R76. Acc to the pricnciple of operation of IC555 as soon as control voltage is reached the capacitor will discharge through R76 only till threshold level. Now if charging & discharging is ocuring through the same effective resistance, Duty Cycle will be 50%
    Ton = 0.693(R47+R76)C but R47 is bypassed for any positive going signals and hence effectively, Ton = 0.693(R76)C = Toff.
    There's your 50% duty cycle

  14. #14
    BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent
    Join Date
    Jun 2009
    Location
    Huntsville, Alabama USA
    Posts
    2,174

    Default

    Quote Originally Posted by Siddhanth View Post
    if you're operating the IC in astable mode, attach a diode in parallel across the resistor b/w pin 4 & pin 7. The purpose of the diode is to bypass this resistor during charging so that charging occurs only through R76 instead of R47 + R76. Acc to the pricnciple of operation of IC555 as soon as control voltage is reached the capacitor will discharge through R76 only till threshold level. Now if charging & discharging is ocuring through the same effective resistance, Duty Cycle will be 50%
    Ton = 0.693(R47+R76)C but R47 is bypassed for any positive going signals and hence effectively, Ton = 0.693(R76)C = Toff.
    There's your 50% duty cycle
    Have you built this circuit? I wouldn't bypass the resistor.

  15. #15
    Siddhanth Newbie
    Join Date
    Jun 2009
    Posts
    4

    Default

    yessir i have. you can bypass either of the two resistors, actually. its safer to bypass R76 and then choose values of R47 = R76 so that current drawn by the 555 doesn't increase to over 200A (which i believe is the max. sinking capacity)

+ Reply to Thread
Page 1 of 2
1 2 Last

Similar Threads

  1. Measuring the duty-cycle of a square wave
    By eng1 in forum Micro Controllers
    Replies: 3
    Latest: 7th November 2006, 08:30 PM
  2. 40% duty cycle square wave generator circuit.I need help to develop this circuit
    By navinthan in forum Electronic Projects Design/Ideas/Reviews
    Replies: 28
    Latest: 2nd November 2006, 08:57 PM
  3. "Heavy Duty" Square Wave Oscillator
    By Hayato in forum Electronic Projects Design/Ideas/Reviews
    Replies: 24
    Latest: 25th June 2006, 10:32 PM
  4. IMPORTANT >> Make square wave lag by 90 degrees?
    By Roff in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 15th June 2004, 12:11 PM
  5. IMPORTANT >> Make square wave lag by 90 degrees?
    By davepusey in forum Electronic Projects Design/Ideas/Reviews
    Replies: 10
    Latest: 13th June 2004, 03:41 AM

Tags for this Thread