Search
  • fezec

555 IC as an Astable Timer

Updated: Feb 8, 2019


The familiar adage, timing is everything, couldn't be more true than in an example of a computer. While there are many necessary components that are required to make up a computer, most if not all would lack the ability to work cohesively if not for a at least 1 mechanism to maintain the tempo. The 555 timer in an astable configuration can be likened to that of a conductor of an orchestra. A symphony comprised of wind, brass, and wooden instruments, all special instruments in their own right, would be unable to harmonize if not for their conductor.


The majority of advanced electronics leverage at least one singular oscillating mechanism to operate properly. Advanced electronics possess at least one of the following components: counter, latche, flip-flop, shift register, ram etc... The aforementioned components are built around the concept of binary logic, which directly translates the transition between states such as on->off (not necessarily in that order) to that of behavior, state and or data. The speed or frequency at which said transitions must occur, is typically documented in the datasheet by the component's manufacturer. The speed or more accurately the frequency, is given in a range of Hz. Before we continue any further, let's quickly discuss a few key terms.


Cycle

If you were to plot a sine wave on a graph using the mathematical equation y=sin(x), you'd wind up with a wavy formation ascending and descending the y-axis as seen in the image below.

A cycle is defined as the wave form between 1 point on one wave to the corresponding point on an adjacent wave. The points used can be corresponding peaks or troughs of adjacent waves and even offset if we so chose.

Period

A period represents the time (in seconds) required to complete a cycle.


Frequency

Frequency is the total number of cycles that occur within 1 second. The unit of measurement for Frequency is Hertz or Hz. 1 Hz represents 1 cycle per second. 2 Hz represents two full cycles in 1 second, etc... etc...


HIGH Signal

A HIGH signal in electronics refers to the presence of voltage. A HIGH signal can be used to describe the presence of voltage for input or output. HIGH and ON can be used interchangeable but HIGH is preferable.


LOW Signal

A LOW signal in electronics refers to the absence of voltage. It can be used to reference input or output. LOW and OFF are sometimes interchanged but it's preferable to use LOW.


Square Wave

Square waves are waveforms not unlike the sine wave above. However, these waves don't alternate between positive and negative values but rather as either HIGH or LOW signals which accounts for its nom de gare. Square waves are commonly produced by oscillators like our 555 IC.


Duty Cycle

Since we already know what a cycle represents in terms of a wave form, the only thing that needs to be explained is the word Duty. Duty simply relates to work. Therefore the Duty Cycle focuses on the percentage of the Cycle that is doing work or is active. In other words, the duty cycle refers to the percentage of a cycle in which the signal is HIGH.


A 50% duty cycle represent a cycle whos HIGH signal is equal HIGH as it is LOW.

A 75% duty cycle represents a cycle whos HIGH signal is 3/4 of the duration

a 25% duty cycle represents a cycle whos HIGH signal is 1/4 the duration


According to various texts that I have read, the 555 timer is named as such due to three 5K ohm resistors that it makes internal use of. While this article does not attempt to explain the internals of the component, it is worth noting the internals are responsible for monitoring and comparing signals present at its inputs and of course generating a square wave as output.


The image shown below reveals the pins exposed by the IC and labels them by their nature. Moving counter-clockwise, the chip exposes ground, trigger, output, reset, control, threshold, discharge and power.

555 timer and exposed leads

The oscillation in the astable state is due impart to the external factors on pin 2 (the trigger) and pin 6 (the threshold). A drop in voltage from HIGH to LOW on these two pins, results in a HIGH signal on pin 3 (output). At this point, if a HIGH signal is applied to pin 6 (threshold), pin 3 (output) will now output a LOW signal. Controlling how often this occurs, or even the duration for which it occurs allows us to modify the frequency and duty cycle of the generated square wave.


With the working knowledge regarding oscillation out of the way, all that is needed now is a means to continuously switch between a discharge state and a recharged state-enter the Capacitor. To keep this lesson from spiraling into to many topics, let's reduce a Capacitor to nothing more than an instantaneous rechargeable battery.


