Chapter 1

Electronics fundamentals

This chapter will introduce some of the fundamental concepts that you will need to learn about electronics. Electronics can be a little overwhelming when you first start to learn it, so the chapter begins with a brief introduction to scales, symbols and equations. A lot of the mistakes that new electronics learners make are caused by the many different scales, quantities and symbols that they have to contend with – not their own lack of knowledge or aptitude. This can quickly become very demoralizing, so from the outset try to remember that learning the language of electronics will take time as well as effort.

The chapter continues by addressing the fundamental concepts of electronics – current, voltage and resistance. These have been covered in great detail by many other sources, but they can still be confusing at first – particularly when presented as ‘easy’ concepts that you are expected to understand straight away. The idea of current being the movement of electrons and resistance being the means of slowing this movement should hopefully become clearer, but the concept of voltage being the potential for electrons to move can often take time to fully understand – we will return to all of these concepts again in later chapters so don’t be too concerned if certain aspects seem a little confusing at first!

The tutorial in this chapter introduces the Autodesk Tinkercad application, which is an online circuit simulator for simple Arduino projects. We will use this application in the first half of the book to test our Arduino code and simulate control systems for our circuits, so this chapter takes you through the basics of circuit simulation. After testing and simulation, we can then progress to prototyping our circuit using an actual Arduino, basic electronic components (resistor with LED) and breadboard. The chapter ends with our first circuit of an LED being lit by power from the Arduino – this is not a complex (nor impressive!) project, but it helps to introduce the project structure employed throughout the book. The chapter ends with some self-study questions, which are always popular with learners! It is hoped that you do not skip them to get to the more ‘interesting’ material – electronics is a language, and all languages require repetition for effective acquisition.

1.1 Scales, symbols and equations

When beginning to learn electronics, many of the terms used will be new to you. Just like mathematics and physics, electronics has its own language and so this chapter begins by discussing some of the fundamental elements involved. Before we do this, it is important to know a little about the mathematical scales used and how they relate to each other – they can often be a major source of confusion when learning some of the concepts and equations used in later chapters. Table 1.1 lists the common mathematical powers of ten and the symbols used to represent them.

Table 1.1 Powers of ten and their symbolic equivalent. The table lists the mathematical powers of ten, their relative scale and the symbols used to abbreviate them in electronics equations. The example quantities used are commonly found in computing (e.g. B for bytes) and engineering (e.g. V for volts, A for amps) – we will cover these quantities in more detail as the book progresses. Note that for each prefix the powers scale in three decimal places each time, with the exception of centi, which is commonly used for distance (cm) and liquid volume (cl).

Prefix

Power of ten

Multiplier

Symbol

Example

Terra

1012

1,000,000,000,000

T

4,000,000,000,000B = 4TB

Giga

109

1,000,000,000

G

3,000,000,000B = 3GB

Mega

106

1,000,000

M

3,000,000 = 3M

Kilo

103

1,000

k

25,000W = 25kW

None

100

1

none

Centi

10–2

0.01

c

0.1m = 10cm

Milli

10–3

0.001

m

0.005A = 5mA

Micro

10–6

0.000001

μ

0.000002V = 2μV

Nano

10–9

0.000000001

n

0.000000003F = 3nF

Pico

10–12

0.000000000001

p

0.000000000047F = 47pF

The table shows how large and small quantities can be scaled to make them easier to work with – it is much easier to refer to a 3MΩ resistor than a 3,000,000Ω resistor when listing components for a circuit. The key to working with powers of ten is to carry out the following steps:

1.Check whether the power is positive or negative – positive is larger than 1, negative is smaller than 1.

2.Count the number of decimal places from the lowest digit – the number of decimal places should be equal to the power of the number.

3.Convert the power to the nearest factor of 3 – we will be working with scales like M, k, m, μ, n, p so always scale the value to the nearest 3/6/9/12 power.

Often the most confusing thing about powers of ten is when a scaling prefix is applied to a number that is already scaled – you may sometimes encounter a capacitance value like 0.22μF which is equivalent to 220nF (0.000000022F)! Another downside of scaling in this way occurs when performing calculations with the actual quantities involved – particularly smaller values like μ, n and p. Let’s say we are working with two voltages that have values of 10mV and 8μV (we’ll learn about voltage later in the chapter), and that we want to add them together. The following example illustrates where problems can occur due to scaling if each step of the calculation is not performed correctly.

1.1.1 Worked example – adding voltages

We will learn more about adding voltages in chapter 3, but for now let’s look at how scaling affects the mathematical process involved.

Q1: What is the total voltage Vtot, as a result of adding 10mV and 8μV?

Answer: The total voltage Vtot is approximately 0.01V (rounded to 2 decimal places).

The example above seems simple enough, but what if the wrong scaling factor was used for either the 10mV or the 8μV values – the result would be very different! This can be a problem when learning electronics, where the quantities used are often related by completely different orders of magnitude. The reason for this is partly due to the evolution of knowledge over a long period of time, where the definition of a quantity and its scale were made prior to their current usage – for example, an audio signal capacitor will often be in the n or ρ range, whilst the resistors we will use will mainly be in the kΩ range. We will see another example of this later in the chapter when we encounter conventional current flow – it is conventional because of its historical precedent, even though electrical charge actually moves in the opposite direction! Although you may have learned other ways of doing arithmetic with powers of ten, in this book we will always write out the full quantity to avoid arithmetic errors – it may seem a little pedantic, but you can always double check the full value by counting the number of decimal places involved.

