Friday, December 14, 2012

How to Use IC 555 for Generating PWM Outputs

The IC 555 is an extremely useful and versatile device which can be applied for configuring many useful circuits in the field of electronics. One very useful feature of this IC is its ability to generate PWM pulses which can be dimensioned or processed as per the needs of the application or the circuit.

PWM stands for pulse width modulation, the process involves the control of the width of the pulses that's generated from a particular source as per the circuit specs.

Basically PWM is used for dimensioning or trimming the output voltage or power of a particular load as per individual or application requirements. It is a digital way of controlling power and is more effective than analogue or linear methods.

There are many examples which illustrates the effective use of PWM in controlling the given parameters.

It's used for controlling the speed of DC motors, in inverters for controlling the RMS of the output AC or for producing modified sine wave outputs.

It can be also seen in SMPS power supplies for controlling the output voltage to precise levels.

It's also applied in LED driver circuits for enabling LED dimming functioning.

It's extensively used in buck/boost topologies for deriving stepped down or stepped-up voltages without using bulky transformers.

So basically it may be used for tailoring an output parameter as per our own preferences.

With so many interesting application options, does it mean the method may be too complicated or expensive to configure??

The answer is definitely, no. In fact it can be very simply implemented using a single IC the LM555.

How to Use IC 555 for Generating PWM Outputs

Let's learn the following simple circuit configuration:

The diagram shows the IC 555 wired up in an easy monostable multivibrator mode. We know that in this mode the IC is able to generate a positive pulse at pin#3 in response to every single positive trigger at its pin#2. The pulse at pin#3 sustains for some predetermined time period depending upon the values of Ra and C.

We can also see the pin #2 and pin#5 assigned as clock and modulation inputs respectively.

The output is taken from the usual pin#3 of the chip.

In the above straightforward configuration the IC 555 is all set for generating the required PWM pulses, it just requires a square wave pulse or a clock input at its pin#2, which determines the output frequency, and a variable voltage input at pin#5 whose amplitude or the voltage level decides the pulse width dimensions at the output.

The pulses a pin#2 generates a correspondingly alternating triangle waves at pin#6/7 of the IC.

The above triangle waves are compared by the amplitude of the voltage applied at pin#5 for implementing the intended PWMs at pin#3 as the output.

In simple words we just need to supply a train of pulses at pin #2 and a varying voltage at pin #5 for achieving the required PWM pulses at pin#3 of the IC.

The amplitude of the voltage at pin#5 will be directly responsible in making the output PWM pulses stronger or weaker, or simply thicker or thinner. The modulation voltage can be a very low current signal, yet it would give the intended results.

For example suppose we apply a 50 Hz square wave at pin#2 and a constant 12V at pin#5, the result at the output will show PWMs with an RMS of 12V and frequency of 50Hz.

For reducing the RMS we just need to lower the voltage at pin#5. If we vary it the resultant will be a varying PWM with varying RMS values.

If this varying RMS is applied to a mosfet driver stage at the output, any load that is supported by the mosfet will also respond with correspondingly varying high and low results. If a motor is connected to the mosfet, it will respond with  varying speeds, a lamp with varying light intensities while an inverter with modified sine wave equivalents.

The Output Waveform

The above discussion can be witnessed and verified from the given waveform illustration below:


The topmost waveform represents the modulation voltage at pin#5, the bulge in the waveform represents the rising voltage and vice versa.

The second waveform represents the uniform clock pulse applied at pin#2. It's just for enabling the IC to switch at a certain frequency, without which the IC wouldn't be able to work as a PWM generator device.

The third waveform depicts the actual PWM generation at pin#3, we can see that the width of the pulses is directly proportional to the top modulation signal. The pulse widths corresponding to the "bulge" can be seen as much wider and closely spaced which proportionately becomes thinner and sparse with the fall in the modulation voltage level.

The above concept can be very easily and effectively applied in power control applications as discussed earlier in the above article.

For more info, you may read this article: http://www.ti.com/lit/ds/symlink/ne555.pdf 


