Sei sulla pagina 1di 81






Submitted in partial fullfilment of the requirament for the award of degree of



Submitted By

RAKESH KUMAR(ECE,S6) Reg. No:-00600697







This is to certify that the project report on “AUTOMATIC TRAFFIC

SIGNAL CONTROLLER” is a bonafide work done by

Reg. No:-00600697

During the year2009 in the partial fulfillments of the requirements for the award of the degree
of Bachelor of Technology in ELECTRONICS & COMMUNICATION of
Cochin University College of Engineering, Kuttanadu during the academic year 2009

Coordinator Project Guide Head of Department




Dreams never turn to reality unless a lot of effort and hard work
is put in to it. And no effort bears fruit in the absence of support
and guidance. It takes a lot of effort to work your way through
this goal and having someone to guide you and help you is
always a blessing. I would like to take this opportunity to thank
a few who were closely involved in the completion of this
project. Ingenuity and popular guidance are inevitable for
successful completion of a project. I am indebted to all sources
that helped me in working out this project at each steps of its
First and foremost Mr. Oomen Samuel principal, for
granting permission to proceed with the project and providing
the necessary facilities/ I sincerely thanks Mrs. Deepa R. the
Head of department, Department of Electronics &
Communications, for the valuable help provided to me.In
particular I extremely grateful to Project coordinator Mrs. Rijimol
mathew and Project guide Mrs. Lekshmy Gopal lecture,
Department of Electronics & Communication for their valuable
suggestion and proper guidance to complete my project. Above
all I thank the lord almighty for giving me all the confidence and
ability to achieve this dream!




This automated traffic signal controller can be made by suitably

programming GAL device. Its main features are:-
1. The controller assumes equal traffic density on all the roads.
2. In most automated traffic signals the free left-turn condition is
provided throughout the entire signal period, which poses
difficulties to the pedestrians in crossing the road, especially
when the traffic density is high. This controller allows the
pedestrians to safely cross the road during certain periods.
3. The controller uses digital logic, which can be easily
implemented by using logic gates.
4. The controller is a generalized one and can be used for
different roads with slight modifications.

5. The control can also be exercised manually when desired.

The time period for which green, yellow and red traffic signals
remain ‘on’ (and then repeat) for the straight moving traffic is
divided into eight units of 8
Seconds (or multiples thereof) each.


 History
 Technology

 Functional Block Diagram

 Circuit Diagram
 PCB Layout
 Components Used
 The Situation
 The solution to the problem


 The working of system

4. Description of Major Components

 555 Timer-Bistable Multivibrator

 7408 IC
 7432 IC
 7411 IC
 7404 IC
 74160 IC
 Resistors &Capacitors
 Light Emitting Diode

5. Advantages


Now a days due to ever increasing vehicles on the road,

it require a efficient control on the four way junction of
road. In order to find a solution to this problem the
concept of an automatic traffic controller is conceived.
Apart from providing efficient control of traffic, it also
eliminate chance of human errors since it function
The automatic traffic controller automatically switches
on the four way junction for 15 seconds for direction
The main circuit components used are 555-Timer and 4-
bit binary synchronous counter (74160). The 555-Timer
generates a clock signal for 15 seconds. This signal is
used to clock counter circuit. Binary counter is converted
to 3 bit–counter to achieve 8 possible cases. The traffic
light control is done by different Boolean function of logic

On 10 December 1868, the first traffic lights were
installed outside the British Houses of Parliament in London, by the
railway engineer J. P. Knight. They resembled railway signals of the
time, with semaphore arms and red and green gas lamps for night use.
The gas lantern was turned with a lever at its base so that the
appropriate light faced traffic. Unfortunately, it exploded on 2 January
1869, injuring the policeman who was operating it.

The modern electric traffic light is an American invention. As early as

1912 in Salt Lake City, Utah, policeman Lester Wire invented the first
red-green electric traffic lights. On 5 August 1914, the American
Traffic Signal Company installed a traffic signal system on the corner
of East 105th Street and Euclid Avenue in Cleveland, Ohio. It had
two colors, red and green, and a buzzer, based on the design of James
Hoge, to provide a warning for color changes. The design by James
Hoge allowed police and fire stations to control the signals in case of
emergency. The first four-way, three-color traffic light was created by
police officer William Potts in Detroit, Michigan in 1920.In 1923,
Garrett Morgan patented a traffic signal device. It was Morgan's
experience while driving along the streets of Cleveland that led to his
invention of a traffic signal device. Ashville, Ohio claims to be the
location of the oldest working traffic light in the United States, used at
an intersection of public roads until 1982 when it was moved to a
local museum.

The first interconnected traffic signal system was installed in Salt

Lake City in 1917, with six connected intersections controlled
simultaneously from a manual switch. Automatic control of
interconnected traffic lights was introduced March 1922 in Houston,
Texas. The first automatic experimental traffic lights in England were
deployed in Wolverhampton in 1927.

Ampelmännchen pedestrian traffic signals have come to be seen as a
nostalgic sign for the former German Democratic Republic.

The color of the traffic lights representing stop and go are likely
derived from those used to identify port (red) and starboard (green) in
maritime rules governing right of way, where the vessel on the left
must stop for the one crossing on the right.

Optics and lighting:-

In the mid 1990s, cost-effective traffic light lamps using light-

emitting diodes (LEDs) were developed; prior to this date traffic
lights were designed using incandescent or halogen light bulbs.
Unlike the incandescent-based lamps, which use a single large bulb,
the LED-based lamps consist of an array of LED elements, arranged
in various patterns. When viewed from a distance, the array appears
as a continuous light source.

LED-based lamps (or 'lenses') have numerous advantages over

incandescent lamps; among them are:

• Much greater energy efficiency (can be solar-powered).

