Basic Electronics Notes
Basic Electronics Notes
o Register memory
o Cache memory
o Primary memory
o Secondary memory
Register Memory
Cache Memory
L1: It is the first level of cache memory, which is called Level 1 cache
or L1 cache. In this type of cache memory, a small amount of memory
is present inside the CPU itself. If a CPU has four cores (quad core
cpu), then each core will have its own level 1 cache. As this memory is
present in the CPU, it can work at the same speed as of the CPU. The
size of this memory ranges from 2KB to 64 KB. The L1 cache further
has two types of caches: Instruction cache, which stores instructions
required by the CPU, and the data cache that stores the data required
by the CPU.
When CPU needs the data, first of all, it looks inside the L1 cache. If it
does not find anything in L1, it looks inside the L2 cache. If again, it
does not find the data in L2 cache, it looks into the L3 cache. If data is
found in the cache memory, then it is known as a cache hit. On the
contrary, if data is not found inside the cache, it is called a cache miss.
If data is not available in any of the cache memories, it looks inside the
Random Access Memory (RAM). If RAM also does not have the data,
then it will get that data from the Hard Disk Drive.
Primary Memory
CPU utilizes this data to perform the required tasks. As soon as you
shut down the computer the RAM loses all the data.
Secondary Memory
The secondary storage devices which are built into the computer or
connected to the computer are known as a secondary memory of the
computer. It is also known as external memory or auxiliary storage.
1) Hard Disk:
The hard disk is also known as a hard drive. It is a rigid magnetic disc
that stores data permanently, as it is a non-volatile storage device. The
hard disk is located within a drive unit on the computer's motherboard
and comprises one or more platters packed in an air-sealed casing.
The data is written on the platters by moving a magnetic head over the
platters as they spin. The data stored on a computer's hard drive
generally includes the operating system, installed software, and the
user's files and programs, including pictures, music, videos, text
documents, etc.
2) Solid-state Drive:
As the cost of SSD has come down, it has become an ideal replacement
for a standard hard drive in desktop and laptop computers. It is also
suitable for notebooks, and tablets that don't require lots of storage.
3) Pen drive:
4) SD Card:
There are many memory chips inside the SD card that store the data;
it does not have moving parts. SD cards are not created equal, so they
may differ from each other in terms of speed, physical sizes, and
capacity. For example, standard SD cards, mini SD cards, and micro
SD cards.
In the beginning, it was used for storing and playing sound recordings,
later it was used for various purposes such as for storing documents,
audio files, videos, and other data like software programs in a CD.
6) DVD:
DVD is short for digital versatile disc or digital video disc. It is a type
of optical media used for storing optical data. Although it has the same
size as a CD, its storage capacity is much more than a CD. So, it is
widely used for storing and viewing movies and to distribute software
programs as they are too large to fit on a CD. DVD was co-developed
by Sony, Panasonic, Philips, and Toshiba in 1995.
Types of DVDs:
DVDs can be divided into three main categories which are as follows:
Memory Units
Memory units are used to measure and represent data. Some of the
commonly used memory units are:
1) Bit: The computer memory units start from bit. A bit is the smallest
memory unit to measure data stored in main memory and storage
devices. A bit can have only one binary value out of 0 and 1.
Where R = Resistance
V = Voltage
I = Electric current
Resistivity
Resistivity Chart
Notice that there is a very
small margin between the
resistivity of the conductors
such as silver and gold,
compared to a much larger
margin for the resistivity of the
insulators between glass and
quartz.
Conductors
From above we now know that Conductors are materials that have
very low values of resistivity, usually in the micro-ohms per metre.
This low value allows them to easily pass an electrical current due to
there being plenty of free electrons floating about within their basic
atom structure. But these electrons will only flow through a conductor
if there is something to spur their movement, and that something is
an electrical voltage.
Insulators
In other words, the electrons are stuck to the parent atom and cannot
move around freely so if a potential voltage is applied to the material
no current will flow as there are no “free electrons” available to move
and which gives these materials their insulating properties.
Insulators also have very high resistances, millions of ohms per metre,
and are generally not affected by normal temperature changes
(although at very high temperatures wood becomes charcoal and
changes from an insulator to a conductor). Examples of good
insulators are marble, fused quartz, p.v.c. plastics, rubber etc.
Semiconductor Basics
As there are very few free electrons available to move around the
silicon crystal, crystals of pure silicon (or germanium) are therefore
good insulators, or at the very least very high value resistors.
The diagram above shows the structure and lattice of a ‘normal’ pure
crystal of Silicon.
This allows four out of the five orbital electrons to bond with its
neighbouring silicon atoms leaving one “free electron” to become
mobile when an electrical voltage is applied (electron flow). As each
impurity atom “donates” one electron, pentavalent atoms are
generally known as “donors”.
Antimony (symbol Sb) or Phosphorus (symbol P), are frequently
used as a pentavalent additive to the silicon as they have 51 electrons
arranged in five shells around their nucleus with the outermost orbital
having five electrons. The resulting semiconductor basics material has
an excess of current-carrying electrons, each with a negative charge,
and is therefore referred to as an N-type material with the electrons
called “Majority Carriers” while the resulting holes are called
“Minority Carriers”.
The diagram above shows the structure and lattice of the acceptor
impurity atom Boron.
Antimony (Sb) and Boron (B) are two of the most commonly used
doping agents as they are more feely available compared to other types
of materials. They are also classed as “metalloids”. However, the
periodic table groups together a number of other different chemical
elements all with either three, or five electrons in their outermost
orbital shell making them suitable as a doping material.
PN Junction Theory
This is all well and good, but these newly doped N-type and P-type
semiconductor materials do very little on their own as they are
electrically neutral. However, if we join (or fuse) these two
semiconductor materials together they behave in a very different way
merging together and producing what is generally known as a “PN
Junction“.
As a result, the charge density of the P-type along the junction is filled
with negatively charged acceptor ions ( NA ), and the charge density of
the N-type along the junction becomes positive. This charge transfer
of electrons and holes across the PN junction is known as diffusion.
The width of these P and N layers depends on how heavily each side is
doped with acceptor density NA, and donor density ND, respectively.
This process continues back and forth until the number of electrons
which have crossed the junction
have a large enough electrical charge to repel or prevent any more
charge carriers from crossing over the junction. Eventually a state of
equilibrium (electrically neutral situation) will occur producing a
“potential barrier” zone around the area of the junction as the donor
atoms repel the holes and the acceptor atoms repel the electrons.
PN Junction Distance
As the N-type material has lost electrons and the P-type has lost holes,
the N-type material has become positive with respect to the P-type.
Then the presence of impurity ions on both sides of the junction cause
an electric field to be established across this region with the N-side at
a positive voltage relative to the P-side. The problem now is that a free
charge requires some extra energy to overcome the barrier that now
exists for it to be able to cross the depletion region junction.
This electric field created by the diffusion process has created a “built-
in potential difference” across the junction with an open-circuit (zero
bias) potential of:
In the next tutorial about the PN junction, we will look at one of the
most interesting applications of the PN junction is its use in circuits
as a diode. By adding connections to each end of the P-type and the N-
type materials we can produce a two terminal device called a PN
Junction Diode which can be biased by an external voltage to either
block or allow the flow of current through it.
PN Junction Diode
The effect described in the previous tutorial is achieved without any
external voltage being applied to the actual PN junction resulting in
the junction being in a state of equilibrium.
The effect of adding this additional energy source results in the free
electrons being able to cross the depletion region from one side to the
other. The behaviour of the PN junction with regards to the potential
barrier’s width produces an asymmetrical conducting two terminal
device, better known as the PN Junction Diode.
The net result is that the depletion layer grows wider due to a lack of
electrons and holes and presents a high impedance path, almost an
insulator. The result is that a high potential barrier is created thus
preventing current from flowing through the semiconductor material.
Since the diode can conduct “infinite” current above this knee point as
it effectively becomes a short circuit, therefore resistors are used in
series with the diode to limit its current flow. Exceeding its maximum
forward current specification causes the device to dissipate more
power in the form of heat than it was designed for resulting in a very
quick failure of the device.
We have also seen above that the diode is two terminal non-linear
device whose I-V characteristic are polarity dependent as depending
upon the polarity of the applied voltage, VD the diode is either
Forward Biased, VD > 0 or Reverse Biased, VD < 0. Either way we can
model these current-voltage characteristics for both an ideal diode
and for a real diode.
RESISTOR COLOR CODES
What is a Resistor?
Special components called resistors are made for the express purpose
of creating a precise quantity of resistance for insertion into a circuit.
They are typically constructed of metal wire or carbon and engineered
to maintain a stable resistance value over a wide range of
environmental conditions.
Unlike lamps, they do not produce light, but they do produce heat as
electric power is dissipated by them in a working circuit. Typically,
though, the purpose of a resistor is not to produce usable heat, but
simply to provide a precise quantity of electrical resistance.
Components and wires are coded with colors to identify their value
and function. Resistor Color Coding uses colored bands to quickly
identify a resistors resistive value and its percentage of tolerance with
the physical size of the resistor indicating its wattage rating.
But when a resistor is smaller (example: 1/4 watt carbon or film type),
the print is too small to read, so the specifications must be shown in
another way.
If the color is found on the 3rd band for a 4-band type or the 4th band
for a 5-band and 6-band type, then it's a multiplier.
The colors brown, red, green, blue, and violet are used as tolerance
codes on 5-band resistors only. All 5-band resistors use a colored
tolerance band.
The blank (20%) “band” is only used with the “4-band” code (3 colored
bands + a blank “band”).
Black 0 1
Brown 1 10 ± 1%
Red 2 100 ± 2%
Orange 3 1,000
Yellow 4 10,000
White 9
Gold 0.1 ± 5%
None ± 20%
3 4 5
Number 6 Coloured
Coloured Coloured Coloured
of Bands
Bands Bands Bands
Coloured (E96
(E6 (E12 (E48
Bands Series)
Series) Series) Series)
1st Band 1st Digit 1st Digit 1st Digit 1st Digit
2nd Band 2nd Digit 2nd Digit 2nd Digit 2nd Digit
Temperature
6th Band – – –
Coefficient
Calculating Resistor Values
The Resistor Colour Code system is all well and good but we need
to understand how to apply it in order to get the correct value of the
resistor. The “left-hand” or the most significant coloured band is the
band which is nearest to a connecting lead with the colour coded
bands being read from left-to-right as follows:
The fourth and fifth bands are used to determine the percentage
tolerance of the resistor. Resistor tolerance is a measure of the
resistors variation from the specified resistive value and is a
consequence of the manufacturing process and is expressed as a
percentage of its “nominal” or preferred value.
The resulting mnemonic matches the first letter of each word to each
colour which makes up the resistors colour code by order of increasing
magnitude and there are many different mnemonic phrases which can
be used. However, these sayings are often very crude but never the less
effective for remembering the resistor colours. Here are just a few of
the more “cleaner” versions but many more exist:
If the color is found on the 3rd band for a 4-band type or the 4th band
for a 5-band and 6-band type, then it's a multiplier.
The colors brown, red, green, blue, and violet are used as tolerance
codes on 5-band resistors only. All 5-band resistors use a colored
tolerance band.
The blank (20%) “band” is only used with the “4-band” code (3 colored
bands + a blank “band”).
Electronic Components and their Functions
Where: “Ic” is the current flowing into the collector terminal, “Ib” is
the current flowing into the base terminal and “Ie” is the current
flowing out of the emitter terminal.
Then to summarise a little. This type of bipolar transistor
configuration has a greater input impedance, current and power gain
than that of the common base configuration but its voltage gain is
much lower. The common emitter configuration is an inverting
amplifier circuit. This means that the resulting output signal has a
180o phase-shift with regards to the input voltage signal.
The values of Beta vary from about 20 for high current power
transistors to well over 1000 for high frequency low power type
bipolar transistors. The value of Beta for most standard NPN
transistors can be found in the manufactures data sheets but generally
range between 50 – 200.
The equation above for Beta can also be re-arranged to make Ic as the
subject, and with a zero base current ( Ib = 0 ) the resultant collector
current Ic will also be zero, ( β*0 ).
Also note that when the base current is high the corresponding
collector current will also be high resulting in the base current
controlling the collector current. One of the most important properties
of the Bipolar Junction Transistor is that a small base current can
control a much larger collector current. Consider the following
example.
NPN Transistor Example No1
A bipolar NPN transistor has a DC current gain, (Beta) value of 200.
Calculate the base current Ib required to switch a resistive load of
4mA.
Where: Ib is the base current, Vb is the base bias voltage, Vbe is the
base-emitter volt drop (0.7v) and Rb is the base input resistor.
Increasing Ib, Vbe slowly increases to 0.7V but Ic rises exponentially.
Therefore, Ib = 93µA.
The most important factor to notice is the effect of Vce upon the
collector current Ic when Vce is greater than about 1.0 volts. We can
see that Ic is largely unaffected by changes in Vce above this value and
instead it is almost entirely controlled by the base current, Ib. When
this happens we can say then that the output circuit represents that of
a “Constant Current Source”.
It can also be seen from the common emitter circuit above that the
emitter current Ie is the sum of the collector current, Ic and the base
current, Ib, added together so we can also say that Ie = Ic + Ib for the
common emitter (CE) configuration.
By using the output characteristics curves in our example above and
also Ohm´s Law, the current flowing through the load resistor, ( RL ),
is equal to the collector current, Ic entering the transistor which in
turn corresponds to the supply voltage, ( Vcc ) minus the voltage drop
between the collector and the emitter terminals, ( Vce ) and is given
as:
PNP TRANSISTOR
Transistor Matching
Complementary Transistors
You may think what is the point of having a PNP Transistor, when
there are plenty of NPN Transistors available that can be used as an
amplifier or solid-state switch?. Well, having two different types of
transistors “PNP” and “NPN”, can be a great advantage when
designing power amplifier circuits such as the Class B Amplifier.
Class-B amplifiers uses “Complementary” or “Matched Pair” (that is
one PNP and one NPN connected together) transistors in its output
stage or in reversible H-Bridge motor control circuits where we want
to control the flow of current evenly through the motor in both
directions at different times for forward and reverse motion.
A pair of corresponding NPN and PNP transistors with near identical
characteristics to each other are called Complementary
Transistors for example, a TIP3055 (NPN transistor) and the
TIP2955 (PNP transistor) are good examples of complementary or
matched pair silicon power transistors. They both have a DC current
gain, Beta, ( Ic/Ib ) matched to within 10% and high Collector current
of about 15A making them ideal for general motor control or robotic
applications.
Also, class B amplifiers use complementary NPN and PNP in their
power output stage design. The NPN transistor conducts for only the
positive half of the signal while the PNP transistor conducts for
negative half of the signal.
This allows the amplifier to drive the required power through the load
loudspeaker in both directions at the stated nominal impedance and
power resulting in an output current which is likely to be in the order
of several amps shared evenly between the two complementary
transistors.
Operating Regions
The pink shaded area at the bottom of the curves represents the “Cut-
off” region while the blue area to the left represents the “Saturation”
region of the transistor. Both these transistor regions are defined as:
1. Cut-off Region
Here the operating conditions of the transistor are zero input base
current ( IB ), zero output collector current ( IC ) and maximum
collector voltage ( VCE ) which results in a large depletion layer and no
current flowing through the device. Therefore the transistor is
switched “Fully-OFF”.
Cut-off Characteristics
Then we can define the “cut-off region” or “OFF mode” when using a
bipolar transistor as a switch as being, both junctions reverse
biased, VB < 0.7v and IC = 0. For a PNP transistor, the Emitter
potential must be negative with respect to the Base.
2. Saturation Region
Here the transistor will be biased so that the maximum amount of base
current is applied, resulting in maximum collector current resulting in
the minimum collector emitter voltage drop which results in the
depletion layer being as small as possible and maximum current
flowing through the transistor. Therefore the transistor is switched
“Fully-ON”.
Saturation Characteristics
Then we can define the “saturation region” or “ON mode” when using
a bipolar transistor as a switch as being, both junctions forward
biased, VB > 0.7v and IC = Maximum. For a PNP transistor, the
Emitter potential must be positive with respect to the Base.
Then the transistor operates as a “single-pole single-throw” (SPST)
solid state switch. With a zero signal applied to the Base of the
transistor it turns “OFF” acting like an open switch and zero collector
current flows. With a positive signal applied to the Base of the
transistor it turns “ON” acting like a closed switch and maximum
circuit current flows through the device.
The simplest way to switch moderate to high amounts of power is to
use the transistor with an open-collector output and the transistors
Emitter terminal connected directly to ground. When used in this way,
the transistors open collector output can thus “sink” an externally
supplied voltage to ground thereby controlling any connected load.
An example of an NPN Transistor as a switch being used to operate a
relay is given below. With inductive loads such as relays or solenoids
a flywheel diode is placed across the load to dissipate the back EMF
generated by the inductive load when the transistor switches “OFF”
and so protect the transistor from damage. If the load is of a very high
current or voltage nature, such as motors, heaters etc, then the load
current can be controlled via a suitable relay as shown.
The next lowest preferred value is: 82kΩ, this guarantees the
transistor switch is always saturated.
The base resistor, Rb is required to limit the output current from the
logic gate.