Another difficult aspect of electronics can be the symbols used for scales and quantities involved – you have already seen scaling symbols like k, c, m, μ, n, ρ in the table above, but symbols like ohms (Ω), watts (W), amperes (A), volts (V) and farads (F) were also used to define some of the different quantities used during the book. There is no easy way to learn symbols other than by practice, and as with scaling factors it is important to remember that learning a new set of concepts takes time – learning the language that represents them is a separate (though related) task that will also take a similar amount of time and effort. We will encounter this problem again when we learn how to program the Arduino in chapters 4 and 5 – programming concepts are what an Arduino can do, the syntax of the C language is how you tell the Arduino to do it! In all instances, if you take your time to follow all the steps in each task you will begin to see the method behind them.

In comparison to scales and symbols, the electronics equations we will use are relatively straightforward and do not employ complex mathematical operations like those found in other audio areas such as acoustics or digital signal processing. The main problem with learning electronics equations is that the scales and symbols involved introduce a new layer of complexity to adding, subtracting and multiplying quantities. For example, one of the most widely used equations in electronics is Ohm’s Law:

Voltage, V = IR(1.1)
V is the potential difference in volts (V)
I is the current in amperes (A)
R is the resistance in ohms (Ω)

The equation above is arranged to allow you to learn the relationship first, then consider the quantities involved afterwards – this convention is used for all equations in this book. We will learn more about Ohm’s Law in chapter 3, but for now consider the mathematical operation involved, where one quantity (voltage) is equal to another two quantities multiplied together. This is not a difficult mathematical relationship to grasp, but when you combine it with scales, symbols and other circuit analysis methods that we will learn (like Kirchoff’s Laws) it can often feel like it has become quite complicated. Thus, before you learn how to analyse a circuit, try to remember that you already know the mathematics involved – it’s the other elements that are new and sometimes confusing to learn!

An important thing to note about electronics equations is that many of them deal with proportions that are based on fractions. In the modern digital world computers are used for speed and accuracy, but when circuit theory was first proposed this means of calculation did not yet exist. Thus, when working with series and parallel circuits in chapter 3 you will learn about adding and multiplying fractions and also about reciprocals – 1 divided by the quantity. This will perhaps be unfamiliar to you (even if you studied it at school) as fractions are not used very much in modern computation – the fraction is usually converted to a percentage or simply to a decimal number, which in itself can create a significant level of scaling to quantify the value accurately (e.g. the fraction 13 can only be approximated using decimal numbers). The important point about fractions in electronics is that they are often used to represent ratios between quantities, as in the next example:

1.1.2 Worked example – working with fractions

Although we will often convert fractions to decimal values, it is important in electronics to understand the proportions of the quantity that they represent.

Q1: Add 12+14 and 14+14 – how do the answers compare as fractions of a 5V power supply?

Answer: 34 of a 5V supply (3.75V) is bigger than 12 of a 5V supply (2.5V) by 1.25V.

Q2: Multiply 12×23 – what is the reciprocal of the answer?

Answer: The multiplication answer is 13. The reciprocal of this answer is 3.

Worked examples are used throughout this book to introduce the theoretical equations used in circuit theory. The notes will try to break down the steps involved in working out an answer, alongside indicating where common mistakes can be made. A common barrier to learning electronics can often be the combination of scales, symbols and equations rather than any of them as individual elements. At all stages of your learning, try to remind yourself that any difficulties you may be encountering are incremental steps forward from what you already know – it can often feel like electronics is a very complex discipline, but in fact there are a relatively simple set of underlying mathematical relationships involved in basic circuit theory. Thus, the important point to remember is:

1.2 Electrical fundamentals

When learning electronics, you will come across terms like current, voltage and resistance as part of the language used to describe the behaviour of circuits. The basis of all these fundamental concepts is electrical charge, which defines how subatomic particles are either attracted to or repelled by one another based on their positive or negative polarity. Electrically charged particles follow simple rules:

Opposite electrical charges will Attract each other

Like (same) electrical charges will Repel each other

We are interested in electromagnetic force, which defines how particles actually move based on their charge. Although a particle can be electrically charged, it requires an electromagnetic force to move it closer to an opposite charge (or further away from a like particle). This is fundamentally important when learning about charge – the force needed to move a charge is not the charge itself. In a simple model of the atom, nucleons can either be a proton with a positive electrical charge, or a neutron that has no charge. An atomic nucleus is formed by a certain number of protons and neutrons that are bound to each other by the strong nuclear force (Figure 1.1).

Figure 1.1An atomic nucleus. This diagram shows the combination of nucleon particles within an atomic nucleus. Positively charged protons would repel each other without the presence of neutrons, which act as a spacer because they have no charge. The protons and neutrons are held together by the strong nuclear force between protons and neutrons (solid lines), which at shorter distances is greater than the electromagnetic force (dashed line) that would otherwise repel the protons from one another.

The strong nuclear force is greater than the electromagnetic force at very short distances, and so it helps bind neutrons to protons to prevent the positively charged protons from repelling each other – this creates an atomic nucleus. It can help to think of neutrons as subatomic ‘spacers’ that hold positive protons together, without them the electromagnetic force created between these like particles would split them apart. Apart from nucleons, the other major component of atoms are electrons, much smaller negatively charged particles that orbit the nucleus within different shells (Figure 1.2).