34 comments:

  1. Hi Swagat,
    How to connect this in my inverter circuit ?.(CD4047 inverter circuit)

    ReplyDelete
    Replies
    1. Hi Vinod,

      It will be an elaborate design, I'll try to present the discussion as a new article soon.

      Delete
  2. Hi Sir Swatatam.

    Hi! How are you? I'm very glad I found this article from the net. Thank you very much for this. BTW, I'm interested on simple SMPS as charger for lead acid batteries and I found this PWM control of yours, I'm wondering if how this will work on EN13007 (even just 120HZ boost from 60 HZ, I would be very glad if it's more :)). I'm not good in electronics, I just know conventional types and I'll be very glad to learn much from you.

    Thanks very much.

    ReplyDelete
    Replies
    1. Thanks PSK,

      The above concept is specifically suited for creating modified sine waveforms for applying in modified sive wave inverters. SMpSs employ much advanced topologies and ICs since AC mains is involved, so may be the above concept will not hold good for applying in smps circuits....

      anyway you are welcome to share your discussions here :)

      Delete
  3. Thanks for the reply sir and sorry for the wrong spelling of your name. I'll be sharing my questions here.

    Oh I see. I want to learn about how PWM works on correcting the output on the final stage of the supply(Just like the conventional ATX power supply w/c the performance depends on the demand load, but not that very complex design).Sorry I get the simple logic but I'm still confuse. I've seen your designed here of your CHEAP SMPS here:

    http://homemadecircuitsandschematics.blogspot.com/2012/05/cheapest-smps-circuit-using-mje13005.html#uds-search-results

    I'll be using Two Transistor Forward design.

    I'm very glad your here to accommodate me sir. Thanks a lot again.

    ReplyDelete
    Replies
    1. Thanks PSK,

      With the advent of modern ICs like the VIPer22 etc, smps circuits have become safer and more reliable.

      You can read this datasheet of the IC VIPer22S where it explains everything right from its basic PWM functionality to FEEDBACK PIN PRINCIPLE OF OPERATION.

      http://www.datasheetcatalog.org/datasheet/stmicroelectronics/8989.pdf

      I have also explained one simple smps design using the above IC here:

      http://homemadecircuitsandschematics.blogspot.in/2012/03/how-to-make-simple-12-v-1-amp-switch.html

      Regards.

      Delete
  4. Thank you very much Sir Swagatam.

    I now somehow understand the operation. Can I modify this circuit for higher amperage rating? I'm planning to make a charger w/c has smaller transformers so that it would be handy.

    Thanks again and regards !

    ReplyDelete
    Replies
    1. Hi PSK,

      Can you provide complete specifications of your project.
      What kind of transformer are you using?

      Regards.

      Delete
    2. Hello sir swagatam

      I'll just be using silicon Laminated steel E Cores. Will it be good?? I'm targeting to have 45v 15a and 2x15v 5a each. It's ok for me to have minimal 2ndary filters because I'll just be using it for charging batteries.

      I'm very thankful you take time replying to my concern.

      Delete
    3. Hello PSK,

      If you are intending to derive more power (voltage+current) from a low power source then I am afraid that won't be possible, because the overall power will be always equal to:

      Output < Input....efficiency can never be more than 100%

      You can raise the voltage by sacrificing current, that would be possible.

      Regards.

      Delete
    4. For your requirement SMPS would be the best option but it will involve complicated configurations and complicated ferrite transformers.

      Delete
    5. Hi Sir Swagatam.

      Oh I see. Unfortunately I can't find ferrite cores here in our place. Maybe I'll stick to linear type of supply. I really want to imitate pc supply but lesser components and less complexity.

      BTW, I'm very thankful sir for your attention and for having me taught about smps. Thanks a lot.

      Regards.

      Delete
    6. Hi PSK,

      To make smaller transformer power supply you will have to go for ferrite cored transformers to be operated at very high frequencies.

      With iron cored transformers it would be just the opposite.....bulky transformers, no circuit required, to be plugged directly to the AC mains for the results.

      Thanks and regards.

      Delete
    7. Hi sir Swagatam

      Can Iron Core transformers handle high frequencies? I'm currently winding my own. but unfortunately, I don't have a smps design to look on so I stick with linear type.

      Regards

      Delete
    8. Hi PSK,

      Iron core transformers will not respond to high frequencies, only ferrite core transformers will respond to high frequencies.

      Regards.

      Delete
  5. Sir,
    can i get a circuit to shift pwm pulse by say 10 ms.how to delay the pwm signal from 555 timer (to make it start after some preset delay) .pls can you help me out with this.
    thank you sir

    ReplyDelete
    Replies
    1. It will require some thinking.....I'll let you if I am able to get a proper solution for it.

      Delete
  6. Hi mr.swagatam,
    http://postimage.org/image/6gu06rp15/
    how to introduce time delay as shown in the image.
    both must have same duty cyle (pwm signal) but the second signal must start after a small delay
    thank you!!

    ReplyDelete
    Replies
    1. you can probably do it by adding 6 NOT gates from IC4049 with the output of a standard 555 IC astable.

      join all the NOT gates in series, join the first gates input with pin3 of IC555 via a resistor, also connect a capacitor across this input of the gate and ground.

      The value of the above RC will decide the ms shift of the pulses.

      the relevant pulses may be acquired at pin3 of 555 and the output of the 6th NOT gate.

      alternatively you may refer to the datasheet of IC LM567, i think this IC can be also modified for generating such pulses.

      Delete
  7. Thank you very much it was very helpful
    thank you

    ReplyDelete
  8. Hello Sir,

    Please can you give a PWM lead acid battery charger circuit, which take 220v power from electric company.
    In other words i need a non solar PWM charger.

    Thanks.

    Rashid

    ReplyDelete
    Replies
    1. Hello Rashid,

      you can try the following circuit, just replace the solar panel with an AC/DC adapter source.

      http://homemadecircuitsandschematics.blogspot.in/2013/04/simple-solar-mppt-circuit-using-ic555.html

      Delete
  9. Hello Sir,

    Thank you for your reply. I have seen another circuit which was also invented by you and consist upon a single 555 ic, and two transistors TIP 122 and 2N2222 and some diodes and capacitors. That circuit is not any more on you site. But it is on the following link

    http://forum.donanimhaber.com/m_3899535/mpage_151/tm.htm

    I just need to ask you that, will it work too ??

    Please Reply.
    Thank you.

    Rashid


    ReplyDelete
  10. Hello Sir,

    One more question, at what value POT should be adjusted in the above circuit ??

    Rashid

    ReplyDelete
    Replies
    1. Hello Rashid,

      use Ra = 3k,

      Rl = 1k

      and C = 0.02uF

      Delete
    2. Hello Rashid,

      the above comment was for the above circuit, please refer to the following ink for your answer:

      http://homemadecircuitsandschematics.blogspot.in/2012/09/make-400-watt-mosfet-sine-wave-inverter.html

      Delete
  11. Hi Swagatam,

    This is a great post, with some inspiring information. I have a question if I may. I have a SMPS converting 230vAC down to 24vDC @ 40A. I need to control the output voltage from 0-24v. I'm looking into using PWM and so would the 555 be the right solution? i'm not an electrical engineer but I need to have a clue about whats possible before I try and commission the product.

    Many thanks.

    David

    ReplyDelete
    Replies
    1. Hi David,

      Yes it can be done. Pease reer to the following diagram. The upper section is what you need to make, ignore the lower IC/mosfet section its not required. Pin3 of IC2 555 will produce the required PWMs
      The above output can be configured to a mosfet stage for controlling the load, the PWMs then may be adjusted by varying the 10k RMS pot or preset.

      Delete
    2. ...sorry here's the link:

      http://1.bp.blogspot.com/-M-7Ep_6ceTg/UeOHwdVvZeI/AAAAAAAAE1A/OKN0F_jVmkw/s1600/pure%20sine%20wave%20inverter%20circuit.png

      Delete
    3. Hi Swagatam,
      I was wondering if you could help me with my project. I need a pwm motor speed controller for my 12V, 3A motor and I want to run it 1 minute ON and ~5 minutes off to save battery power. I have a 4060 ic that can be used on the timer part but not sure if you can use it for PWM?? Thanks in advance.

      Delete
    4. Hi Charlie,

      For PWM control you can try the last circuit shown in this article:

      http://homemadecircuitsandschematics.blogspot.in/2013/02/how-to-make-simple-220v-transformerless.html

      ignore the 4 diode bridge circuit, simply connect your motor across the positive and the mosfet drain.

      The 10k preset can be used for controlling the motor speed.

      Delete
    5. correction: the above link is not the correct one, please refer to this link:

      http://homemadecircuitsandschematics.blogspot.in/2013/09/simple-electronic-load-controller-elc.html

      Delete

Readers are requested not to include external links while commenting. For consulting a diagram, upload it on Google Drive and provide the link here.

Readers are advised to proceed with the construction of the presented circuits only after understanding the concepts from the core. Not adhering to this can lead to failures and frustrations.