The 555 Oscillator

In the previous tutorial we saw that the 555 Timer IC can be connected either in its Monostable mode thereby producing a precision timer of a fixed time duration, or in its Bistable mode to produce a flip-flop type switching action.

But we can also connect the 555 timer IC in an Astable mode to produce a very stable 555 Oscillator circuit for generating highly accurate free running waveforms whose output frequency can be adjusted by means of an externally connected RC tank circuit consisting of just two resistors and a capacitor.

The 555 Oscillator is another type of relaxation oscillator for generating stabilized square wave output waveforms of either a fixed frequency of up to 500kHz or of varying duty cycles from 50 to 100%. In the previous 555 Timer tutorial we saw that the Monostable circuit produces a single output one-shot pulse when triggered on its pin 2 trigger input.

Whereas the 555 monostable circuit stopped after a preset time waiting for the next trigger pulse to start over again, in order to get the 555 Oscillator to operate as an astable multivibrator it is necessary to continuously re-trigger the 555 IC after each and every timing cycle.

This re-triggering is basically achieved by connecting the trigger input (pin 2) and the threshold input (pin 6) together, thereby allowing the device to act as an astable oscillator. Then the 555 Oscillator has no stable states as it continuously switches from one state to the other. Also the single timing resistor of the previous monostable multivibrator circuit has been split into two separate resistors, R1 and R2 with their junction connected to the discharge input (pin 7) as shown below.

Astable 555 Oscillator

astable 555 oscillator

 

555 oscillator waveform

 

In the 555 Oscillator circuit above, pin 2 and pin 6 are connected together allowing the circuit to re-trigger itself on each and every cycle allowing it to operate as a free running oscillator. During each cycle capacitor, C charges up through both timing resistors, R1 and R2 but discharges itself only through resistor, R2 as the other side of R2 is connected to the discharge terminal, pin 7.

Then the capacitor charges up to 2/3Vcc (the upper comparator limit) which is determined by the 0.693(R1+R2)C combination and discharges itself down to 1/3Vcc (the lower comparator limit) determined by the 0.693(R2.C) combination. This results in an output waveform whose voltage level is approximately equal to Vcc – 1.5V and whose output “ON” and “OFF” time periods are determined by the capacitor and resistors combinations. The individual times required to complete one charge and discharge cycle of the output is therefore given as:

Astable 555 Oscillator Charge and Discharge Times

555 oscillator charge and discharge time

Where, R is in Ω’s and C in Farads.

When connected as an astable multivibrator, the output from the 555 Oscillator will continue indefinitely charging and discharging between 2/3Vcc and 1/3Vcc until the power supply is removed. As with the monostable multivibrator these charge and discharge times and therefore the frequency are independent on the supply voltage.

The duration of one full timing cycle is therefore equal to the sum of the two individual times that the capacitor charges and discharges added together and is given as:

555 Oscillator Cycle Time

555 oscillator cycle time

The output frequency of oscillations can be found by inverting the equation above for the total cycle time giving a final equation for the output frequency of an Astable 555 Oscillator as:

555 Oscillator Frequency Equation

555 astable oscillator frequency

By altering the time constant of just one of the RC combinations, the Duty Cycle better known as the “Mark-to-Space” ratio of the output waveform can be accurately set and is given as the ratio of resistor R2 to resistor R1. The Duty Cycle for the 555 Oscillator, which is the ratio of the “ON” time divided by the “OFF” time is given by:

555 Oscillator Duty Cycle

555 oscillator duty cycle=

The duty cycle has no units as it is a ratio but can be expressed as a percentage ( % ). If both timing resistors, R1 and R2 are equal the output duty cycle will be given as 2:1 or 33%.

555 Oscillator Example No1

An Astable 555 Oscillator is constructed using the following components, R1 = 1kΩ, R2 = 2kΩ and capacitor C = 10uF. Calculate the output frequency from the 555 oscillator and the duty cycle of the output waveform.

  t1 – Charge “ON” time is calculated as:

ti ON time

  t2 – Discharge “OFF” time is calculated as:

t2 OFF Time

  Total periodic time is calculated as:

total periodic time

  The output frequency, ƒ is therefore given as:

555 output frequency

  Giving a duty cycle value of:

555 astable duty cycle=

 