Figure 1.2The Rutherford-Bohr atomic model. This diagram is an illustration of how negatively charged electrons surround the positive nucleus (of protons and neutrons) in increasing orbital paths. As the distance from the nucleus increases, the electromagnetic force (dashed lines) between protons and electrons reduces. This model is often used as it simplifies the teaching of concepts like electrical conductance and chemical bonding.

The diagram shows each electron shell as having a principal quantum number (n), which defines the maximum number of electrons that can orbit within that specific shell using the relation 2n2. Although we don’t need to completely derive this proof for our electronics work, it is important to note that the factor of 2 in this relationship occurs because the electrons in each shell orbit in pairs (we will return to this in chapter 2 when we look at electromagnetic induction). If the maximum number of electrons are not present within a given shell, then there are holes available for other electrons to move into. Electrons have more energy than holes, so when an electron fills a hole the difference in energy is released as a photon – the fundamental particle of all electromagnetic radiation (this includes light you may already have heard about photons in this way). In an atom, the nearest shell to the nucleus has the strongest electromagnetic force between positively charged protons and negatively charged electrons. This means that the closest electron shells have the strongest attraction to protons in the nucleus. On the other hand, the outer shell contains valence electrons – free electrons that can be attracted to other positive charges outside the atom because they are not held by as strong an electromagnetic force (Figure 1.3).

Figure 1.3Valence electron movement. The diagram shows the outer valence shell of an atom, which has a weaker electromagnetic bond to the positive nucleus. In the top example, the right-hand atom has a stable outer shell, so no valence electrons can pass into its orbit as there are no holes for them to move into. In the bottom example, the less stable shell in the right-hand atom has many possible holes for a valence electron to move into.

In Figure 1.3, valence electrons are not strongly bound to the positive nucleus of their own atom and so they can be attracted to another nucleus – but only if this nucleus has holes available in its own valence shell. If an atom has a full valence shell it is considered to be more stable (in chemistry they are defined as less reactive), but those with holes have the potential to accept new electrons. We define net electrical charge as the difference between the number of protons and electrons in an atom (net being the result of a sum or difference), where electrically charged atoms are known as ions:

A cation is an ion with more protons than electrons, it has a positive net electrical charge

An anion is an ion with more electrons than protons, it has a negative net electrical charge

The difference in net charge is measured in coulombs (C), which is a Standard Unit (SI) for the measurement of electrical charge. A coulomb is defined as a net difference of 6.24 quintillion electrons ( 6.24×1018) for a negatively charged anion (or the same net difference in protons for a cation). If an electron leaves an atom, the net electrical charge for that atom becomes more positive. On the other hand, if an electron passes into the orbit of a new nucleus then the increased number of electrons means that the net electrical charge for that atom becomes more negative (Figure 1.4).

Figure 1.4Net electrical charge examples. The left-hand image shows a negatively charged anion, where there are more electrons than protons in the atomic structure. The middle image shows a neutral charge, where both protons and electrons are balanced. The right-hand image shows a positively charged cation, where the absence of electrons leaves holes.

In the diagram, the most important thing to notice are the holes in the positive cation charge: these are spaces that valence electrons can move into. This is a very important point to remember, as the concept of a positive charge can initially be confusing – a positive charge has holes for electrons to move into. Electrons are the only particle that can move from one nucleus to another (under normal conditions), so this effectively means that electrical charge is passed from atom to atom by the movement of electrons. This idea of charge flowing can be confusing at first, as we are actually talking about the movement of electrons changing the net charge of each atom they pass through – the change in net charge moves with them. A useful analogy for this is a Newton’s Cradle, where the inner spheres effectively do not move, but the force of the initial collision is transferred through them to reach the outer sphere (Figure 1.5).

Figure 1.5Newton’s cradle analogy for electrical charge. In this analogy, the spheres in the cradle are similar to atoms in a material. The force of the collision between the first and second sphere is transmitted to the sphere at the other end of the cradle, but (effectively) the other spheres do not move. In a similar way, as valence electrons move from one atom to another so the net electrical charge changes for each atom. The atoms themselves do not move, but their charge changes as electrons move between them.

Now we have a basic understanding of electrical charge and how it moves, we can define one of the fundamental units of electronic circuits:

One ampere of current is equivalent to one coulomb of charge flowing for one second of time. Time is the important difference between charge and current, as it is used to define the rate at which charge flows – 1 coulomb of charge flowing every 2 seconds would be 0.5A of current. You may already have encountered amperes (often called amps) as a common means of rating electrical and electronic equipment (Table 1.2).

Table 1.2 Listing of common current ratings. The table is a (broadly) indicative list of current ratings for common household and consumer equipment. We will be working with low-current circuits in this book, but many audio devices (particularly in live sound) operate at a high current rating.

Device

Current

Notes

Light Emitting Diode

20 - 30mA

LED’s can easily burn out, so checking current ratings is important. We covered measurement scales in the previous section, and the current here is measured in milliAmps (mA)- which means a factor of x10-3 must be applied to the value to scale it correctly.

Phone charger (Computer USB2)

500mA

The current rating is limited on the USB cable protocol when used with laptop or desktop computer ports- mainly so it will work with a wide range of devices such as keyboards, mice or webcams without damaging them. As we will learn, power is the product of current and voltage (), which means a dedicated mobile phone charger plugged into a wall socket will draw more power than a USB2 connection and so charge quicker.

Phone charger (Computer USB2)

