Basic Electronics
Basic Electronics
Introduction to Electronics
3
4 Chapter 1
V ¼ I · R, (1.1)
where V is the voltage in units of volts [V], I is the current in units of amperes
[A], and R is the resistance in units of ohms [V]. The utility of the equation will
be made clear shortly. For the moment, just remember that Ohm’s law is
frequently used in electronics problems; fortunately, it is not very complicated.
Power describes the rate at which energy is being used. If we know the
current and the voltage, we can directly calculate the power from
P ¼ V · I, (1.2)
where P is the power and is measured in watts [W]. Other relationships can be
created for the power by substituting in Eq. (1.1) after rearranging for either
voltage or current. The value of these simple equations will become clear in
just a couple paragraphs when we start to investigate a basic circuit.
The first circuit we will look at is a traditional one for introducing
electronics; it is a circuit that turns on a light source using a battery and a switch.
To make this circuit more interesting, we will introduce the light-emitting diode
(LED) as our light source. The LED is a semiconductor optoelectronic
component that is much more energy efficient than an incandescent lamp.
Today, these devices are nearly as popular as the old-style “grain-of-wheat”
lamps, and we will use them in many of our example circuits.
An LED is an electrical device that converts electrical power to light. The
operating characteristic for an LED can be described in the simplest sense as a
forward voltage and a current; in other words, the LED is sensitive to the
direction of current flow. We can use this information and Eq. (1.1) to determine
the resistance of the LED and its operating power, as shown in Example 1.1.
Example 1.1
The forward voltage Vf and forward current If for an operating red LED are
2.2 V and 20 mA, respectively. Calculate the resistance and power used.
Introduction to Electronics 5
Figure 1.1 A battery wired to a switch, resistor, and LED, and relevant features.
6 Chapter 1
decreasing the resistance can be tried to make the LED turn on. This
calculation is performed in Example 1.2.
Example 1.2
Calculate the resistance needed so that a 9-V battery can be used to power an
LED that requires 2.2 V and 20 mA to operate.
The resistance or load connected to a 9-V battery that will draw a total
current of 20 mA is calculated from Ohm’s law as
9V
R¼ ¼ 450 V:
20 mA
The LED has an operating resistance of 110 V, so a resistor of 450–110 V will
be needed to lower the voltage. The voltage drop across the resistor with a
current of 20 mA will be
340 V
V¼ ¼ 6.8 V:
20 mA
The conclusion from Example 1.2 could also be stated as: Knowing that the
current through the LED is 20 mA and that the operating voltage is 2.2 V,
we need to lower the voltage by 9 – 2.2 or 6.8 V using a 20-mA current or
340 V.
Now many interesting details were introduced in this section as we made
our decision on powering the LED. To understand this further, we need to
look at how the basic electronic components are used. We will begin with a
closer look at resistors.
1.3 Resistors
We have shown the nature of voltage and current in terms of driving force
and moving charge provided by a battery, but we haven’t said much about
resistors. Resistors have many roles; in the last section, a resistor was used to
drop the voltage going into the LED. Resistors do this, for the most part, by
converting current to heat. Resistors are physical devices and are available
in compact packages whose sizes relate to their ability to dissipate power
without damage. The power-handling capability of a resistor is measured in
units of watts.
Common resistors are made of carbon between two wires. It can be
interesting to break one open and see inside! The physical size of the resistor
relates to the amount of carbon in the resistors and to the amount of power a
resistor can dissipate. The resistance value is indicated on a resistor by either a
number or a set of colored bands that can be translated into the value in ohms.
Introduction to Electronics 7
Figure 1.2 Top: A collection of various low-power resistors showing colored bands that
define their resistance values. Bottom: Illustration of color bands and surface mount resistors
with their values.
Colored bands, some examples of which are shown in Fig. 1.2, are the most
common way to identify resistors.2
The colored bands, either three or four colored stripes around the body of
the resistor, are located toward one end. The colored bands indicate the
resistance value and the tolerance or how close the actual resistor value will be
to the stated value. There are three common tolerance levels: 5 is represented
by Gold, 10 is represented by Silver, and 20% is represented by only three
bands.
The key to translating the individual colors into numbers is shown in
Table 1.1. To simplify this discussion, the first three colored bands, referred to
as A, B, and C, are used to indicate the value of the resistor. The resistor value
can be determined from the following equation:
Notice that the third band C is used to multiply the first two digits by a factor
of 10 raised to the power of C. A simple example can be used to show how this
works: a three-band resistor of Red Red Orange would convert to numbers as
2 2 3 and thus be combined as 22 times 10 to the power 3, or 1000, for a
resistor value of 22,000 V. As there are only three bands, the resistor has a
tolerance of 20%, or R ¼ 22000 4400 V. If we measure the resistor’s value,
we would expect it to lie between 17,600 and 26,400 V.
So, really, the resistor color code is just shorthand for identifying the
resistor value. The lower the tolerance range the more expensive the resistor is
to purchase. There are also high-precision resistors that are considerably more
costly to purchase so are used only for very specialized work.
The resistors with wire leads are referred to as “through hole” components;
i.e., the wire ends can be poked into a hole for mounting and connection. The
trend these days is toward smaller electronics, so parts are also being reduced in
size. These parts mount differently and are soldered onto metal pads on the
surface of an electronics board. Surface-mount resistors look like small black
rectangles, as shown in the bottom of Fig. 1.2, and are often only a few
millimeters in size. The numbers on these resistors refer to their resistance value,
with the last number being the multiplier. There are some subtleties in the
interpretation of surface-mount resistors as well as some new coding systems.
For low-valued resistors, an R is used to indicate where the decimal point is
located. For instance, R470 would indicate a 0.47-V resistor. The EIA-96 code
is for 1% tolerance resistors and is a little more complicated to interpret; users
should check with the manufacturer of their parts.3
There are occasions when a very precise resistor value is needed that is not a
standard resistor value. Of course, one could purchase a large number of low-
tolerance resistors and measure their individual values in the hope of finding the
value needed; however, we can also construct the resistance we need by
combining other resistors. We can wire resistors together in two common forms,
series and parallel, as shown in Fig. 1.3.
Introduction to Electronics 9
Figure 1.3 Two circuits showing resistors connected in parallel (left) and in series (right).
In this book we use the convention that straight wires that cross are not
connected unless there is a dot at the crossing point.
Resistors can be combined into an effective value based on two
mathematical expressions shown in Eqs. (1.4) and (1.5) for series and parallel
resistors, respectively:1
X
Rseries ¼ Ri , (1.4)
i
1 X 1
¼ , (1.5)
Rparallel i
Ri
where Ri show the individual resistors, and i ¼ 1,2,3 . . . N, where N is the
maximum number of individual resistors to be summed.
There are some interesting limiting cases for combining resistors in series
and parallel. If we have two identical resistors of value R connected in series,
then the effective resistance is 2R, while if they are connected in parallel, the
effective resistance is R/2. If we have two resistors that are several orders of
magnitude different in value, when they are connected in series, the effective
resistance is approximately the larger of the two resistors; when they are
connected in parallel, the effective resistance is the smaller of the two resistors.
This is demonstrated in Example 1.3.
Example 1.3
Two resistors, R1 ¼ R and R2 ¼ 1000R are connected first in series and then
in parallel. Using Eqs. (1.3) and (1.4), calculate the effective resistance in each
case.
Rseries ¼ R1 þ R2 ¼ R þ 1000R ¼ 1001R 1000R,
1 1 1 1 1 1000 þ 1 1
¼ þ ¼ þ ¼ ,
Rparallel R1 R2 R 1000R 1000R R
or Rparallel = R.
10 Chapter 1
Example 1.4
Write a MATLAB script to calculate the equivalent resistance of a 200-V and
400-V resistor connected first in series and then in parallel.
% Example_1_4.m
% SWT 9-4-15
% Housekeeping
clear all; % clears the variable list and starts fresh
clc; % clears the command window
% Input values
%% Use the MATLAB input() command to request data
Introduction to Electronics 11
%% Calculation
% Perform required calculations
Rseries = R1 + R2;
Rparallel = 1/(1/R1 + 1/R2);
%% Output
% Echo the results to the screen
fprintf(‘\nR1 is: %6.1f ohms R2 is: %6.1f ohms\n’, R1, R2)
fprintf(‘Rseries is: %6.1f ohms\n’, Rseries)
fprintf(‘Rparallel is: %6.1f ohms\n’, Rparallel)
Result:
R1 is: 200.0 ohms R2 is: 400.0 ohms
Rseries is: 600.0 ohms
Rparallel is 133.3 ohms
1.4 Signals
A voltage applied to a circuit can be constant or it can vary with time.
Time-varying voltages can be used as power sources such as the AC voltage in
a house, or can be thought of as signals containing information such as a radio
transmission. The general expression for a time-varying voltage is shown as
X
N
V ðtÞ ¼ V DC þ vðtÞ ¼ V DC þ V i sinðvi t þ di Þ, (1.6)
i¼1
where VDC is a steady state voltage, and V(t) is a time-varying signal. In the
case of a single frequency, the time-varying signal will have an amplitude V1
and a sine function driven by v1 ¼ 2pf1 (where f1 is a frequency, and t is time)
and a phase d1 from a reference. Steady state signals are often referred to as
DC for direct current, and time-varying signals as AC for alternating
current.5,6 The function is shown in Fig. 1.4.
Time-varying signals are often called periodic and can have functional
forms other than sinusoidal. Ramps, steps, square functions, and many others
are often encountered in electronics. When time-varying signals are involved,
there can be many different frequencies. When working with time-varying
signals, to account for components that have frequency dependence, the
12 Chapter 1
Figure 1.4 A time-varying signal based on Eq. (1.6), showing VDC ¼ 5 V at the start and
then a superimposed sinusoidal signal V1 ¼ 10 V.
components used to control the voltage and currents are said to have
impedance rather than resistance. Such frequency-dependent components
include capacitors and inductors as well as many semiconductor devices.
Impedance is the broader term for talking about resistance to current flow
in a circuit and is a function of frequency. Impedance includes the effects of
resistance, capacitance, and inductance, the latter two of which include
devices known as capacitors and inductors. Both capacitors and inductors
have the ability to store energy and release it as well as to impede the flow of
current. These devices will be discussed in later sections so, while introduced
here, are not fully described. Don’t worry. Capacitors and inductors will be
included in later discussions.5,6
Figure 1.5 A simple circuit with measurement points and connections shown. Notice that
the ohmmeter is used when the resistor is out of the circuit.
drop across the resistor, while the ammeter measures the current that is
flowing in the circuit.2 When using the ohmmeter, the resistor should not be
connected to the rest of the circuit and is shown here as a separate device
under test (DUT).
While a single DVM can perform each of the three measurements shown
in Fig. 1.5, it can only perform the measurements one at a time. Each of the
different measurement types will be considered individually:
Ammeter: To measure the current, we need the ammeter to be connected
to our circuit in series, and the circuit needs to be powered. That is to
say, we need to break the circuit and then reconnect the two ends with
the ammeter. In this way the current flows through the ammeter. Care
needs to be taken as to how much current we measure to make sure it is
within the allowed range of the meter.
Voltmeter: The voltmeter measures the voltage across a device and so
connects in parallel with the device. The circuit must be on in order to
measure the voltage drop across a device.
Ohmmeter: The ohmmeter has its own internal power source, so the DUT
must not be powered for this measurement. In general, we don’t want
the DUT to be in the circuit so that the rest of the circuit doesn’t affect
the measurement of the DUT.
One interesting observation is that when we measure the voltage drop
across a resistor of known value, we are actually able to back calculate the
current! In Fig. 1.5 we will expect to see that the ammeter’s measurement of
the current I will equal the ratio of VR/R that we measure with the
voltmeter!
Most DVMs are able to measure DC voltages using different meter
settings. However, sometimes we would prefer to see the alternating signal
displaced as a voltage-versus-time trace; this is where the DVM loses its
usefulness. Voltage–time measurements are possible using a different
14 Chapter 1
Example 1.5
Write a MATLAB script to plot two sinusoidal signals with offset voltages of
+10 and 10 V, frequencies of 10 and 15 Hz, and a phase shift of 2.
% Example_1_5
% SWT 9-3-15
Introduction to Electronics 15
%% Housekeeping
clear all;
clc;
%% Parameters
Vo = 5; Vdc(1) = 10; Vdc(2) = -10; % in volts
freq (1) = 10; freq (2) = 15; % in Hz
delta(1) = 0; delta(2) = 0;
%% Calculations
for idx = 1:2
omega(idx) = 2*pi*freq(idx);
end
%% Output
figure(1); plot (t,VV1,t,VV2,‘.’);
axis([0 1 -20 20]); xlabel(‘Time (seconds)’);
ylabel(‘Voltage (V)’);
grid on;
Figure 1.7 R1 and R2 are connected in series to form a voltage divider. By carefully
choosing the resistor values, Vout can be set between the value of the ground and the battery
voltage.
Example 1.6
Calculate the relationship between resistors to be used in a voltage divider to
get an output voltage of 5 V using a 9-V battery as the source.
V out R1 5V
¼ ¼ :
V in R1 þ R2 9 V
Rearranging this equation yields
5
R1 ¼ R2:
4
divider to achieve the 5-V output that we wanted. Example 1.7 shows a
MATLAB script that uses the input() command to take in the values of the
resistors and the input voltage.
Example 1.7
Construct a voltage divider calculator using MATLAB and determine the
output voltage from two 1000-V resistors with a load of 1 kV and 1 MV. The
program takes an input voltage value in volts.
% Example_1_7.m
% SWT 9-4-15
% Housekeeping
clear all; % clears the variable list and starts fresh
clc; % clears the command window
% Input values
%% Use the MATLAB input() command to request data
fprintf(‘Voltage divder calculator\n\n’);
prompt = ‘Enter the input voltage: ’;
VI = input(prompt); % in volts
% Calculation
%% Perform required calculations
REffective = 1/(1/R2 + 1/RL);
VO = VI* REffective/(R1+REffective);
% Output
%% Echo the results to the screen
fprintf(‘\nVout is: %6.1f V\n’, VO)
18 Chapter 1
While we are easily able to get the voltage that we want, is that all there
really is to this problem? The voltage output is typically used to drive a load.
This load can be represented by another resistor connected in parallel to R2.
We saw earlier that there will be a change in the circuit if we add another
resistor to the circuit. Let’s consider a load resistor of 400 V. Using Eq. (1.4),
the effective parallel resistance would be 200 V; thus, we would no longer have
5 V available as the output from the voltage divider. Of course, if the load was
closer to 1 MV, there would not be a problem.
As such, we need a better way to create our desired voltage that is not as
sensitive to the effect of adding a low resistance load. This is quite a common
problem, so some very elegant solutions are available; one of the best is the
voltage regulator. The voltage regulator is a rather sophisticated device, but it
is so commonly used that we will introduce it now, along with a brief
description (without much background detail at this point) of how to use it.
Voltage regulators are semiconductor devices designed to maintain a
constant voltage level. Here, we treat them as a “black box” and demonstrate
how they are used, starting with Fig. 1.8.
The 7805 voltage regulator lowers the battery voltage to 5 V. Regulators
come in many voltage ranges; the number 5 in the 7805 indicates that it
provides a 5-V regulated output. Often, the final capacitor C is not required
and is there to act as a source of extra charge if needed. This is a very practical
Figure 1.8 A voltage regulator used to convert a 9-V battery supply into 5 V. C1 and C2 are
low-valued capacitors to support the 7805 device, while C is a larger filter capacitor. C might
not always be required if the regulator is close to where the power is needed.
Introduction to Electronics 19
and simple power supply, and many different source configurations can be
used in place of the battery.
When a load is not attached, the power draw of the voltage regulator is
very low, making it ideal to be supplied by a battery. Voltage regulators
are available in a wide range of values such as the 7812, 7815, and so forth.
The major advantage of the voltage regulator is that it provides its
rated voltage over wide-range current requirements. The limitations and
proper operation of a voltage regulator can be found in the device data
sheets.
References
1. C. K. Alexander and M. N. O. Sadiku, Fundamentals of Electric Circuits,
Fifth Edition, McGraw-Hill, New York (2013).
2. B. Grob, Basic Electronics, Eighth Edition, McGraw-Hill, New York
(1997).
3. Resistor Guide: www.resistorguide.com. Last accessed: 4-14-16.
4. H. Moore, MATLAB® for Engineers, Fourth Edition, Prentice-Hall,
Upper Saddle River, New Jersey (2014).
5. P. Horowitz and W. Hill, The Art of Electronics, Cambridge University
Press, Cambridge (2015).
6. A. S. Sedra and K. C. Smith, Microelectronic Circuits, Oxford University
Press, Oxford (2015).