Creating different duty cycles?

Thread Starter

peck68

Joined Nov 27, 2009
73
Im still a novice at all this, and i'm learning the 555 timer - however i have been reading this awesome tutorial on it http://www.kpsec.freeuk.com/555timer.htm

But though, i want to learn how to create different duty cycles. Since the little guide on there doesn't really help me much so i was wondering for some extra support from this forum?

Thanks :)
 

Thread Starter

peck68

Joined Nov 27, 2009
73
Anything really, 75%/90%/25% etc - basically just learn how to change it to my desired needs, since i want to dim LEDs (as a project for me to do)
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
On that same page you linked to, scroll about halfway down until you see "To achieve a duty cycle of less than 50%" in red on the left.

Look at the schematic on the right.

Then, look at the schematic and simulation that I've attached. It's very similar, except I've replaced R2 with a 100k potentiometer (pot).

Adjusting pot R2 will give you a very wide range of duty cycle outputs, from around 3% to around 98%.

R1 must be present, and it should be at minimum 100 Ohms for each volt of Vcc. Without R1, if you turned the pot all the way up, the timer's pin 7 would be shorted to Vcc, which would destroy the timer and/or the pot.

C1 is the timing capacitor. If you want to use it to flash LEDs at a slow rate, increase the size of the timing capacitor. 10uF to 100uF will make the flashes quite visible.

C2 keeps the control voltage stable. It is not critical, and may be omitted if you don't care about accuracy of your PWM.
C3 and C4 are required. Without them, your timer may not function correctly.

If you wish to use it as an LED dimmer, decrease C1 to 10nF (0.01uF), and the on/off cycle will be so rapid that you will not see the flashing.

Note that if you are dimming LEDs, you must still use a resistor to limit the maximum LED current.
 

Attachments

Thread Starter

peck68

Joined Nov 27, 2009
73
Ahh thank you :D

Erm, one more thing - are C3 and C4 constants? As in, there is no need to change the values?

---

Would a 10k pot be ok for a PWM or would i need 50 or 100k?
 

SgtWookie

Joined Jul 17, 2007
22,230
Ahh thank you :D
You're welcome. :)

Erm, one more thing - are C3 and C4 constants? As in, there is no need to change the values?
That is correct.
They are what is known as "supply bypass capacitors".
The 555 timer family has a flaw in that when the output changes states, there is a very brief dead short across Vcc and ground. The 0.1uF cap should be a metalized poly or ceramic cap. the 10uF can be an aluminum electrolytic rated for at least Vcc x 2.

---

Would a 10k pot be ok for a PWM or would i need 50 or 100k?
10k is too low.

50k or 100k is good.

You can go up to 1 MEG if you decrease C1 to compensate.
 

Thread Starter

peck68

Joined Nov 27, 2009
73
Ahh okay i think i got the jist of it :)

I had a go at making a small 3 LED dimmer. I changed R1 though to 2.2k instead since you said 100 ohms for every volt, over 200 per one is safe enough ;)

Also i left out the control voltage, but was i supposed to ground it or leave it bare legged?
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
I had a go at making a small 3 LED dimmer. I changed R1 though to 2.2k instead since you said 100 ohms for every volt, over 200 per one is safe enough
That's OK. However, if you are powering the circuit using a battery, keep in mind that having a small R1 value will drain the battery much more quickly.

Pin 7 of the 555 is the timing capacitor discharge pin. When the output (pin 3) is low, pin 7 is connected to ground; it is an "open collector" transistor current sink. When pin 7 is sinking current to discharge the timing cap, current is flowing through not only R2, but R1 as well.

Your circuit:



... has a couple of problems.
1) C1 and C2 are connected in series. This is not correct. They should be connected in parallel; if they are polarized capacitors, the negative lead connects to ground.

2) Control (pin 5) is shown connected to ground. This is not correct. Control connects to a voltage divider that is internal to the 555. It controls the threshold and trigger points. Normally, it is at 2/3 Vcc. Adding a 10nF cap to ground helps to keep this voltage stable. If it is shorted to ground, the timer will either oscillate at maximum frequency (ignoring R1, R2, and C1) or not do anything at all.
 

Thread Starter

peck68

Joined Nov 27, 2009
73
Oops thanks for letting me know about that

Okay, does C3 have to be polarised? Since i just realised it's not really possible to get hold of 10nF electrolytics
 

SgtWookie

Joined Jul 17, 2007
22,230
No, C3 does not have to be polarized.
Metalized poly film works very well. If you don't have metalized poly film, you can use ceramics or "green caps" or just about anything you have on hand. Note that the voltage rating should be at least twice the maximum voltage that it will be exposed to. In the case of C3, that is Vcc x 2/3.

It's the aluminum electrolytic and tantalum caps you really have to watch out for. If you approach their maximum voltage rating, they can short out or burst on you.
 
Top