• Much longer lifetime between replacement, measured in years
rather than months. Part of the longer lifetime is due to the
fact that some light is still displayed even if some of the LEDs in
the array are dead.
• Brighter illumination with better contrast against direct
sunlight, also called 'phantom light'.
• The ability to display multiple colors and patterns from the
same lamp. Individual LED elements can be enabled or
disabled, and different color LEDs can be mixed in the same
• Much faster switching.
• Instead of sudden burn-out like incandescent-based lights, LEDs
start to gradually dim when they wear out, warning
transportation maintenance departments well in advance as to
when to change the light. Occasionally, particularly in green
LED units, segments prone to failure will flicker rapidly

The operational expenses of LED-based signals are far lower than

equivalent incandescent-based lights. As a result, most new traffic
light deployments in the United States, Canada and elsewhere have

been implemented using LED-based lamps; in addition many existing
deployments of incandescent traffic lights are being replaced. In 2006,
Edmonton, Alberta, Canada completed a total refit to LED-based
lamps in the city's over 12,000 intersections and all pedestrian
crosswalks. Many of the more exotic traffic signals discussed on this
page would not be possible to construct without using LED
technology. However, color-changing LEDs are in their infancy and
may surpass the multi-color array technology.

In some areas, LED-based signals have been fitted (or retrofitted)

with special Fresnel lenses (Programmed Visibility or 'PV' lenses)
and/or diffusers to limit the line of sight to a single lane. These signals
typically have a "projector"-like visibility; and maintain an
intentionally limited range of view. Because the LED lights don't
generate a significant amount of heat, heaters may be necessary in
areas which receive snow, where snow can accumulate within the lens
area and limit the visibility of the indications.

Another new LED technology is the use of CLS (Central Light

Source) optics. These comprise around 7 high-output LEDs
(sometimes 1 watt) at the rear of the lens, with a diffuser to even out
and enlarge the light. This gives a uniform appearance, more like
traditional halogen or incandescent luminaries.

Replacing halogen or incandescent reflector and bulb assemblies

behind the lens with an LED array can give the same effect. This also
has its benefits: minimal disruption, minimal work, minimal cost and
the reduced need to replace the entire signal head (housing).





Components Specification Quantity

1.555 Timer 4.5 to 15 V, 200mA 1

2.Capacitors 10µf,16v 1
0.1µf 1
3.Resistors 240kΩ 1
270kΩ 1
470Ω 18
4.LED Green 10
Red 4
Yellow 4
5.IC 74160 1
7432 2
7404 1
7411 3
7408 1
6.IC base 8Pin 1
14Pin 7
16Pin 1
6.connector SIP2 5
SIP3 2
SIP4 2

3. The working of the system:
 The corresponding circuit automatically controls the
traffic signal during the day as well as nights.
In this system there are one 555 timer and one 74160
synchronous 4 bit counter, which is controlling whole device.
Along with there are some electronic equipments like 7404,
7408, 7411 gate, capacitor, resistor, LED (yellow, green, red)
The time period for which green, yellow, and red traffic signals
remain ‘on’
(And then repeat) for the straight moving traffic is divided into
eight units of 8 seconds (or multiples thereof) each.

 flow of traffic in all possible directions:

Fig. above shows the flow of traffic in all permissible directions

during the eight time units of 8 seconds each. For the left- and
right turning traffic and pedestrians crossing from north to
south, south to north, east to west ,and west to east, only green
and red signals are used.


Table I shows the simultaneous states of the signals for all the
traffic. Each row represents the status of a signal for 8 seconds.
As can be observed from the table, the ratio of green, yellow,
and red signals is 16:8:40 (=2:1:5) for the straight moving
traffic. For the turning traffic the ratio of green and red signals is
8:56 (=1:7), while for pedestrians crossing the road the ratio of
green and red signals is 16:48 (=2:6) In Table II (as well as
Table I) X, Y, and Z are used as binary variables to depict the
eight states of 8 seconds each. Letters A through H indicate the
left and right halves of the roads in four directions as shown in
Fig. 1. Two letters with a dash in between indicate the direction
of permissible movement from a road. Straight direction is
indicated by St, while left and right turns are indicated by Lt and
Rt, respectively. The Boolean functions for all the signal
conditions are shown in Table II. The left- and the right-turn
signals for the traffic have the same state, i.e. both are red or
green for the same duration, so their Boolean functions are
identical and they should be connected to the same control
output. The circuit diagram for realizing these Boolean
functions is shown in circuit diagram. Timer 555 (IC1) is wired
as an astable multivibrator to generate clock signal for the 4-bit
counter 74160 (IC2).
The time duration of IC1 can be adjusted by varying the value
of resistor R1, resistor R2, or capacitor C2 of the clock circuit.
The ‘on’ time duration T is given by the following relationship:
T = 0.693C2(R1+R2)
IC2 is wired as a 3-bit binary
counter by connecting its Q3 output to reset pin 1 via inverter
N1. Binary outputs Q2, Q1, and Q0 form variables X, Y, and Z,
respectively. These outputs, along with their complimentary
outputs X’, Y’, and Z’, Respectively, are used as inputs to the
rest of the logic circuit to realize various outputs satisfying
Table I. You can simulate various traffic lights
Using green, yellow, and red LEDs and feed the outputs of the
circuit to respective LEDs via current-limiting resistors of 470
ohms each to check the working of the circuit. Here, for turning
traffic and pedestrians crossing the road, only green signal is

made available. It means that for the remaining period these
signals have to be treated as ‘red’ in practice, the outputs of
Fig. 2 should be connected to operate high – power bulbs.
Further, if a particular signal condition (such as turning signal)
is not applicable to a given road, the output of that signal
condition should be connected to green signal of the next state
(refer Table I).

