• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

tony ennis

New Member
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?
 

crutschow

Well-Known Member
Most Helpful Member
Running the signal through a divide by 2 flip-flop is the standard way to guarantee a 50% duty cycle.
 

dknguyen

Well-Known Member
Most Helpful Member
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.electro-tech-online.com/custompdfs/2009/06/LM555.pdf
 

Attachments

Last edited:

MikeMl

Well-Known Member
Most Helpful Member
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.
 

BrownOut

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

Mr RB

Well-Known Member
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.
 

dougy83

Well-Known Member
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).
 

Attachments

audioguru

Well-Known Member
Most Helpful Member
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.
 

Hero999

Banned
Technically nothing gives an exact 50% duty cycle.

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

BrownOut

Banned
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.
 

nike6

Banned
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.
 

Siddhanth

New Member
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
 

BrownOut

Banned
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.
 

Siddhanth

New Member
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)
 

im_in_asia_now

New Member
If you place a diode D1 in parallel with resistor Rb between 6 and 7, adjust the value of Rb to match the series resistance across Ra (between Vcc and 7) and D1.

For example, instead of using 50K for both Ra and Rb, I got a more even duty cycle using a 53K resistor for Rb.

555 ~50% duty cycle.JPG

555 out.JPG
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top