As the timing capacitor, C charges through resistors R1 and R2 but only discharges through resistor R2 the output duty cycle can be varied between 50 and 100% by changing the value of resistor R2. By decreasing the value of R2 the duty cycle increases towards 100% and by increasing R2 the duty cycle reduces towards 50%. If resistor, R2 is very large relative to resistor R1 the output frequency of the 555 astable circuit will determined by R2 x C only.

The problem with this basic astable 555 oscillator configuration is that the duty cycle, the “mark to-space” ratio will never go below 50% as the presence of resistor R2 prevents this. In other words we cannot make the outputs “ON” time shorter than the “OFF” time, as (R1 + R2)C will always be greater than the value of R1 x C. One way to overcome this problem is to connect a signal bypassing diode in parallel with resistor R2 as shown below.

Improved 555 Oscillator Duty Cycle

555 astable oscillator duty cycle

 

By connecting this diode, D1 between the trigger input and the discharge input, the timing capacitor will now charge up directly through resistor R1 only, as resistor R2 is effectively shorted out by the diode. The capacitor discharges as normal through resistor, R2.

Now the previous charging time of t1 = 0.693(R1 + R2)C is modified to take account of this new charging circuit and is given as: 0.693(R1 x C). The duty cycle is therefore given as D = R1/(R1 + R2). Then to generate a duty cycle of less than 50%, resistor R1 needs to be less than resistor R2.

555 Oscillator Applications

We said previously that the maximum output to either sink or source the load current via pin 3 is about 200mA and this value is more than enough to drive or switch other logic IC’s, a few LED’s or a small lamp etc and that we would need to use a bipolar transistor or MOSFET to amplify the 555’s output to drive larger current loads such as motor or relays.

But the 555 Oscillator can also be used in a wide range of waveform generator circuits and applications that require very little output current such as in electronic test equipment for producing a whole range of different output test frequencies from very accurate sine, square and pulse waveforms or as LED or lamp flashers and dimmers to simple noise making circuits such as metronomes, tone and sound effects generators and even musical toys for Christmas.

We could very easily build a simple 555 oscillator circuit to flash a few LED’s “ON” and “OFF” or to produce a high frequency noise. But one very nice and simple to build science project using an astable based 555 oscillator is that of an Electronic Metronome.

Metronomes are devices used to mark time in pieces of music by producing a regular and recurring musical beat or click. A simple electronic metronome can be made using a 555 oscillator as the main timing device and by adjusting the output frequency of the oscillator the tempo or “Beats per Minute” can be set.

So for example, a tempo of 60 beats per minute means that one beat will occur every second and in electronics terms that equates to 1Hz. So by using some very common musical definitions we can easily build a table of the different frequencies required for our metronome circuit as shown below.

Metronome Frequency Table

Musical
Definition
Rate Beats per
Minute
Cycle
Time (T)
Frequency
Larghetto Very Slow 60 1sec 1.0Hz
Andante Slow 90 666ms 1.5Hz
Moderato Medium 120 500ms 2.0Hz
Allegro Fast 150 400ms 2.5Hz
Presto Very Fast 180 333ms 3.0Hz

The output frequency range of the metronome was simply calculated as the reciprocal of 1 minute or 60 seconds divided by the number of beats per minute required, for example (1/(60 secs / 90 bpm) = 1.5Hz) and 120bpm is equivalent to 2Hz, and so on. So by using our now familiar equation above for calculating the output frequency of an astable 555 oscillator circuit the individual values of R1, R2 and C can be found.

The time period of the output waveform for an astable 555 Oscillator is given as:

555 astable oscillator cycle time

 

For our electronic metronome circuit, the value of the timing resistor R1 can be found by rearranging the equation above to give.

oscillator resistor value

 

Assuming a value for resistor R2 = 1kΩ and capacitor C = 10uF the value of the timing resistor R1 for our frequency range is given as 71k6Ω at 60 beats per minute to 23k5Ω at 180 beats per minute, so a variable resistor (potentiometer) of 100kΩ would be more than enough for the metronome circuit to produce the full range of beats required and some more. Then the final circuit for our electronic metronome example would be given as:

555 Electronic Metronome

555 electronic metronome circuit

 

