Electron Collisions Ohm's Law Complex Number Ground Kirchhoff's Voltage Law Voltage Dividers Thevenin Equivalent Circuits
Electron Collisions Ohm's Law Complex Number Ground Kirchhoff's Voltage Law Voltage Dividers Thevenin Equivalent Circuits
2
Schematics & Simulations Tutorial
0. INTRODUCTION
0.1 Introduction
A free, interactive electronics book that combines the math, the physics, and the engineering
intuition. 3 min read
Electronic systems rule our modern world, bridging the gap between
software and physical reality. From communication to industrial process
control to transportation to entertainment, the field of electronics continues
to grow in reach and complexity. A working knowledge of basic electrical
engineering concepts is now a powerful tool in many fields, and this value is
likely to grow in the coming decades.
The motto of this book is “one level deeper.” I’ve watched thousands of
students of electronics struggle to build an intuition for the topic because
they couldn’t connect the math, the physics, and the practical implications.
In this book, I’ll attempt to change that by presenting an integrated
approach, offering insight that is “one level deeper” than the immediate
topic at hand. For example, have you considered:
This is just a small taste of the kind of richly layered understanding that
electronics experts have, but it’s rarely found all in one place.
And let’s do it with hundreds of interactive schematics that you can load,
simulate, change, and simulate again, like this one:
Welcome to CircuitLab
circuitlab.com/c7pq5wm
Edit - Simulate
Exercise Click the circuit above.
When you click, the CircuitLab software opens in a new tab in your browser.
You can run a simulation of the circuit pictured, and then you can modify the
circuit and run it again.
0.2
Schematics & Simulations Tutorial
How to draw schematics and run circuit simulations. 12 min read
You can click any schematic in this book to open the circuit in the CircuitLab
circuit simulator software, which lets you edit and simulate circuits in your
browser. The circuit will always open in a new browser tab so you can
continue reading along.
Below are a few brief tutorials to walk you through the essential schematic
drawing and circuit simulation features so you can start building your own
circuits as fast as possible.
Getting Around
1. Click to open the circuit above.
2. To zoom the schematic:
o use the mousewheel, or
o use a two-finger drag up or down on your touchpad, or
o use the Ctrl-Plus or Ctrl-Minus keyboard shortcuts (Command-Plus
or Command-Minus on macOS), or
o use the zoom in/out controls in the bottom right of the CircuitLab
window, or
o use the Zoom In, Zoom Out, or Zoom to Fit options in the Edit menu
3. To pan around the schematic:
o hold the Ctrl (or Command) key while using your primary mouse
button to drag, or
o hold the middle mouse button (press mousewheel) and drag, or
o switch to Pan mode using the bottom-left button within the CircuitLab
window
Adding Components
1. To insert a component:
o First, use the mousewheel or two-finger scroll to scroll within the
toolbox on the left until you find the component you’d like
o Then, either:
drag the component from the toolbox to your schematic, or
click the component in the toolbox, and then click in the
schematic
2. To search for components:
o start typing in the search box at the top of the toolbox, or
o press / (frontslash) to bring keyboard focus to the search box
o Search can help you rapidly create components:
enter 10k to create a 10 kΩ resistor, for example
or, enter 2.2u to create a 2.2 μF capacitor, for example
Wires
1. To connect wires to your components:
o Hold your mouse over any terminal of any component. A gray circle
will appear.
o Click and drag to draw a wire wherever you’d like it to go.
2. You can also use the wire element from the toolbox.
Saving
1. To save your work, or generate schematic images as PDF, PNG, SVG, or
EPS files:
o press Ctrl+S (or Command+S) to save
o use the corresponding options under the File menu
DC Circuit Simulation
Power Efficiency of LED and Resistor with Resistor Parameter Sweep
circuitlab.com/c54th39gx3k5e
Edit - Simulate
Click the circuit above and follow the steps below to learn how to run
Exercise
DC circuit simulations.
DC Sweep Simulation
Power Efficiency of LED and Resistor with Resistor Parameter Sweep
circuitlab.com/c54th39gx3k5e
Edit - Simulate
Click the circuit above and follow the steps below to learn how to run
Exercise
DC sweep circuit simulations.
Time-Domain Simulation
Inrush Current Spike when Switching Capacitive Load
circuitlab.com/c9xrh77yk942d
Edit - Simulate
Click the circuit above and follow the steps below to learn how to run
Exercise
time domain circuit simulations.
1.2
Orders of Magnitude, Logarithmic Scales, and Decibels
1.1
Algebraic Approximations
Asymptotic and intermediate approximation techniques for back-of-the-envelope problem solving. 9
min read
One of the most common tools engineers (of all kinds!) use to make this
complexity manageable is to make algebraic approximations when it’s
safe to do so. While you may have seen these techniques previously, here’s
a quick refresher in context.
For the next few sections of approximations, we’ll consider this simple
function y(x) as an example to explore a few approximation techniques:
y(x)=11+x
This equation is not a linear relationship, but it (or a similar looking fraction)
often comes out of many circuit networks. From this one function, we can
make three types of algebraic approximations:
x2+x≈x2for x→∞
may seem a bit strange. In fact, the absolute error in this approximation
itself actually grows as x→∞ . That’s because we’re speaking about the
approximation colloquially in the context of the overall problem, rather than
strictly in a mathematical sense.
The generally accepted and more strict definition of a good asymptotic
approximation involves a limit (in the calculus sense) and a fraction:
11+x≈1−xfor |x|≪1
This is a very useful approximation and we might see it in other formats. For
one example, consider the ratio of resistances:
z=R1R1+R2
This fraction comes up in the analysis of every resistor divider. We can factor
out R1 from the denominator and find:
z=R1R1(1+R2R1)z=11+R2R1z=11+x
If we simply define x=R2R1 , the ratio of resistances, then our
function y(x) and all the approximations we’ve developed here apply to the
If R2≪R1 (and both R1>0 and R2>0 as is typical of all real resistors), then |x|
resistor divider problem.
z=11+0.01
which, for most people, is harder to think about directly!
y(x)=11+x
But, for values of x close to 1, we can approximate this fraction with a
simpler expression that doesn’t have an x in the denominator. Here’s how
we can construct the tangent line around the point x=1 :
^y3(x)=y(1)+y′(1)⋅(x−1)^y3(x)=12+(−14)⋅(x−1)^y3(x)=34−14x
In fact, we can use CircuitLab just as a plotting engine to generate a graph
showing how good this approximation really is.
^y(x)=y1+(x−x1)⋅(y2−y1x2−x1)
This would minimize error to zero at the two endpoints, but does nothing
to guarantee good approximation in the middle of the range.
3. Some line that is anchored neither at the endpoints nor midpoints. For
example, if we want to minimize the maximum approximation error over
the entire range, we may have to construct a line different from either
#1 or #2. This could be done numerically (for example, a linear least
squares approach might work) or graphically. This approximation may be
“better” in a practical way; for example, our approximations in #1 and
#2 may be off by 20% at some point along the curve, but our
approximation in #3 might be off by only 5% at its worst.
Here’s a quick example: let’s plot three different approximations for:
g(x)=(x−3)3for 3≤x≤5
The midpoint tangent line, endpoint linear interpolation, and linear least
squares approximations over this range are:
^g1(x)=3x−11^g2(x)=4x−12^g3(x)=3.606x−12.414
Plot these three approximation functions against the original:
Midpoint Tangent, Endpoint Interpolation, and Linear Least Squares
circuitlab.com/c5454x2ae58pt
Edit - Simulate
Click the “circuit” shown above, then click “Simulate”, then “Run DC
Exercise
Sweep”. All approximations have some error, but if you had to pick one,
which of the three approximations do you think is best?
What’s Next
In the next section, Orders of Magnitude, Logarithmic Scales, and Decibels,
we’ll use the approximations we’ve made here and see how they combine
with logarithms to form very powerful tools for understanding how a function
behaves over a wide range of input and output values.