900mA

Phone charger (wall socket)

1A

Laptop Computer

1 - 2A

Laptops are battery powered, and so they draw much smaller currents than desktops. For many applications a desktop machine is now not necessary, though many media production and rendering tasks still require more powerful hardware than found in laptops.

Desktop Computer

3A

Microwave

4.5A

The power usage for devices like microwaves, hair dryers and kettles is very high, hence you can often see the electricity meter moving faster when they are being used. In the case of a kettle, the current is much larger that a laptop computer so it will draw much more power (but usually for a shorter period of time).

Hair Dryer

10A

Kettle

13A

Current ratings are very important, as supplying the wrong level of electricity to a device can easily damage or destroy it. Similarly, a high-current device will require a connection that can provide that current – thus a mobile device charger will not be able to power a kettle, but a 13A kettle plug will deliver enough current to destroy a mobile phone battery. The size of an electrical current is effectively the amount of electrons moving past a given point, and the increased energy created by more electrons moving generates heat that requires thicker cables and more insulation to protect those handling them (Figure 1.6):

Figure 1.6Illustration of low and high current flow. The upper illustration shows a low current, where a small number of electrons are displaced and thus a thinner wire can be used without overheating (a transformer is used to step down the mains supply). The lower illustration shows a high current, where the heat generated by a larger number of electrons moving requires a much thicker wire to conduct it safely.

Conductivity defines the ability of a material to allow electrical charge to pass through it, where metals like copper have a high level of conductivity because they have less stable valence shells than other materials. This means copper wire is commonly used to conduct electricity, and thicker copper wires are able to move more electrons without overheating. We will learn more about resistivity (which is the opposite of conductivity) in the next section, but for now the next important concept to define is that of potential difference. You may already be familiar with the term voltage, but this is actually the unit of measurement for the potential difference between two points in an electronic circuit. We will use potential difference extensively in our audio circuit calculations, but it is often misunderstood as a concept and hence can cause confusion when learning the basics of electronic circuit theory. Potential difference is a term analogous with other areas of physics, and so we can use other forces to explain it more easily. For example, you may have learned that the potential energy of an object at a certain height is greater than that of one at a lower level – in this case the effect of gravity means that the higher object has more potential to move within the gravitational field by falling to the ground (Figure 1.7).

Figure 1.7Potential energy example. In the diagram, the Earth’s gravitational field (light grey lines) exerts a force that pulls objects towards it. The hands on the left hold two spheres of mass 1kg and 2kg at a height of 1m. The hands on the right also hold two spheres of mass 1kg and 2kg, but at a height of 2m. Notice that the spheres on the ground have no potential energy (measured in joules), and that the lower 2kg sphere has the same potential energy as the higher 1kg sphere.

The Earth’s gravity is a force that pulls objects towards it, and the further away an object is from the surface of the Earth the more gravitational energy needed to pull it back. An object at a certain height above the Earth is defined as having potential energy because there is no actual force being applied to the object yet – only the potential for that force to be applied if the object was free to move. Taking the diagram in Figure 1.7 as an example, if you hold a ball (sphere) in your hand you are providing the kinetic energy needed to cancel out the potential energy of the ball to fall to Earth. If you let go of the ball, the potential energy of the ball is now converted into kinetic energy by the force of gravity acting upon it – the ball falls to the ground. We measure potential energy in the Standard Unit (SI) of joules (J) as the product of mass, gravity and height (from the surface of the Earth) using the equation:

Potential energy, P = m × g × h(1.2)
P is the potential energy in joules (J)
m is mass of the object in kilograms (kg)
g is acceleration due to the gravity of Earth in metres per second (m/s2) – this value is defined as a constant of 9.8 ms2
h is the height of the object in metres (m)

To understand this relationship, it can help to remember that the original kinetic energy needed to lift the ball into the air in the first place is effectively the same as the kinetic energy that would be created by the gravitational force if you let the ball go (this is known as conservation of momentum). This kinetic energy is known as the work done to move an object between two points:

Work done, W = f × d(1.3)
W is the work done in joules (J)
f is the force needed to move the object in newtons (N)
d is distance the object moves in metres (m)

Work done helps us distinguish between potential energy and kinetic energy – the force defined in the above equation can be seen as the kinetic energy needed to move the ball over a certain distance, rather than the potential for work done that exists prior to us letting the ball go. We can now apply the same idea to electrically charged ions to define electrical potential, where a positively charged cation will attract electrons from a negatively charged anion towards it (Figure 1.8).

Figure 1.8Electric potential example. In the diagram, the holes in the positively charged cation on the right attract free electrons from the negatively charged anion on the left. Thus, we consider the positive cations to have a higher potential to move charge – though the actual movement requires work done. The directional lines represent the electric field that exists between the two charges, which in this case is defined from negative to positive.

In the diagram, the positively charged cation on the right has holes that can accept valence electrons from the negatively charged anion on the left. This means that the positive cation has the potential to move charge by attracting electrons towards it. The directional lines represent the resulting electric field that is created by the potential difference between the two charges, showing where there is potential for the movement of electrons (to restrict the size of the diagram, many of the wider field lines have been truncated). These lines are much like those shown in Figure 1.7, which indicate the direction of force exerted on the mass of an object by the gravitational pull of the Earth. As a result, we consider the positive charge to have a higher potential than the negative, which allows us to define the potential difference between the two charges as the work done in moving electrons between them:

Potential difference, V = W × C(1.4)
V is the potential difference between the two charges, in volts (V)
W is the work done in moving electrons between charges, in joules (J)
C is the number of electrons being moved, in coulombs (C)

The equation above is similar to our previous example in Figure 1.7 of potential energy – in the same way that gravity must do work to move an object that has potential energy closer to Earth, so the work done in moving a certain amount of charge is equivalent to the potential for that charge to move. The actual potential difference is governed both by the charge being moved (in coulombs) and the work done (in joules) to move it. This allows us to define our second fundamental concept of potential difference:

We measure potential difference (in volts) as the work done (in joules) needed to move a charge (in coulombs) between two points – 1 volt equates to 1 joule of work to move 1 coulomb of charge. The main problem you will encounter is that potential difference is commonly referred to as voltage – when actually what is meant is a potential difference measured in volts! To keep things simple, voltage will be used as it is the most common term you will encounter in electronics. Having said this, it can often be difficult for new learners when multiple terms are used interchangeably. We will be using voltage extensively in this book, so spend a little time reading this section again until you are comfortable with the concept of the potential to move charge.

As you now know, voltage is the potential for an electrical charge to move – not the work done by electrons when they are moving as an electrical current. The simplest practical example of potential difference is a battery, where chemical reactions between different elements are used to produce ions (Figure 1.9).

Figure 1.9A zinc-carbon battery. The left-hand diagram shows how a battery uses the chemical processes of oxidization and reduction to create anions and cations (respectively). The right-hand diagram shows a schematic representation of a battery as an electronic component, where the potential difference between negative (−) and positive (+) is shown for a standard 1.5V battery.

In the above example, zinc atoms oxidize (dissolve) in ammonium chloride leaving spare electrons behind, which creates an overall negative net charge of anions that collect at the metal base plate. At the same time, the manganese oxide and ammonium chloride reduce (removing electrons by using them to produce hydrogen) to leave holes and thus create an overall positive net charge of cations that collect around the carbon conductor (chosen because carbon does not oxidize like metals).

We now have a negative and positive terminal, and just as we saw in Figure 1.8 the imbalance between the charges at each terminal creates a potential difference between them. The right-hand diagram shows a schematic representation of the battery, where the arrow going from negative to positive indicates the potential difference between battery terminals. We refer to linked combinations of electronic components as circuits because they provide a circular path for current to flow. The schematic of the battery shown above is known as an open circuit – there is no path for a current to flow. If we were now to connect a single wire between the anode and cathode terminals of our battery, we would create what is known as a short circuit (Figure 1.10).

Figure 1.10Conventional current flow in a short circuit. The schematic diagram shows a direct wire connection between the anode and cathode terminals of a battery, known as a short circuit. The left-hand diagram shows the actual flow of electrons from negative to positive, whilst the right-hand diagram shows the direction of conventional current flow used in circuit analysis.

As current can now flow through the circuit from anode to cathode, the battery terminals will start to overheat due to the free movement of electrons. This can cause damage to the battery, other components or even the user of the circuit – thus we always avoid short circuits in practice! However, the biggest conceptual problem with the above diagram is the definition of conventional current flow on the right – how can this be conventional when electrons move in the opposite direction from negative to positive!

To this day, we still define circuits in terms of their positive potential difference and then analyse the flow of current going from positive to negative (or ground). You will find that every textbook (and university electronics programme) teaches in this way, so the same convention is used in this book to be consistent with the rest of the field. As our primary focus is to learn how to apply electronics theory to audio circuits, the direction of current flow is noted purely to disambiguate the concept for your own understanding. Though the flow of conventional current is effectively incorrect, in practice it makes no difference to the electronic calculations we will perform as long as we always calculate in a single direction. We will learn how to analyse basic circuits in the next chapter, and from now on we will use conventional current flow in all of our circuits. For now, let’s return to the problem of our battery overheating in Figure 1.10, as this short circuit demonstrates undesirable behaviour – a battery has a positive cathode and a negative anode, so when a current flows directly from one to the other it creates significant heat. As a result, we need to control the flow of current in all our circuits to prevent damage to components (or even the user). To do this, we define our third fundamental concept of resistance:

We learned in the previous section that less stable valence shells (i.e. those with more holes) make it possible for electrons to move and thus for electrical charge to flow. This is why materials like copper (and other metals) are good conductors – they have a relatively high number of holes when compared to insulators like glass (which is made from the more stable element of silicon). We use materials like copper to conduct the flow of charge (current) in a circuit, but we can also use them to create resistance within a circuit. To do this, we can combine some of what we learned in Figure 1.3 about current and the thickness of a wire with what we learned in Equation 1.3 about work done being related to the distance between points of electrical potential to understand how a wire wound resistor works (Figure 1.11).

Figure 1.11Wire wound resistor examples. The examples show a coil of copper wire (in grey) wound around an insulating core (in white), where the thickness of the wire and the number of turns (distance) dictate the overall resistivity of the component. In the left example, the thicker wire and lower number of turns allow more current to flow – it has low resistance. In the right example, the thinner wire and higher number of turns make it more difficult for current to flow – it has high resistance.