The addition of a capacitor enables us to charge it to the same voltage as the source. While the charge in the battery remains lower than the power source, our circuit will experience a potential difference and will continue to charge our capacitor. However, once our capacitor is fully charged, we will have an infinite amount of resistance and the current flow in our circuit will cease. As with any fully charged battery, the energy stored can act as the power source, which in doing so will deplete the stored charge. I think you can immediately see where this is heading. By continuously charging and discharging our capacitor we can successfully devise an astable timer.


In order to control the frequency, we need to control the period with which the capacitor charges and drains. Faster charges/drains increase the frequency while slower charges/drains decrease frequency. Because a resistor restricts the flow of electrons, to add one inline with our capacitor would in-fact restrict the rate of charge and discharge, thus providing the answer we seek. Before we get further, let's begin viewing a demonstration of an astable timer constructed using semi random capacitor and resistor values.

In the video above, I used the combination of a 1.6K ohm resistor and 100 µFarad capacitor to produce a frequency of 1 Hz. This is not only corroborated via the Oscilloscope on the left, but can witnessed in the LED itself. At the top of the second, the LED turns off just as a new cycle begins. I mentioned earlier that our 'battery' can charge instantaneously, and as you saw in the video, it can discharge immediately too. Choosing the proper resistor/capacitor combination will determine the duration in seconds to charge/discharge.


I chose the 1.6k ohm resistor as the result of randomly choosing a 100 µFarad capacitor. As I wanted to ensure the frequency would be around 1 second I had to calculate the proper resistor to use in combination. To help with this combination, I used the RC Time Constant.

RC Time Constant

The RC Time Constant is a simple equation that solves for Time in seconds, the charge/discharge rate for a Resistor R and Capacitor. The equation is as follows:

T=R*C


By substituting 2 values in the equation above, we can solve for Time, Resistance or Capacitance. T of course is represented in seconds, R is in ohms and C is in Farads.

If we were to substitute the 2 known values from the video above, 13.6K ohm and .001 Farads we would calculate the time to charge or discharge as the following:

T (secs) = 136000 ohms * .0001 F

or 1.36 seconds.


Using the RC time constant, we calculated that it will take 1.36 seconds to charge or discharge. Before you begin to wonder why the period is 1 second and not 2 seconds (charge and discharge), allow me to explain.


Due to the placement of the resistor in our circuit, as seen in the image below, the current from the power source must travel through the resistor to our capacitor. However, in the case of discharge, because current takes the path of least resistance, current flows away from the capacitor towards pin 7 of the 555 timer bypassing the resistor altogether. Thus creating a near instant discharge.



This is why the LED is on for the majority of the time and off for a mere instant. If we wish the discharge to take 1.36 seconds as well, we must ensure that current passes through the resistor prior to reaching pin 7. Using 2 resistors as previously described to control the rate of charge and discharge provides the means to specify duty cycle. One caveat to note is that when 2 resistors are in series, the total resistance is equal to both resistors, which would impact the duration to Charge. In order to find the proper combination of R1 and R2 you will need to consider ohm's law. On the other hand you can use a convenient site such as https://houseofjeff.com/555-timer-oscillator-frequency-calculator/ to determine the proper combination given a desired frequency.


The image below uses a 1K ohm and 330k ohm resistor in series, in conjunction with a 2.2 µFarad capacitor to create a 1Hz frequency with a 50% duty cycle. Note the placement of the second resistor R2. It has been placed prior to the path of pin 7.


You can witness the 50% duty cycle of the above circuit in the video below


The astable oscillator is perfect for complex projects, and is bound to be necessary by one or more of your upcoming projects. I know that it is for myself.


Where to go from here:

Depending on where your interests lie, there are plenty of great articles out there regarding the 555 IC. For further reading on the 555 astable timer, I recommend reading the following article. Furthermore, the 555 astable oscillator is only a tip of the iceberg. There are plenty of interesting topics that you may wish to engage based on this content.


Related Topics:

Pulse Width Modulation

Monostable oscillator

Astable oscillator

Waveform generators

Crystal Oscillator

18 views

©2018 by Smithbe.me.