The traffic signals can also be controlled manually, if it desired.
Any signal state can be established by entering the binary
value corresponding to that particular state into the parallel
input pins of the 3-bit counter. Similarly, the signal can be reset
at any time by providing logic 0 at the reset pin (pin 1) of the
counter using an external switch. A software program to verify
the functioning of the circuit using a PC is given below. (Source
code and executable file will be provided in the next month’s

 Generic array logic (GAL

An innovation of the PAL was the generic array logic

device, or GAL, invented by lattice semiconductor in
1985. This device has the same logical properties as the
PAL but can be erased and reprogrammed. The GAL was
an improvement on the PAL because one device was
able to take the place of many PAL devices or could even
have functionality not covered by the original range. The
GAL is very useful in the prototyping stage of a design,
when any bugs in the logic can be corrected by
reprogramming. GALs are programmed and
reprogrammed using a PAL programmer, or by using the
in-circuit programming technique on supporting chips.
Lattice GALs combine CMOS and electrically erasable
(E^2) floating gate technology for a high-speed, low-
power logic device.
A similar device called a PEEL (programmable
electrically erasable logic) was introduced by the
International CMOS Technology (ICT) corporation.

The GAL family includes fourteen distinct product

architectures, with a variety of performance levels
specified across commercial, industrial, and military (MIL-
STD883) operating ranges, to meet the demands of any
system logic design

These GAL products can be segmented into two broad
 Base products
 Extension products
Base Products - Aimed at providing superior design
alternatives to bipolar PLDs, these five architectures
replace over 98% of all bipolar PAL devices. The
GAL16V8 and GAL20V8 replace forty-two different PAL
devices. The GAL22V10, GAL20RA10, and GAL20XV10
round out the base products. These GAL devices meet
and, in most cases, beat bipolar PAL performance
specifications while consuming significantly lower power
and offering higher quality and reliability via Lattice’s
electrically reprogrammable E2CMOS technology. High-
speed erase times (<100ms) allow the devices to be
reprogrammed quickly and efficiently.

Extension Products - These products build upon the

Base GAL product features to provide enhanced
functionality including innovative architectures
(GAL18V10 GAL26CV12, GAL6001/6002), 64mA high
output drive (GAL16VP8 & GAL20VP8), “Zero power”
operation (GAL16V8Z/ZD & GAL20V8Z/ZD) and In-
System Programmability.

 A Product for any System Design Need

Lattice GAL products have the performance, architectural

features, low power, and high quality to meet the needs
of the most demanding system designs.

 Introduction to GAL Device Architectures:-

 The GAL 16V8 and GAL 20V8
The GAL16V8 (20-pin) and GAL20V8 (24-pin) provide the
highest speed performance available in the PLD market
at 3.5 ns and 5.0 ns respectively. CMOS circuitry allows
the GAL16V8 and GAL20V8 low power devices to
consume just 75mA typical Icc, which represents a 50%
savings in power when compared to bipolar counterparts
Quarter power versions save even more at 45mAlcc.
The GAL16V8 is a 20-pin device which contains eight
dedicated input pins and eight I/O pins. The GAL20V8 is
a 24-pin version of the 16V8 device with 12 dedicated
input pins and eight I/O pins. Their generic architecture
provides maximum design flexibility by allowing the
Output Logic Macro cell (OLMC) to be configured by the
user. An important subset of the many architecture
configurations possible with the GAL16V8 and GAL20V8
are the standard PAL architectures. Providing eight
OLMCs with eight product terms each, GAL16V8 and
GAL20V8 devices are capable of emulating virtually all
PAL architectures with full function/fuse map/parametric

 Output Logic Macro cell
There are three OLMC configuration modes possible in
GAL16V8 and GAL20V8 devices: registered, complex,
and simple. You cannot mix modes; all OLMCs are either
simple, complex, or registered (in registered mode, the
output can be combinational or registered).
The outputs of the AND array are fed into an OLMC,
where each output can be individually set to active high
or active low, with either combinational (asynchronous) or
registered (synchronous) configurations. A common
output enable is connected to all registered outputs, or a
product term can be used to provide individual output
enable control for combinational outputs in the registered
mode or combinational outputs in the complex mode.
There is no output enable control in the simple mode.
The OLMC provides the designer with maximum output
flexibility in matching signal requirements, thus providing
more functionality than possible with standard PAL

4. Integrated Circuits (Chips)
Integrated Circuits are usually called ICs or chips. They are
complex circuits which have been etched onto tiny chips of
semiconductor (silicon). The chip is packaged in a plastic
holder with pins spaced on a 0.1" (2.54mm) grid which will fit
the holes on strip board and breadboards. Very fine wires
inside the package link the chip to the pins.

Pin numbers
The pins are numbered anti-clockwise
around the IC (chip) starting near the
notch or dot. The diagram shows the
numbering for 8-pin and 14-pin ICs, but the principle is the
same for all sizes.

IC holders (DIL sockets)

ICs (chips) are easily damaged by heat when soldering
and their short pins cannot be protected with a heat
sink. Instead we use an IC holder, strictly called a DIL socket
(DIL = Dual In-Line), which can be safely soldered onto the
circuit board. The IC is pushed into the holder when all
soldering is complete.

IC holders are only needed when soldering so they are not

used on breadboards.

Commercially produced circuit boards often have ICs soldered

directly to the board without an IC holder; usually this is done

by a machine which is able to work very quickly. Please don't
attempt to do this yourself because you are likely to destroy the
IC and it will be difficult to remove without damage by de-

Removing an IC from its holder

If you need to remove an IC it can be gently prised out of the

holder with a small flat-blade screwdriver. Carefully lever up
each end by inserting the screwdriver blade between the IC
and its holder and gently twisting the screwdriver. Take care to
start lifting at both ends before you attempt to remove the IC,
otherwise you will bend and possibly break the pins.

THE 555 TIMER – NE 555

The 8-pin 555 timer must be one of the most useful chips ever
made. This is a highly stable device for generating accurate
time delay or oscillation .With just a few external components it
can be used to many circuits, not all of them that involve timing!
A single 555 timer can provide time delay ranging from
microseconds to hours whereas counter time can have
maximum timing range of days. The 555 can be used with a
supply voltage (Vs) in the range 4.5 to 15V (18 V absolute) and
can drive load up to 200 mA. Because of wide range of supply
voltage, the 555 timer is versatile and easy to use in various

 Inputs of 555 Timer:-
Trigger input: - When <1/3 Vs (‘active low’) this makes the
output high (+Vs). It monitors the discharging of the timing
capacitor in an astable circuit. It has a high input

Threshold input: -When > 2/3 Vs (‘active high’) this makes the
output low (0V)*.It monitors the charging of the timing capacitor
in astable and monostable circuits. It has a high input
*Providing the trigger input is <1/3 Vs (the trigger inputs
overrides the threshold input).

Reset input: -When less than about 0.7 V (‘active low’) this
makes the output low (0V), overriding other inputs. When not
required it should be connected o + Vs. It has an input
impedance of about 10 K.

Control input: -This can be used to adjust the threshold

voltage which is set internally to be 2/3 Vs. Usually this function
is not required and the control input is connected to 0v with a
0.01 µf capacitor to eliminate noise. It can be left unconnected
if noise is not a problem.

The discharge pin: - It is not an input, but it is listed here for

convenience. It is connected to 0Vwhen the timer output is high
and is used to discharge the timing capacitor ion astable and
monostable circuits.

 Output of 555:-
The 555 output (pin 3) can sink and source up to 200mA.
This is more than most chips and it is sufficient to supply many
output transducers directly, including LEDs (with a resistor in
series), low current lamps, piezo transducers, loudspeakers
(with a capacitor in series), relay coils (with diode protection)
and some motors (with diode protection). The output voltage
does not quite reach 0V and + Vs, especially if a large current
is flowing.

Functional block diagram of 555 IC



Precision timing
Pulse generation
Sequential timing
Time delay generation
Pulse width modulation

Function table


Low irrelevant irrelevant Low On
High < 1/3 Vdd irrelevant High Off
High > 1/3 Vdd > 2/3 Vdd Low On
High > 1/3 Vdd < 2/3 Vdd As previously

:-- voltage level shown are nominal

8-Pin Plastic 0 to +70 °C NE555D SOT96-1
Small Outline
(SO) Package
8-Pin Plastic 0 to +70 °C NE555N SOT97-1
Dual In-Line
Package (DIP)
8-Pin Plastic –40 °C to +85 °C SA555D SOT96-1
Small Outline
(SO) Package
8-Pin Plastic –40 °C to +85 °C SA555N SOT97-1
Dual In-Line
Package (DIP)
8-Pin Plastic –55 °C to +125 °C SE555CN SOT97-1
Dual In-Line
Package (DIP)




VCC Supply voltage
SE555 +18 V
NE555, +16 V
PD Maximum 600 mW
Tamb Operating
ambient 0 to +70 °C
temperature –40 to +85 °C
range –55 to +125 °C
Tstg Storage –65 to +150 °C
TSOLD Lead soldering +230 °C
(10 sec max)

1. The junction temperature must be kept below 125 °C for
the D package and below 150°C for the N package. At
ambient temperatures above 25 °C, where this limit would
be derated by the following factor
2. D package 160 °C/W

N package 100 °C/W

7408 IC:-
Quad 2-input AND gates:

General description:--
This device contains four independent gates each of which
performs the logic AND function.

7432 IC:
Quad 2-input or gate

Absolute maximum ratings:-

Supply voltage Input voltage

Operating free air temperature range 0°C to 70 °C
Storage temperature range -65°C to +150°C

 7411 IC:-

inputs output
Absolute maximum ratings:-

Supply voltage 7V
Input voltage 5.5 V
Operating free air temperature range 0°C to 70°C
Storage temperature range -65°C to +150°C

The ``Absolute Maximum Ratings'' are those values beyond

which the safety of the device cannot be guaranteed. The
device should not be operated at these limits. The
Parametric values defined in the ``Electrical Characteristics’’
table are not guaranteed at the absolute maximum ratings. The
``Recommended Operating Conditions'' table will define the
conditions for actual device operations.

 7404 IC:-

Quad 2-input NOT gates:

General description:--
This device contains four independent gates each of which
performs the logic NOT function.




Inputs (A) Output (Y)


Absolute maximum ratings:-

Supply voltage 7V
Input voltage 7V
Operating free air temperature range 0°C to 70°C
Storage temperature range -65°C to +150°C

 74160 IC:

74160-3 synchronous counters

 74160 synchronous decade counter (standard reset)
 74161 synchronous 4-bit counter (standard reset)
 74162 synchronous decade counter (synchronous reset)
 74163 synchronous 4-bit counter (synchronous reset)

These are synchronous counters so their outputs change

precisely together on each clock pulse. This is helpful if you
need to connect their outputs to logic gates because it avoids
the glitches which occur with ripple counters.

The count advances as the clock input becomes high (on the
rising-edge). The decade counters count from 0 to 9 (0000 to
1001 in binary). The 4-bit counters count from 0 to 15 (0000 to
1111 in binary).

For normal operation (counting) the reset, preset,

count enable and carry in inputs should all be high. When
count enable is low the clock input is ignored and counting

The counter may be preset by placing the desired binary

number on the inputs A-D, making the preset input low, and
applying a positive pulse to the clock input. The inputs A-D
may be left unconnected if not required.

The reset input is active-low so it should be high (+Vs) for

normal operation (counting). When low it resets the count to
zero (0000, QA-QD low), this happens immediately with the
74160 and 74161 (standard reset), but with the 74162 and
74163 (synchronous reset) the reset occurs on the rising-
edge of the clock input.

Counting to less than the maximum (15 or 9) can be

achieved by connecting the appropriate output(s) through a
NOT or NAND gate to the reset input. For the 74162 and 74163
(synchronous reset) you must use the output(s) representing
one less than the reset count you require, e.g. to reset on 7
(counting 0 to 6) use QB (2) and QC (4).

Connecting synchronous counters in a chain
the diagram below shows how to link synchronous counters
such as 74160-3, notice how all the clock (CK) inputs are
linked. Carry out (CO) is used to feed the carry in (CI) of the
next counter. Carry in (CI) of the first 74160-3 counter should
be high.


Capacitors store electric charge. They are used with resistors in
timing circuits because it takes time for a capacitor to fill with
charge. They are used to smooth varying DC supplies by acting
as a reservoir of charge. They are also used in filter circuits
because capacitors easily pass AC (changing) signals but they
block DC (constant) signals.


This is a measure of a capacitor's ability to store charge. A

large capacitance means that more charge can be stored.
Capacitance is measured in farads, symbol F. However 1F is
very large, so prefixes are used to show the smaller values.
Three prefixes (multipliers) are used, µ (micro), n (nano) and p

• µ means 10-6 (millionth), so 1000000µF = 1F

• n means 10-9 (thousand-millionth), so 1000nF = 1µF
• p means 10-12 (million-millionth), so 1000pF = 1nF

Capacitor values can be very difficult to find because there are

many types of capacitor with different labeling systems!

There are many types of capacitor but they can be split into two
groups, polarised and unpolarised. Each group has its own
circuit symbol.

Polarised capacitors (large values, 1µF +)

Examples: Circuit symbol:

Electrolytic Capacitors

Electrolytic capacitors are polarised and they must be

connected the correct way round, at least one of their leads
will be marked + or -. They are not damaged by heat when

There are two designs of electrolytic capacitors; axial where

the leads are attached to each end (220µF in picture) and
radial where both leads are at the same end (10µF in picture).
Radial capacitors tend to be a little smaller and they stand
upright on the circuit board.

It is easy to find the value of electrolytic capacitors because

they are clearly printed with their capacitance and voltage
rating. The voltage rating can be quite low (6V for example) and
it should always be checked when selecting an electrolytic
capacitor. If the project parts list does not specify a voltage,
choose a capacitor with a rating which is greater than the
project's power supply voltage. 25V is a sensible minimum for
most battery circuits.

Tantalum Bead Capacitors

Tantalum bead capacitors are polarised and have low voltage

ratings like electrolytic capacitors. They are expensive but very
small, so they are used where a large capacitance is needed in
a small size.

Modern tantalum bead capacitors are printed with their
capacitance, voltage and polarity in full. However older ones
use a colour-code system which has two stripes (for the two
digits) and a spot of colour for the number of zeros to give the
value in µF. The standard colour code is used, but for the spot,
grey is used to mean × 0.01 and white means × 0.1 so that
values of less than 10µF can be shown. A third colour stripe
near the leads shows the voltage (yellow 6.3V, black 10V,
green 16V, blue 20V, grey 25V, white 30V, pink 35V). The
positive (+) lead is to the right when the spot is facing you:
'when the spot is in sight, the positive is to the

For example: blue, grey, black spot means 68µF

For example: blue, grey, white spot means
For example: blue, grey, grey spot means 0.68µF

Unpolarised capacitors (small values, up to 1µF)

Examples: Circuit symbol:

Small value capacitors are unpolarised and may be connected

either way round. They are not damaged by heat when
soldering, except for one unusual type (polystyrene). They have
high voltage ratings of at least 50V, usually 250V or so. It can
be difficult to find the values of these small capacitors because
there are many types of them and several different labelling

Many small value capacitors have their value printed
but without a multiplier, so you need to use
experience to work out what the multiplier should be!

For example 0.1 means 0.1µF = 100nF.

Sometimes the multiplier is used in place of the decimal point:

For example: 4n7 means 4.7nF.

Capacitor Number Code:

A number code is often used on small capacitors where printing

is difficult:

• the 1st number is the 1st digit,

• the 2nd number is the 2nd digit,
• the 3rd number is the number of zeros to give the
capacitance in pF.
• Ignore any letters - they just indicate tolerance and voltage

For example: 102 means 1000pF = 1nF (not 102pF!)

For example: 472J means 4700pF = 4.7nF (J means 5%


Capacitor Colour Code Colour Code
A colour code was used on polyester Colour Number
capacitors for many years. It is now obsolete, Black 0
but of course there are many still around. The
Brown 1
colours should be read like the resistor code,
the top three colour bands giving the value in Red 2
pF. Ignore the 4th band (tolerance) and 5th Orange 3
band (voltage rating). Yellow 4
For example: Green 5
Blue 6
brown, black, orange means
10000pF = 10nF = 0.01µF. Violet 7
Grey 8
Note that there are no gaps
between the colour bands, so 2 White 9
identical bands actually appear as a
wide band.

For example:

wide red, yellow means 220nF = 0.22µF.

Polystyrene Capacitors

This type is rarely used now. Their value (in

pF) is normally printed without units.
Polystyrene capacitors can be damaged by heat when
soldering (it melts the polystyrene!) so you should use a heat
sink (such as a crocodile clip). Clip the heat sink to the lead
between the capacitor and the joint.

Real capacitor values (the E3 and E6 series)

You may have noticed that capacitors are not available with
every possible value, for example 22µF and 47µF are readily
available, but 25µF and 50µF are not!

Why is this? Imagine that you decided to make capacitors
every 10µF giving 10, 20, 30, 40, 50 and so on. That seems
fine, but what happens when you reach 1000? It would be
pointless to make 1000, 1010, 1020, 1030 and so on because
for these values 10 is a very small difference, too small to be
noticeable in most circuits and capacitors cannot be made with
that accuracy.

To produce a sensible range of capacitor values you need to

increase the size of the 'step' as the value increases. The
standard capacitor values are based on this idea and they form
a series which follows the same pattern for every multiple of

The E3 series (3 values for each multiple of ten)

10, 22, 47, ... then it continues 100, 220, 470, 1000, 2200,
4700, 10000 etc.
Notice how the step size increases as the value increases
(values roughly double each time).

The E6 series (6 values for each multiple of ten)

10, 15, 22, 33, 47, 68, ... then it continues 100, 150, 220, 330,
470, 680, 1000 etc.
Notice how this is the E3 series with an extra value in the gaps.

The E3 series is the one most frequently used for capacitors

because many types cannot be made with very accurate

Variable capacitors

Variable capacitors are mostly

used in radio tuning circuits
and they are sometimes called
'tuning capacitors'. They have Variable Capacitor Symbol
very small capacitance values,
typically between 100pF and
500pF (100pF = 0.0001µF).
The type illustrated usually
has trimmers built in (for Variable Capacitor
making small adjustments - Photograph © Rapid Electronics
see below) as well as the main
variable capacitor.

Many variable capacitors have very short spindles which are

not suitable for the standard knobs used for variable resistors
and rotary switches. It would be wise to check that a suitable
knob is available before ordering a variable capacitor.

Variable capacitors are not normally used in timing circuits

because their capacitance is too small to be practical and the
range of values available is very limited. Instead timing circuits
use a fixed capacitor and a variable resistor if it is necessary to
vary the time period.

Example: Circuit symbol:


Resistors restrict the flow of electric current, for example a

resistor is placed in series with a light-emitting diode (LED) to
limit the current passing through the LED.

Connecting and soldering

Resistors may be connected either way round. They are not

damaged by heat when soldering.

Resistor values - the resistor colour code The Resistor

Colour Code
Resistance is measured in ohms, the symbol
for ohm is an omega . Colour Number
1 is quite small so resistor values are often Black 0
given in k and M .
Brown 1
1 k = 1000 1 M = 1000000 .
Red 2
Resistor values are normally shown using Orange 3
coloured bands.
Each colour represents a number as shown in Yellow 4
the table. Green 5
Blue 6
Most resistors have 4 bands:
Violet 7
• The first band gives the first digit.
Grey 8
• The second band gives the second
digit. White 9
• The third band indicates the number of

• The fourth band is used to shows the tolerance (precision)
of the resistor, this may be ignored for almost all circuits
but further details are given below.

4 Band Resistor Color Codes







Resistance 1k
Ω Blue

Tolerance ± Grey




5 Band Resistor Color Codes






Resistance 1k
Tolerance ± 10




6 Band Resistor Color Codes





Resistance 1k

Tolerance ± 10
% Violet

Temperature 15
coefficient PPM/°C



This resistor has red (2), violet (7), yellow (4 zeros) and gold
So its value is 270000 = 270 k .
On circuit diagrams the is usually omitted and the value is
written 270K.

Find out how to make your own Resistor Colour Code


Small value resistors (less than 10 ohm)

The standard colour code cannot show values of less than 10 .

To show these small values two special colours are used for
the third band: gold which means × 0.1 and silver which
means × 0.01. The first and second bands represent the digits
as normal.

For example:
red, violet, gold bands represent 27 × 0.1 = 2.7
green, blue, silver bands represent 56 × 0.01 = 0.56

Tolerance of resistors (fourth band of colour code)

The tolerance of a resistor is shown by the fourth band of the

colour code. Tolerance is the precision of the resistor and it is
given as a percentage. For example a 390 resistor with a
tolerance of ±10% will have a value within 10% of 390 ,
between 390 - 39 = 351 and 390 + 39 = 429 (39 is 10% of

A special colour code is used for the fourth band tolerance:
silver ±10%, gold ±5%, red ±2%, brown ±1%.
If no fourth band is shown the tolerance is ±20%.

Tolerance may be ignored for almost all circuits because

precise resistor values are rarely required.

Resistor shorthand
Resistor values are often written on circuit diagrams using a
code system which avoids using a decimal point because it is
easy to miss the small dot. Instead the letters R, K and M are
used in place of the decimal point. To read the code: replace
the letter with a decimal point, then multiply the value by 1000 if
the letter was K, or 1000000 if the letter was M. The letter R
means multiply by 1.

For example:
560R means 560
2K7 means 2.7 k = 2700
39K means 39 k
1M0 means 1.0 M = 1000 k

Real resistor values (the E6 and E12 series)

You may have noticed that resistors are not available with
every possible value, for example 22k and 47k are readily
available, but 25k and 50k are not!

Why is this? Imagine that you decided to make resistors every

10 giving 10, 20, 30, 40, 50 and so on. That seems fine, but
what happens when you reach 1000? It would be pointless to
make 1000, 1010, 1020, 1030 and so on because for these
values 10 is a very small difference, too small to be noticeable

in most circuits. In fact it would be difficult to make resistors
sufficiently accurate.

To produce a sensible range of resistor values you need to

increase the size of the 'step' as the value increases. The
standard resistor values are based on this idea and they form a
series which follows the same pattern for every multiple of ten.

The E6 series (6 values for each multiple of ten, for resistors

with 20% tolerance)
10, 15, 22, 33, 47, 68, ... then it continues 100, 150, 220, 330,
470, 680, 1000 etc.
Notice how the step size increases as the value increases. For
this series the step (to the next value) is roughly half the value.

The E12 series (12 values for each multiple of ten, for resistors
with 10% tolerance)
10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ... then it
continues 100, 120, 150 etc.
Notice how this is the E6 series with an extra value in the gaps.

The E12 series is the one most frequently used for resistors. It
allows you to choose a value within 10% of the precise value
you need. This is sufficiently accurate for almost all projects
and it is sensible because most resistors are only accurate to
±10% (called their 'tolerance'). For example a resistor marked
390 could vary by ±10% × 390 = ±39 , so it could be any
value between 351 and 429 .

Variable Resistors


Variable resistors consist of a

resistance track with
connections at both ends and
a wiper which moves along
the track as you turn the
spindle. The track may be
made from carbon, cermet
(ceramic and metal mixture) or
a coil of wire (for low
resistances). The track is
usually rotary but straight track
versions, usually called Standard Variable Resistor
sliders, are also available. Photograph © Rapid Electronics
Variable resistors may be
used as a rheostat with two connections (the wiper and just
one end of the track) or as a potentiometer with all three
connections in use. Miniature versions called presets are made
for setting up circuits which will not require further adjustment.

Variable resistors are often called potentiometers in books

and catalogues. They are specified by their maximum
resistance, linear or logarithmic track, and their physical size.
The standard spindle diameter is 6mm.

The resistance and type of track are marked on the body:

4K7 LIN means 4.7 k linear track.
1M LOG means 1 M logarithmic track.

Some variable resistors are designed to be mounted directly on

the circuit board, but most are for mounting through a hole
drilled in the case containing the circuit with stranded wire
connecting their terminals to the circuit board.

Power Ratings of

Electrical energy is
converted to heat when
current flows through a
resistor. Usually the effect is
negligible, but if the
resistance is low (or the
voltage across the resistor
high) a large current may
pass making the resistor
become noticeably warm. High power resistors
The resistor must be able to (5W top, 25W bottom)
withstand the heating effect
and resistors have power Photographs © Rapid Electronics
ratings to show this.

Power ratings of resistors are rarely quoted in parts lists

because for most circuits the standard power ratings of 0.25W
or 0.5W are suitable. For the rare cases where a higher power
is required it should be clearly specified in the parts list, these
will be circuits using low value resistors (less than about 300
) or high voltages (more than 15V).

The power, P, developed in a resistor is given by:

P = I² × where: P = power developed in the resistor in watts

R (W)
or I = current through the resistor in amps (A)
P = V² / R = resistance of the resistor in ohms ( )
R V = voltage across the resistor in volts (V)


• A 470 resistor with 10V across it, needs a power rating P

= V²/R = 10²/470 = 0.21W.
In this case a standard 0.25W resistor would be suitable.
• A 27 resistor with 10V across it, needs a power rating P
= V²/R = 10²/27 = 3.7W.
A high power resistor with a rating of 5W would be

Light Emitting Diodes (LEDs)

Example: Circuit symbol:


LEDs emit light when an electric current passes through them.

Connecting and soldering

LEDs must be connected the correct way round,

the diagram may be labelled a or + for anode and
k or - for cathode (yes, it really is k, not c, for
cathode!). The cathode is the short lead and there may be a
slight flat on the body of round LEDs. If you can see inside the
LED the cathode is the larger electrode (but this is not an
official identification method).

LEDs can be damaged by heat when soldering, but the risk is

small unless you are very slow. No special precautions are
needed for soldering most LEDs.

Testing an LED

Never connect an LED directly to a battery or

power supply!
It will be destroyed almost instantly because
too much current will pass through and burn it
LEDs must have a resistor in series to limit the
current to a safe value, for quick testing purposes a 1k

resistor is suitable for most LEDs if your supply voltage is 12V
or less. Remember to connect the LED the correct way

For an accurate value please see Calculating an LED resistor

value below.

Colours of LEDs

LEDs are available in red,

orange, amber, yellow, green,
blue and white. Blue and white
LEDs are much more
expensive than the other

The colour of an LED is determined by the semiconductor

material, not by the colouring of the 'package' (the plastic
body). LEDs of all colours are available in uncoloured packages
which may be diffused (milky) or clear (often described as
'water clear'). The coloured packages are also available as
diffused (the standard type) or transparent.

Tri-colour LEDs

The most popular type of tri-colour LED has a red and

a green LED combined in one package with three
leads. They are called tri-colour because mixed red
and green light appears to be yellow and this is
produced when both the red and green LEDs are on.

The diagram shows the construction of a tri-colour

LED. Note the different lengths of the three leads. The
centre lead (k) is the common cathode for both LEDs,
the outer leads (a1 and a2) are the anodes to the LEDs

allowing each one to be lit separately, or both together to give
the third colour.

Bi-colour LEDs

A bi-colour LED has two LEDs wired in 'inverse parallel' (one

forwards, one backwards) combined in one package with two
leads. Only one of the LEDs can be lit at one time and they are
less useful than the tri-colour LEDs described above.

Sizes, Shapes and Viewing

angles of LEDs

LEDs are available in a wide

variety of sizes and shapes.
The 'standard' LED has a
round cross-section of 5mm LED Clip
diameter and this is probably
the best type for general use, Photograph © Rapid Electronics
but 3mm round LEDs are also

Round cross-section LEDs are frequently used and they are

very easy to install on boxes by drilling a hole of the LED
diameter, adding a spot of glue will help to hold the LED if
necessary. LED clips are also available to secure LEDs in
holes. Other cross-section shapes include square, rectangular
and triangular.

As well as a variety of colours, sizes and shapes, LEDs also

vary in their viewing angle. This tells you how much the beam
of light spreads out. Standard LEDs have a viewing angle of
60° but others have a narrow beam of 30° or less.

Rapid Electronics stock a wide selection of LEDs and their

catalogue is a good guide to the range available.

Calculating an LED resistor value
An LED must have a resistor connected
in series to limit the current through the
LED, otherwise it will burn out almost

The resistor value, R is given by:

R = (VS - VL) / I

VS = supply voltage
VL = LED voltage (usually 2V, but 4V for blue and white LEDs)
I = LED current (e.g. 20mA), this must be less than the
maximum permitted

If the calculated value is not available choose the nearest

standard resistor value which is greater, so that the current will
be a little less than you chose. In fact you may wish to choose a
greater resistor value to reduce the current (to increase battery
life for example) but this will make the LED less bright.

For example

If the supply voltage VS = 9V, and you have a red LED (VL =
2V), requiring a current I = 20mA = 0.020A,
R = (9V - 2V) / 0.02A = 350 , so choose 390 (the nearest
standard value which is greater).

Working out the LED resistor formula using Ohm's law

Ohm's law says that the resistance of the resistor, R = V/I,

V = voltage across the resistor (= VS - VL in this case)
I = the current through the resistor

So R = (VS - VL) / I

For more information on the calculations please see the Ohm's
Law page.

Connecting LEDs in series

If you wish to have several LEDs on at
the same time it may be possible to
connect them in series. This prolongs
battery life by lighting several LEDs with
the same current as just one LED.

All the LEDs connected in series pass

the same current so it is best if they
are all the same type. The power supply
must have sufficient voltage to provide
about 2V for each LED (4V for blue and white) plus at least
another 2V for the resistor. To work out a value for the resistor
you must add up all the LED voltages and use this for VL.

Example calculations:
A red, a yellow and a green LED in series need a supply
voltage of at least 3 × 2V + 2V = 8V, so a 9V battery would be
VL = 2V + 2V + 2V = 6V (the three LED voltages added up).
If the supply voltage VS is 9V and the current I must be 15mA =
Resistor R = (VS - VL) / I = (9 - 6) / 0.015 = 3 / 0.015 = 200 ,
so choose R = 220 (the nearest standard value which is

Avoid connecting LEDs in parallel!

Connecting several LEDs in parallel with just

one resistor shared between them is generally
not a good idea.

If the LEDs require slightly different voltages

only the lowest voltage LED will light and it
may be destroyed by the larger current flowing
through it. Although identical LEDs can be
successfully connected in parallel with one resistor this rarely
offers any useful benefit because resistors are very cheap and
the current used is the same as connecting the LEDs
individually. If LEDs are in parallel each one should have its
own resistor.

Reading a table of technical data for LEDs

Suppliers' catalogues usually include tables of technical data
for components such as LEDs. These tables contain a good
deal of useful information in a compact form but they can be
difficult to understand if you are not familiar with the
abbreviations used.

The table below shows typical technical data for some 5mm
diameter round LEDs with diffused packages (plastic bodies).
Only three columns are important and these are shown in bold.
Please see below for explanations of the quantities.

IF VF VR Viewi
Colo VF us Wavelen
Type max ma ma ng
ur typ. intensit gth
. x. x. angle
Standa 30m 2.1 5mcd @
Red 1.7V 5V 60° 660nm
rd A V 10mA
Standa Brigh 30m 2.5 80mcd
2.0V 5V 60° 625nm
rd t red A V @ 10mA
Standa Yello 30m 2.5 32mcd
2.1V 5V 60° 590nm
rd w A V @ 10mA
Standa Gree 25m 2.5 32mcd
2.2V 5V 60° 565nm
rd n A V @ 10mA
30m 5.5 60mcd
intensit Blue 4.5V 5V 50° 430nm
A V @ 20mA
Super 30m 1.85 2.5 500mcd
Red 5V 60° 660nm
bright A V V @ 20mA
Low 30m 2.0 5mcd @
Red 1.7V 5V 60° 625nm
current A V 2mA
IF max. Maximum forward current, forward just means
with the LED connected correctly.
VF typ. Typical forward voltage, VL in the LED resistor
This is about 2V, except for blue and white
LEDs for which it is about 4V.
VF max. Maximum forward voltage.
VR max. Maximum reverse voltage
You can ignore this for LEDs connected the
correct way round.
Luminous Brightness of the LED at the given current,
intensity mcd = millicandela.
Viewing angle Standard LEDs have a viewing angle of 60°,
others emit a narrower beam of about 30°.
Wavelength The peak wavelength of the light emitted, this

determines the colour of the LED.
nm = nanometre.

Flashing LEDs
Flashing LEDs look like ordinary LEDs but they contain an
integrated circuit (IC) as well as the LED itself. The IC flashes
the LED at a low frequency, typically 3Hz (3 flashes per
second). They are designed to be connected directly to a
supply, usually 9 - 12V, and no series resistor is required. Their
flash frequency is fixed so their use is limited and you may
prefer to build your own circuit to flash an ordinary LED, for
example our Flashing LED project which uses a 555 astable

LED Displays

LED displays are packages of many LEDs arranged in a

pattern, the most familiar pattern being the 7-segment displays
for showing numbers (digits 0-9). The pictures below illustrate
some of the popular designs:

Bargraph 7-segment Starburst Dot matrix

Pin connections diagram

Pin connections of LED displays

There are many types of LED display and a supplier's

catalogue should be consulted for the pin connections. The
diagram on the right shows an example from the Rapid
Electronics catalogue. Like many 7-segment displays, this
example is available in two versions: Common Anode (SA) with
all the LED anodes connected together and Common Cathode
(SC) with all the cathodes connected together. Letters a-g refer
to the 7 segments, A/C is the common anode or cathode as
appropriate (on 2 pins). Note that some pins are not present
(NP) but their position is still numbered.


1. Simple and efficient circuit

2. Working requirement is easily met.

3. No instant and direct manual operation is needed.

4. Consumes very small amount of power for operation.

5. It also saves a considerable amount of power.

6. A very practical and low cost device.

7. It can make to work by using solar cell/wind cell for power