In this diagram, the copper coil in the left-hand example has thicker wire – it can carry more charge. This coil also has fewer turns, and so the current has a shorter distance to travel within the resistor (recall Equation 1.3 where Work done, W = f × d). This means it presents less resistance to the flow of current than the right-hand example, where a thinner wire with more turns will do more to resist the flow of charge – it will have a higher resistance value. There are many ways to create resistive components (e.g. carbon pile/film/printed) but wire wound resistors like those shown in the diagram above are particularly important because audio applications often use long cables for input (e.g. microphones) and/or output (e.g. loudspeaker) signals. Thus, understanding that all conductive materials have a resistance that varies with both length and thickness is of practical benefit when analysing the input and output requirements for amplifier circuits (we will learn more about this in chapter 2).

Among other fundamental contributions to electronics, George Ohm defined resistance as the relationship between the resistivity of the material used, the distance (length) the current must travel and the surface area (thickness) of the material involved:

Resistance, R=ρ×LA
R is the resistance in ohms (Ω)
ρ is the resistivity of the material used in ohm metres (Ω m)
L is length of the material in metres (m)
A is surface area of the material in square metres (m2)

Resistivity varies significantly between materials, with a conductor like copper having a value of around 1.72 × 10−8 Ω m (0.0000000172), whilst an insulator like glass has a resistivity of around 1 × 1014 Ω m (100000000000000). Resistance values are defined by colour-coded bands marked on the body of the resistor as shown in Figure 1.12

Figure 1.12Resistance value examples. The colour coding of the bands on a resistor indicates both the resistance and the tolerance (accuracy) of the component involved (shown in grayscale in the right-hand images). For a 4-band resistor (top), the first two bands are the value and the third is the scaling factor. For a 5-band resistor (bottom), the first three bands are the value, whilst the fourth is the scaling factor. In both cases the last band is the tolerance value, which is often silver (10%) or gold (5%) – or omitted (20%) for less accurate resistors.

The first example in the diagram is a 4-band resistor, where the value is defined by the first two digits (colours of red and black – giving 20) multiplied by the scaling factor (orange for 1k) to give a resistance of 20kΩ. The second example is a 5-band resistor, which uses three digits (220) multiplied by the same scaling factor (1k) to give 220kΩ. These examples are of low tolerance (silver means a value of 10%) and in practice this can often mean a cheaper component – even though it is marked with silver or gold!

In the next chapter we will learn how resistance can be used by sensors to measure changes in real-world quantities, and in chapter 3 we will learn how to calculate the resistance needed for a real circuit. For now, we can revisit our battery short circuit from Figure 1.10 to see how we can include a resistor to prevent the battery from overheating (Figure 1.13).

Figure 1.13A simple battery circuit. The diagram shows a battery connected to a resistor, which is the simplest practical electronic circuit. The potential difference of 1.5V is now across the terminals of the resistor, which prevents the battery from overheating. The left-hand diagram shows the standard European symbol for a resistor, which will be used throughout this book. The right-hand diagram shows the equivalent North American standard symbol, which you will see in many circuit examples.

In this circuit, the potential difference between the terminals of the battery is now ‘seen’ across the terminals of the resistor and so a short circuit across the battery is avoided – the potential for charge to move is now related to how much the resistor reduces the current flowing through it. It is important to remember that the resistor resists the flow of charge, and in chapter 3 we will learn how to use Ohm’s Law to calculate the required resistance needed when using power either from our Arduino board or from a separate battery.

In practice, if we connected a voltmeter across the terminals of the resistor to measure the actual voltage the connections between the resistor and battery will also present a (small) resistance to the flow of current (remember that all wires have resistance) and thus we will see a slightly lower voltage reading across the resistor than across the battery itself. This is particularly relevant in audio circuits, where we will often work with signal cables that are several metres long – even longer in live sound systems. These cables will have an increased resistance (and also a capacitance) due to their length, and in practice it is important that we bear this in mind when designing our audio systems to work with them. For now, we have a circuit where the flow of current is controlled by the resistor and we can use this as the basis of our first practical electronic circuit to light up a light-emitting diode (LED) (Figure 1.14).

Figure 1.14A simple light-emitting diode (LED) circuit. The left-hand schematic diagram uses the 5V and ground (GND) pins of an Arduino to replace the battery power supply in our previous example. A 150Ω resistor is connected in a series circuit with an LED light to prevent the current (in blue) from burning out the LED component. The right-hand diagram shows the positive anode (long leg) and negative cathode connections of an LED, alongside its schematic symbol.

In this circuit, the 150Ω resistor is used to limit the current flowing into the LED to prevent it from burning out. Without the resistor controlling the amount of current, the Arduino would supply too much current for the LED and it would burn out (creating a short circuit). Notice that LEDs have a specific polarity, where the longer leg is the positive terminal of the component. You may also notice that the words anode and cathode seem similar to anion and cation – this is another example of the confusion that can be caused by conventional current flow! We will learn more about how this circuit works in chapter 3, but for now the tutorial below will use it to introduce the Tinkercad application that we will use for some of our early circuits.

1.3 Tutorial – introduction to Tinkercad

Tutorials are used throughout this book to learn how to apply the concepts we have learned. All tutorials follow a series of steps that should allow you to successfully complete the task involved. It is vital that you do not skip any steps, as the tutorials in later chapters are designed to guide you through some of the common problems and mistakes that can occur when learning about audio electronic circuits. In this tutorial, we will do the following:

1.Set up a Tinkercad account and create a new Arduino circuit for simulation.

2.Learn how to read a breadboard layout to plan our circuit before building it.

3.Add components to our breadboard circuit by rotating and placing them correctly.

4.Close the connections in our circuit from +5V to GND.

