You are on page 1of 28

Timers

Anybody recognize this?

Introduction
What is a timer?
A timer is an integrated circuit that uses an oscillator measure elapsed time or count/time an external event

What is an oscillator?
Oscillators are used to generate a signal that can regenerate and sustain itself Usually made of quartz crystal

The 555 Timer


First introduced in the early 1970s the 555 timer is still widely used in many systems. It is composed of over:
20 transistors 15 resistors 2 diodes

The 555 Timer: Pin Functions


Pin 1 Ground
Connected directly to ground

Pin 2 Trigger
Input to the lower comparator and is used to set the latch which causes the output to go high Triggering happens when the voltage level is taken from above to below a voltage level of 1/3 V+

The 555 Timer: Pin Functions


Pin 3 Output
Output high is slightly lower (1.7V) than the supply voltage The state of the output pin will always reflect the inverse of the logic state of the latch

Pin 4 Reset
Used to reset the latch and return the output to a low state The reset voltage threshold is 0.7V+, and a sink current of 0.1mA

The 555 Timer: Pin Functions


Pin 5 Control Voltage
Direct access to the 2/3 V+ voltage divider point in voltage control mode Connect to ground through a 0.01 mF capacitor when not in use

Pin 6 Threshold
Input into the upper comparator Used to reset the latch, which drives the output low

The 555 Timer: Pin Functions


Pin 7 Discharge
When the npn transistor is connected, it is turned on, the pin is shorted to ground The timing capacitor is usually between pin 7 and ground and is discharged when the transistor turns on

Pin 8 V+
The positive supply voltage terminal to the 555 timer IC

The 555 Timer: Examples


Schmitt Trigger
The Schmitt trigger takes a noisy input and creates a very clean output. It uses the 1/3V+ and 2/3V+ thresholds to produce the wave output

The 555 Timer: Examples


A more stable timing output can be produced by adding a transistor and diode the the RC network The frequency can be varied over a wide range will using a constant 50% duty cycle

The 555 Timer: Examples


A one-shot monostable circuit that is continually retriggered by input pulses A missing pulse results in pin 3 going low until a new input pulse is received

Timers
An external capacitor is used to determine the offon time intervals of the output pulses for all IC timers The time required for the capacitor to charge to 63.7% of the applied voltage is the time constant, t

t R C

Time Constant Example


Time Constant
The time constant of an RL circuit is also equal to the inductance divided by the resistance. It usually takes 5 time constants for the capacitor to charge to the applied voltage.

Example:
R = 1M C = 1 mF t = 1,000,000 0.000001 = 1 second

Timer Types
Also Known As: Multivibrator
Multivibrators are a class of circuits that are designed to produce square waves or pulses.

There are 3 types of timers:


Monostable Multivibrators Astable Multivibrators Bistable Multivibrators

Timer Types: Astable


Astable Multivibrator
The frequency of operation of the astable circuit is dependent upon the values of R1, R2, and C. f = 1/(ln(2) x C x (R1 + 2 x R2)) f = 1/T f is in Hz. R is in C is in Farads T is in seconds

Astable operation
One popular application of the 555 timer IC is an astable multivibrator or clock circuit. An astable circuit produces a 'square wave', this is a digital waveform with sharp transitions between low (0V) and high (+Vs). Note that the durations of the low and high states may be different. The circuit is called an astable because it is not stable in any state: the output is continually changing between 'low' and 'high'.

Astable operation
The time period (T) of the square wave is the time for one complete cycle, but it is usually better to consider frequency (f) which is the number of cycles per second. T = 0.7 (R1 + 2R2) C1 and f = 1.4/[(R1 + 2R2) C1] T = time period in seconds (s) f = frequency in hertz (Hz) R1 = resistance in ohms () R2 = resistance in ohms () C1 = capacitance in farads (F) The time period can be split into two parts: T = Tm + Ts Mark time (output high): Tm = 0.7 (R1 + R2) C1 Space time (output low): Ts = 0.7 R2 C1

Timer Types: Astable


Duty Cycle, D
The duty cycle is defined as the ratio of the time duration when output pulse is high to the total period

t 1 R1 R 2 D t R1 2R 2

t 1 ln( 2) R1 R 2 C t 2 ln( 2) R 2 C

Timer Types: Astable


An Astable Multivibrator
A multivibrator that produces a square wave output from a DC voltage. Astable Output Pulses

Astable operation as an oscillator


the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the output circuit can source or sink up to 200mA or drive TTL circuits.

t 1 R1 R 2 D t R1 2R 2

Timer Types: Monostable


A Monostable Multivibrator
A multivibrator with a single stable output state. When triggered, the output will switch to the unstable state for a set period of time, which is determined by the resistor and capacitor values. It remains in this state until a separate signal triggers the timer. One-Shot Pulse Output Delay On Output The duration of the output pulse, in seconds, is approximately T = 1.1 R C (in seconds)

Timer Types: Monostable


Monostable Multivibrator Circuit

Timer Types: Monostable


Missing Pulse Detector
Changes in the input pulse signal complete the timing cycle The monostable ON time is set approximately 1/3 longer than the expected time between trigger pulses

Applications and Examples

Applications of Timers
Timers are used for a variety of applications in many situations Required for any application requiring real-time control Can be used for both input and output timing Often multiple timers are needed for the various functions required for real-time control Timers are basically everywhere you look: watches, household appliances, manufacturing systems, basically anything automated

Applications of Timers
Pulse Width Modulation (PWM) is a very common method of generating an analog signal
Requires the use of timers as well as interrupts Can be used to run DC motors

Hardware interrupt timing is important for many timing applications


Reaction time or delay time between events Pulse Accumulator

Example: LM555 Timer


The LM555 is a highly stable device for generating accurate time delays or oscillation. Additional terminals are provided for triggering or resetting if desired. In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor. For astable operation as an oscillator, the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the output circuit can source or sink up to 200mA or drive TTL circuits.

Applications of TIMER
Precision timing Pulse generation Sequential timing Time delay generation Pulse width modulation Pulse position modulation Linear ramp generator

You might also like