Instructables

Step 7: 555 Timer: Astable Mode Duty Cycle

The duty cycle of a pulse wave is the ratio of the time it spends high to the total duration of the high and low state.  We calculated these durations in step 5, and we can combine them to calculate the duty cycle of the 555:

duty cycle = (time spent high) / (total time duration of high and low states)
substitute the equations from step 5 to get:
duty cycle = (0.7*(RA + RB)*C) / (0.7*(RA+2*RB)*C)

this simplifies to:
duty cycle = (RA+ RB) / (RA + 2*RB)

In the equation above, when RA is much larger than RB (you can ignore the RB terms) you end up with a duty cycle ~= 1 and when RB is much larger than RA (you can ignore the RA terms) you get a duty cycle =~ 1/2.  So the limits of the duty cycle with the circuit shown in fig 2 are 50% to 100%.  If you wanted to get a duty cycle that was less than 50%, you have to use a circuit like the one shown in fig 1.  In this circuit a diode bypasses RB during the charging phase of the 555 (while the output is held high).  So how does this affect the durations of the high and low phases of the output?

The duration of low output remains:
t = 0.7*RB*C seconds
this happens when the capacitor is discharging, so current is flowing from the capacitor, through RB (in the upwards direction in fig 1), and into the discharge pin of the 555.  This is the opposite direction of current flow that the diode will accept, so no current flows through the diode.  During this time, the circuit in figure 1 is functionally equivalent to the circuit in fig 2.

The duration of high output does change, most notably the RB contribution goes away because it is being bypassed by the diode.  In this case the capacitor is being charged so current is flowing from the power supply Vcc, through RA (in the downward direction in the schematic), and through the diode to the capacitor.  Current will not flow through RB because the path through the diode is the path of lease resistance; the diode is essentially acting as a wire across RB.

Previously the duration of high output was:
t = 0.7*(RA+RB)*C seconds
we cannot simply remove RB from the equation because we need to account for a slight voltage drop (about 0.7V for silicon diodes) across the diode.  We calculated the general form of the duration of high output in step 5.  I've reproduced it below:
t = -(RA+RB)*C*ln[1/3*Vcc/(Vcc - V0)]
we should subtract the voltage drop from the diode (Vd) from both instances of Vcc in this equation and remove the contribution from RB
t = -RA*C*ln[(1/3*Vcc-Vd)/(Vcc - Vd - V0)]
as in step 4, the initial voltage V0 equals 1/3Vcc
t = -RA*C*ln[(1/3*Vcc - Vd)/(Vcc - Vd- 1/3Vcc)]
t = -RA*C*ln[(1/3*Vcc - Vd)/(2/3*Vcc - Vd)]
t = -RA*C*ln[(Vcc - 3*Vd)/(2*Vcc - 3*Vd)]

so the the duration of the high output is now
t = RA*C*ln[(2*Vcc - 3*Vd)/(Vcc - 3*Vd)]
Notice how there is no RB dependance.  Also notice how the voltage drop across the diode and the supply voltage have an effect on the equation.

It's good to note here that you can also use monostable mode with an external trigger to create a PWM signal of duty cycles between 0 and 100%.  I explained how to do this at the end of step 4.  Even more info about PWM with the 555 timer can be found on the datasheet.
 
Remove these adsRemove these ads by Signing Up
"In the equation above, when RA is much larger than RB (you can ignore the RB terms) you end up with a duty cycle ~= 1 and when RB is much larger than RA (you can ignore the RA terms) you get a duty cycle =~ 1/2. So the limits of the duty cycle with the circuit shown in fig 2 are 50% to 100"

Note that this is not true.

You can set r1 to 0, and this gives you a %50 duty cycle. The only reason to have a resistor at R1 is to modify the duty cycle, and to keep a straight VCC from burning up the internal transistor at pin 7. This can be rectified by adding a resistor at GND. giving you a pure 50% duty cycle for the full range of r2.

Note that output is HIGH while charging through R1 + R2, and low while discharging through R2 only. IE the High duty time can never be smaller than the low duty time. limiting the duty cycle to greater than %50.
dcoman1 year ago
isn't this a better use of the lm555 timer :

http://www.overclockers.com/pwm-fan-controller
amandaghassaei (author)  dcoman1 year ago
you could do lots of things with this pwm signal: change the speed of motors, dim leds... this is just an example circuit.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!