5.Connect power lines to our breadboard to power our components.

6.Run a simulation of our circuit to light the LED.

The first thing we need to learn is how to read a breadboard. A circuit breadboard is a very useful prototyping tool, where components can be added to a circuit by placing them into specific pins in the board. The underside of the board is a series of metal contacts that are connected in columns – except for the power lines on the outside, which are connected in rows (Figure 1.15).

Figure 1.15Breadboard layout. The left-hand diagram shows how power rows (marked +/−) are connected horizontally across the two top (and bottom) rows of the breadboard to provide access to positive and negative (or ground) terminals at multiple points on the board. Component columns are connected vertically (right-hand image) and numbered in sequence, with each pin in a column having a different letter reference. The middle of the board breaks each component column, creating two separate work areas.

It can initially be confusing to work with a breadboard, as the power lines create a visual cue that suggests all other pins are also connected on rows. It can help to think of a breadboard like a crossword puzzle, where power (is) across and signals (are) down. The breadboard is also split along the middle of each column (a–e, f–j) to create two separate columns on the board – in later projects we will see how this allows us to add a lot more components to a single board. The best way to learn breadboard layouts is by practising with them, but there are some initial guidelines you can follow. Whenever you are designing a breadboard circuit layout, the best approach is to start with the first positive component connection in the circuit and place it somewhere near a power row (leaving one pin free to connect to the power rail itself). Then, add each subsequent component by placing its positive terminal on the same column as the negative terminal of the previous component – they are now linked because every pin in each column is already connected (Figure 1.16).

Figure 1.16Breadboard component layout. The left-hand image shows the component layout, the middle image shows the current path and the right-hand image shows the schematic. The two components from the circuit in Figure 1.14 (a resistor and an LED) are connected to each other because both of their pins are on the same column (column 6) of the board – we will use this layout in our circuit below.

Notice the resistor in this figure is connected on pins [i2–i6], which then allows a connection from the power line above to be added to pin j2 – because the resistor is also connected to column 2 it will now receive power. The final step is to add a ground connection to column 7, which will link the negative terminal (short leg) of the LED to ground (Figure 1.17).

Figure 1.17Adding power and ground connections. The left-hand image shows the component layout, the middle image shows the current path and the right-hand image shows the schematic. The power row is connected to all pins in column 2, which includes the resistor. The ground row is connected to all pins in column 7, which includes the negative terminal of the LED.

It is not unusual for you to find this type of layout difficult (and a little frustrating) when you begin working with breadboard circuits – it can take time to remember the simple rule: power across and signals down. For the tutorial below, make sure you follow all steps in sequence to avoid getting mixed up by the breadboard layout; as time goes on it will become more familiar to you.

Tutorial steps

1. Tinkercad is a free online simulation tool from Autodesk that allows you to design and simulate basic Arduino circuits. To start using Tinkercad, you must sign up for a free account using an existing email address.

2. Once you have completed sign-up you can login to Tinkercad, where your account tab on the left provides different simulation options. We are interested in Circuits, so click on this and then create a New Circuit using the button that appears in the workspace.

3. Once the circuit builder launches, you will see a blank workspace with a components tab on the right (if this is hidden, you can click the small arrow on the middle left to reveal it). We will be using the Basic Components list for this circuit, so you do not need to change anything right now. Also, notice the Code and Simulation buttons above the component list – we will be using these in our simulations over the next few chapters.

4. Scroll down the component list and click on the Arduino Uno R3 icon. This will then allow you to move the mouse over the workspace and place an Arduino board on it. Once you’ve added a board, place a Breadboard Small component to the right of the Arduino.

Your workspace should now look like this:

5. Scroll up through the component list until you find the resistor and LED icons. Click on the resistor first, then move the mouse over the breadboard to place it somewhere on Row 2 (we will be rotating it before final positioning).

6. When you have placed the resistor, click the rotate icon in the tools panel (top left) to turn the component orientation from vertical to horizontal. Once you have done this, move the resistor to place it between pins [i2–i6].

7. Click on the resistor to bring up the modal properties window, where you can change the resistance value. Type in 150 for the value and don’t forget to change the scaling factor from the default kΩ to Ω.

8. Now do the same thing with an LED, making sure to rotate it until the positive terminal (long leg) is on the left horizontal. Place it between pins [h6–h7].

9. We can now connect our power lines to the circuit. To do this, click on the power row to create a wire – Tinkercad shows this as a red circle with black border and also highlights all the pins on the associated column in green. Now move the mouse to pin j2 (which will now highlight red with black border) and click again to connect the wire to this pin. All wires default to green, so click on the wire again to bring up the modal properties window and change the colour to red (for positive).

10. Now do the same thing between pin j7 and the ground (negative) row – but this time change the wire colour to black.

11. We can now connect our power rows to the Arduino, to supply power to our circuit (and light our LED). Click on the Arduino 5V pin to create a new wire and connect it to the first pin of the power row on the breadboard.

12. To make our power wire easier to see, we can add multiple anchor points to route it in a path that does not cross over our components or breadboard. To add an anchor point to an existing wire, double click on any point along it. Tinkercad provides alignment guides (in blue) to allow you to route the wire at right angles around the board. When the path is complete, click on the wire again to bring up the modal properties window and change the colour to red (for positive).

13. Now do the same for the ground wire, by clicking on the GND pin of the Arduino and connecting it to the first pin of the negative (ground) row on the breadboard. Add multiple anchor points to route the wire in a clear path around the board. Click the wire again and change the colour to black (for ground).