This simple metronome circuit demonstrates just one simple way of using a 555 oscillator to produce an audible sound or note. It uses a 100kΩ potentiometer to control the full range of output pulses or beats, and as it has a 100kΩ value it can be easily calibrated to give an equivalent percentage value corresponding to the position of the potentiometer. For example, 60 beats per minute equals 71.6kΩ or 72% rotation.

Likewise, 120 beats per minute equals 35.6kΩ or 35% rotation, etc. Additional resistors or trimmer’s can be connected in series with the potentiometer to pre-set the outputs upper and lower limits to predefined values, but these additional components will need to be taken into account when calculating the output frequency or time period.

While the above circuit is a very simple and amusing example of sound generation, it is possible to use the 555 Oscillator as a noise generator/synthesizer or to make musical sounds, tones and alarms by constructing a variable-frequency, variable-mark/space ratio waveform generator.

In this tutorial we have used just a single 555 oscillator circuit to produce a sound but by cascading together two or more 555 oscillator chips, various circuits can be constructed to produce a whole range of musical and sound effects. One such novelty circuit is the police car “Dee-Dah” siren given in the example below.

555 Oscillator Police “Dee-Dah” Siren

555 Oscillator police siren

 

The circuit simulates a warble-tone alarm signal that simulates the sound of a police siren. IC1 is connected as a 2Hz non-symmetrical astable multivibrator which is used to frequency modulate IC2 via the 10kΩ resistor. The output of IC2 alternates symmetrically between 300Hz and 660Hz taking 0.5 seconds to complete each alternating cycle.

 

« | »

13 Responses to “555 Oscillator Tutorial”

  1. Mike

    When you connect the speaker to the circuit for the ‘555 Electronic Metronome’, does it beep? Or do you just get the static clicks?

    The issue I’m running into is that the frequency of the audio has to be much higher than the frequency of the LED to be audible :/

    Reply
  2. behzad

    I have made one but for having an about 50% duty cycle I used a 1nf capacitor but the frequeny wasnt created. r=4,10 k ohm and c=1nf (thereabouts) for a 40 khz frequency. Also,is there any way we could produce a very smooth and square wave (with a good shape- a nice rectangle)? another question, how could we have the waves amplitude between -1 and 1? insted of 0 and 1? I considered LM566 for this purpose but it has a more price. I would thankful if you answer all my three questions.

    Reply
    • Wayne Storr

      For an output frequency of 40kHz, RA = RB = 18kohms, C = 1nF. To “square-off” the output waveform pass it through a digital gate, AND, NAND, OR or NOR gate whatever you want, or even a toggle flip-flop to give you two pulses Q and not-Q. The LM566 is a good oscillator but will only give 0 to +Vcc output. It maybe cheaper in the end if it does what you want with less components.

      Reply
  3. Hassan

    Hi, Can you please send me schematic of 4KHz multivibrator producing output for piezo speaker operating at 12V with least components. Thanks.

    Reply
  4. levi

    in the police siren 555 circuit, does the 10uF capacitor have to be bidirectional or would a normal electrolytic capacitor work?

    Reply
      • levi

        Thanks for that Wayne. Would you happen to have any idea why the sound is not oscillating between the frequencies?

        Reply
        • Wayne Storr

          Hello Levi, If you are getting a constant tone, about 600Hz, then check the voltage is changing on pin 5 (control voltage) of IC2. I assume IC1 is oscillating. As the output on pin 3 of IC1 changes state from high-to-low or low-to-high, two different voltages should appear on pin 5 of IC2 (the values of which depend upon your supply voltage). This causes the the output frequency of IC2 to change. Try changing the 10k fixed resistor for a 10k potentiometer and adjust to find the ohmic value for your circuit for the desired effect.

          Reply
  5. Tushar

    what if we want to convert 9v dc to 18v dc using voltage multiplier. Could you please suggest me a dc to ac converter without using MOSFET.

    Reply
  6. Leslie

    what is the highest — stable — frequency that a 555 timer can operate at ? i am having trouble finding a 2 mhz crystal to use with a 7404 for 1 mhz clock for 6502.
    thank you, Leslie.

    Reply
    • Wayne Storr

      It depends upon the type, standard TTL or low voltage CMOS based, and the quality of the timing capacitor used etc, but the maximum operating frequency during Astable operation is about 500kHz. You should be able to find this information in most 555 datasheets.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 4 = twelve

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>