14. We are now ready to test our circuit by running a simulation. Tinkercad makes this simple by providing a Run Simulation button in the top right of the workspace. If you click on this button, it should change to Stop Simulation – this means it is now running.

Your workspace should look like this:

If you have followed all steps in the tutorial and have a lit LED in your simulation window, then well done – you have completed your first electronic circuit! We will use Tinkercad for other circuits in later chapters (particularly those that involve Arduino code), so it is important to learn how to use it as quickly as possible to avoid the tool becoming a stumbling block in your audio electronics learning.

At this point, we have now covered all three fundamental elements needed to begin learning about electronic circuits:

We will be using current, voltage and resistance throughout this book so it can be useful to refer back to this section if you find some later concepts difficult to grasp. At the fundamental level, everything in electronics is about the movement of electrical charge – we measure either this level of movement or the potential for it to move (most of our circuits will use voltage changes rather than current). Resistance is used to control the movement of electrical charge, and this is how all circuits operate – even more advanced components like capacitors and semiconductors are all resistive in some way, so these three elements will form the core of all your learning in audio electronics. The example project below will take you through the steps needed to build the tutorial circuit – one of the aims of this book is to have at least one practical project at the end of each chapter that covers what you have learned. In later projects we will focus more on audio circuits, but the example project aims to use the minimum amount of components to get you up and running with a practical circuit straight away.

1.4 Example project – getting started: an Arduino-powered LED light

The example project will use an Arduino with a 150Ω resistor, LED and breadboard to build the circuit we have just simulated in Tinkercad – which again highlights its usefulness as a prototyping tool for Arduino. To build this project, you will need the following components (Figure 1.17):

1.An Arduino Uno board (or equivalent).

2.A breadboard.

3.A 150Ω resistor.

4.An LED (ideally red, but any colour will do for this project).

5.4 wires (ideally 2 red and 2 black, to make it easier to follow the circuit path).

Figure 1.18Project components. The image shows the Arduino, resistor, LED, connector wires and connector cables that will be used to create the project circuit on the breadboard.

We will build our first circuit powered by the Arduino based on the schematic in Figure 1.19 (used in the previous tutorial):

Figure 1.19Project schematic. The image shows the schematic introduced in Figure 1.14 that was used to build the Tinkercad tutorial circuit in the previous section. We will now build the same circuit on breadboard.

In each project in the book, every build stage begins by showing the schematic for that stage and then its breadboard layout. In the opening chapters, we will also include the current flow for this layout to help you follow the breadboard layout process, and also as a check to ensure you have set everything out correctly (Figure 1.20).

Figure 1.20Translating a schematic to breadboard layout. The first image shows part of the schematic from Figure 1.19, redrawn with inline components to help you follow the circuit path. The second image shows the breadboard layout for the components involved, and the third image shows the current flow through these components.

Now we have a plan for our component layout, we can begin to build the circuit on breadboard.

Project steps

Start by placing the components (resistor and LED) on the breadboard.

1. Add the 150Ω resistor between pins [i2–i6]

2. Add the LED between pins [h6–h7] – long leg (cathode) on pin h6

1. Add a connecting wire (or cable if not available) from pin j7 to the ground rail on the breadboard. [j7–GND]

2. Add a connecting wire from pin j2 to the positive power rail. [j2–V+]

1. Add a connecting wire from the Arduino GND (top row, 4th pin from left) to the ground rail on the breadboard. [ADgnd–GND]

2. Add a connecting wire from the Arduino 5V pin (bottom row, 5th from left) to the power rail on the breadboard. [ADv+–V+]

If you have connected everything correctly, the LED should light up (see next page):

1.5 Conclusions

In this chapter, we have begun learning some of the fundamental methods and concepts of electronics. We found that scales, symbols and equations are effectively the language of electronics – all languages take time to learn. We also covered three fundamental concepts that we will use throughout this book: current, voltage and resistance. Voltage can be a difficult concept to understand, and we will return to it again in chapter 3 to reinforce what we have learned. The tutorial introduced the Autodesk Tinkercad online application for testing Arduino code and circuit designs – we will use this application again in the following chapters. The final project built a prototype of the tutorial circuit, a first practical circuit that lights an LED.

In the next chapter, we will learn the basic elements of an electronic system that combines inputs from sensors with outputs to actuators. This will help us understand the requirements of our audio circuits and what components we need to design them. When we learn how to program the Arduino controller in chapter 4 we will use our knowledge of systems to consider how it can be used to control the processes carried out by our circuits, so it is important to begin with a conceptual understanding of how this is implemented.

1.6 Self-study questions

In each chapter, a short set of questions are provided that aim to enhance your learning of the topic. Such questions can often be ignored because they are either considered by the learner to be too easy (or too difficult), or sometimes the learner is keen to progress onto more interesting topics and doesn’t want to be slowed down by what they believe to be yet more examples of the same things they have just learned. One of the reasons for self-study questions is to develop your practice of electronic theory, to make sure you build on a set of solid examples that will help you to reduce the mistakes you make when learning. As mentioned at the beginning of the chapter, learning can be significantly impeded by an increasing belief that ‘this is too difficult’ based on errors or mistakes in your work.

If you think you didn’t understand the chapter, use the questions to focus on what you still need to learn.

If you think you did understand the chapter – prove it by getting 100% in the questions!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.190.182