Table of Contents
Preface to the Second Edition page
Overview, as the Course begins
Preface to the First Edition
Part I Analog: Passive Devices
1N DC Circuits
1N.1 Overview
1N.2 Three laws
1N.3 First application: voltage divider
1N.4 Loading, and “output impedance”
1N.5 AoE Reading
1L Lab: DC Circuits
1L.1 Ohm’s law
1L.2 Meters, VOM and DVM
1L.3 Voltage divider
1L.4 Converting a meter movement into a voltmeter and ammeter
1L.5 The diode
1L.6 I versus V for some mystery boxes
1L.7 Oscilloscope and function generator
1S Supplementary Notes: Resistors, Voltage, Current
1S.1 Reading resistors
1S.2 Voltage versus current
1W Worked Examples: DC circuits
1W.1 Design a voltmeter, current meter
1W.2 Resistor power dissipation
1W.3 Working around imperfections of instruments
1W.4 Thevenin models
1W.5 “Looking through” a circuit fragment, and Rin, Rout
1W.6 Effects of loading
1O Online Content: Breadboarding Hints & Tips
1O.1 Solderless breadboards
1O.2 Two possible breadboard choices
1O.3 Building circuits with the solderless breadboard
2N RC Circuits
2N.1 Capacitors
2N.2 Time-domain view of RCs
2N.3 Frequency domain view of RCs
2N.4 Blocking and decoupling
2N.5 A somewhat mathy view of RC filters
2N.6 AoE Reading
2L Lab: Capacitors
2L.1 Time-domain view
2L.2 Frequency-domain view
2S Supplementary Notes: RC Circuits
2S.1 Reading capacitors
2S.2 C notes: trying for an intuitive grip on capacitors’ behavior
2S.3 Sweeping frequencies
2W Worked Examples: RC Circuits
2W.1 RC filters
2W.2 RC step response
3N Diode Circuits
3N.1 Overloaded filter: another reason to follow our 10× loading rule
3N.2 Scope probe
3N.3 Inductors
3N.4 LC resonant circuit
3N.5 Diode circuits
3N.6 An important diode application: DC from AC
3N.7 Unregulated power supply
3N.8 Radio!
3N.9 AoE Reading
3L Lab: Resonant and Diode Circuits
3L.1 LC resonant circuit
3L.2 Diode X–Y plots: a vivid way to display diode I–V behavior
3L.3 Half-wave rectifier
3L.4 Full-wave bridge rectifier
3L.5 Design exercise: AM radio receiver (fun!)
3L.6 Signal diodes
3S Supplementary Notes and Jargon: Diode Circuits
3S.1 A puzzle: why LC’s ringing dies away despite Fourier
3S.2 Jargon: passive devices
3W Worked Examples: Diode Circuits
3W.1 Power supply design
3W.2 Zin
Part II Analog: Discrete Transistors
4N Transistors I
4N.1 Overview of Labs 4 and 5
4N.2 Preliminary: introductory sketch
4N.3 The simplest view: forgetting beta
4N.4 Add quantitative detail: use beta explicitly
4N.5 A strikingly different transistor circuit: the switch
4N.6 Recapitulation: the important transistor circuits at a glance
4N.7 AoE Reading
4L Lab: Transistors I
4L.1 Transistor preliminaries: look at devices out of circuit
4L.2 Emitter follower
4L.3 Fixing a defect in the follower’s 𝑅out
4L.4 Current source
4L.5 Common-emitter amplifier
4L.6 Transistor switch
4L.7 A note on power-supply noise
4W Worked Examples: Transistors I
4W.1 Emitter follower
4W.2 Phase splitter: input and output impedances of a transistor circuit
4W.3 Transistor switch
5N Transistors II
5N.1 Some novelty, but the earlier view of transistors still holds
5N.2 Reviewish: phase splitter
5N.3 Another view of transistor behavior: Ebers–Moll
5N.4 Complication: distortion in a high-gain amplifier
5N.5 Complication: temperature instability
5N.6 Current mirror
5N.7 Reconciling the two views: Ebers–Moll meets IC = 𝛽 × 𝐼B
5N.8 “Difference” or “differential” amplifier
5N.9 Postscript: deriving re
5N.10 AoE Reading
5L Lab: Transistors II
5L.1 Difference or differential amplifier
5L.2 AM modulator
5L.3 Current mirror
5S Supplementary Notes and Jargon: Transistors II
5S.1 Two surprises, perhaps, in behavior of differential amp
5S.2 Current mirrors: Early effect
5S.3 Transistor summary
5S.4 Important circuits
5S.5 Jargon: bipolar transistors
5W Worked Examples: Transistors II
5W.1 High-gain amplifiers
5W.2 Differential amplifier
5W.3 Op-amp innards: diff-amp within an IC operational amplifier
Part III Analog: Operational Amplifiers and their Applications
6N Op-Amps I
6N.1 Overview of feedback
6N.2 Preliminary: negative feedback as a general notion
6N.3 Feedback in electronics
6N.4 The op-amp Golden Rules
6N.5 Applications
6N.6 Two amplifiers
6N.7 Inverting amplifier
6N.8 When do the Golden Rules apply?
6N.9 Strange things can be put into feedback loop
6N.10 AoE Reading
6L Lab: Op-Amps I
6L.1 A few preliminaries
6L.2 Open-loop test circuit
6L.3 Close the loop: follower
6L.4 Non-inverting amplifier
6L.5 Inverting amplifier
6L.6 Summing amplifier
6L.7 Design exercise: unity-gain phase shifter
6L.8 Push–pull buffer
6L.9 Current-to-voltage converter
6L.10 Current source
6W Worked Examples: Op-Amps I
6W.1 Basic difference amp made with an op-amp
6W.2 A more exotic difference amp
6W.3 Problem: odd summing circuit
7N Op-Amps II: Departures from Ideal
7N.1 Old: subtler cases, for analysis
7N.2 Op-amp departures from ideal
7N.3 Five more applications
7N.4 Differentiator
7N.5 Op-amp difference amplifier
7N.6 Instrumentation amplifier
7N.7 AC amplifier: an elegant way to minimize effects of op-amp DC errors
7N.8 AoE Reading
7L Lab: Op-Amps II
7L.1 Integrator
7L.2 Differentiator
7L.3 Slew rate
7L.4 Instrumentation amplifier
7L.5 AC amplifier: microphone amplifier
7S Supplementary Notes: Op-Amp Jargon
7W Worked Examples: Op-Amps II
7W.1 The problem
7W.2 Op-amp millivoltmeter
8N Op-Amps III: Nice Positive Feedback
8N.1 Useful positive feedback
8N.2 Comparators
8N.3 RC relaxation oscillator
8N.4 Sinewave oscillator: Wien bridge
8N.5 AoE Reading
8L Lab: Op-Amps III
8L.1 Two comparators
8L.2 Op-amp RC relaxation oscillator
8L.3 Easiest RC oscillator, using IC Schmitt trigger
8L.4 Apply the sawtooth: PWM motor drive
8L.5 IC RC relaxation oscillator: ’555
8L.6 ’555 for low-frequency frequency modulation (“FM”)
8L.7 Sinewave oscillator: Wien bridge
8W Worked Examples: Op-Amp III
8W.1 Schmitt trigger design tips
8W.2 Problem: heater controller
9N Op-Amps IV: Parasitic Oscillations; Active Filter
9N.1 Introduction
9N.2 Active filters
9N.3 Nasty “parasitic” oscillations: the problem, generally
9N.4 Parasitic oscillations in op-amp circuits
9N.5 Op-amp remedies for keeping loops stable
9N.6 A general criterion for stability
9N.7 Parasitic oscillation without op-amps
9N.8 Remedies for parasitic oscillation
9N.9 Recapitulation: to keep circuits quiet. . .
9N.10 AoE Reading
9L Lab: Op-Amps IV
9L.1 VCVS active filter
9L.2 Discrete transistor follower
9L.3 Op-amp instability: phase shift can make an op-amp oscillate
9L.4 Op-amp with buffer in feedback loop
9S Supplementary Notes: Op-Amps IV
9S.1 Op-amp frequency compensation
9S.2 Active filters: how to improve a simple RC filter
9S.3 Noise: diagnosing fuzz
9S.4 Annotated LF411 op-amp schematic
9S.5 Quantitative effects of feedback
9W Worked Examples: Op-Amps IV
9W.1 What all that op-amp gain does for us
9W.2 Stability questions
10N Op-Amps V: PID Motor Control Loop and Lock-in Amplifier
10N.1 PID Controller
10N.2 Lock-in Amplifier
10N.3 AoE Reading
10L Lab: Op-Amps V
10L.1 PID Controller
10L.2 Lock-in amplifier
11N Voltage Regulators
11N.1 Evolving a regulated power supply
11N.2 Easier: 3-terminal IC regulators
11N.3 Thermal design
11N.4 Current sources
11N.5 Crowbar overvoltage protection
11N.6 A different scheme: switching regulators
11N.7 AoE Reading
11L Lab: Voltage Regulators
11L.1 Linear voltage regulators
11L.2 A switching voltage regulator
11W Worked Examples: Voltage Regulators
11W.1 Choosing a heat sink
11W.2 Applying a current-source IC
12N MOSFET Switches and an Introduction to JFETs
12N.1 Why we treat FETs as we do
12N.2 Power switching: turning something ON or OFF
12N.3 A power switch application: audio amplifier
12N.4 Logic gates
12N.5 Analog switches
12N.6 Applications
12N.7 Testing a sample-and-hold circuit
12N.8 AoE Reading
12L Lab: MOSFET Switches and a JFET AGC
12L.1 Power MOSFET
12L.2 Analog switches
12L.3 Switching audio amplifier
12L.4 A Glimpse of JFETs
12L.5 Applying the voltage-controlled resistance
12L.6 Put the pieces together: AGC
12S Supplementary Notes: MOSFET Switches
12S.1 A physical picture
13N Group Audio Project
13N.1 Overview: a day of group effort
13N.2 One concern for everyone: stability
13N.3 Sketchy datasheets for LED and phototransistor
13L Lab: Group Audio Project
13L.1 Typical waveforms
13L.2 Debugging strategies
Part IV Digital: Gates, Flip-Flops, Counters, PLD, Memory
14N Logic Gates
14N.1 Analog versus digital
14N.2 Number codes: Two’s-complement
14N.3 Combinational logic
14N.4 Gate types: TTL and CMOS
14N.5 Noise immunity
14N.6 More on gate types
14N.7 AoE Reading
14L Lab: Logic Gates
14L.1 Set up
14L.2 Input and output characteristics of integrated gates: TTL and CMOS
14L.3 Pathologies
14L.4 Applying IC gates to generate particular logic functions
14L.5 Gate innards; looking within the black box of CMOS logic
14S Supplementary Notes: Digital Jargon and Logic Interfacing
14S.1 Digital glossary
14S.2 Interfacing among logic families
14W Worked Examples: Logic Gates
14W.1 Multiplexing: generic
14W.2 Binary arithmetic
14O Online Content: Logic Gates
14O.1 Adding a fixed 3.3V supply to the PB-503 breadboard
15N Introduction to Programmable Logic
15N.1 The hardware
15N.2 Creating the bitstream
15N.3 Introduction to Verilog
15N.4 Digital logic recap
15N.5 AoE Reading
15L Lab: Programmable Logic
15L.1 Introduction to FPGA combinational logic
15L.2 Active-low design
15L.3 Solutions
15S Supplementary Notes: The WebFPGA
15S.1 Introducing the WebFPGA
15S.2 Verilog resources
15W Worked Examples: Programmable Logic
15W.1 Digital comparators
15O Online Content: Programmable Logic
15O.1 Online FPGA resources
15O.2 Alternatives to the WebFPGA
16N Flip-Flops
16N.1 Sequential circuits generally, and flip-flops
16N.2 Applications: more debouncers
16N.3 Another flop application: shift-register
16N.4 Flip-flops in Verilog
16N.5 AoE Reading
16L Lab: Flip-Flops
16L.1 A primitive flip-flop: SR latch
16L.2 D type
16L.3 Switch bounce, and three debouncers
16L.4 Shift register
16L.5 That was fun, let’s do it again in Verilog
16L.6 Solutions
16S Supplementary Notes: Flip-Flops
16S.1 Flip-flop tricks
16S.2 Blocking versus non-blocking assignments
17N Counters
17N.1 But first some circuit dangers and anomalies
17N.2 Counters: ripple vs. synchronous
17N.3 Designing a larger, more versatile synchronous counter
17N.4 Some useful counter functions
17N.5 Creating divide-by-N counters
17N.6 Counters in Verilog
17N.7 AoE Reading
17L Lab: Counters
17L.1 Counter lab
17L.2 Counters: ripple and synchronous
17L.3 Test a divide-by-3 built two ways
17L.4 8-bit counter
17L.5 Build a selectable divide-by-N counter
17L.6 Counter applications: stopwatch
17L.7 Counters in Verilog
17S Supplementary Notes: Digital Debugging
17S.1 Digital debugging tips
17W Worked Examples: Applications of Counters
17W.1 Using carry out as a clock signal
17W.2 Counting as a digital design strategy
17W.3 Using a counter to measure period, thus many possible input quantities
17W.4 Bullet timer
17O Online Content: Counters
17O.1 74LS469 alternatives
18N Memory
18N.1 Buses
18N.2 Memory
18N.3 Memory in Verilog
18N.4 AoE Reading
18L Lab: Memory
18L.1 Build a Verilog RAM
18L.2 Build a display decoder ROM
18S Supplementary Notes: Memory Blocks
18S.1 Accessing FPGA resource blocks
18S.2 Using WebFPGA EBR memory blocks
19N Finite State Machines
19N.1 State machine: new name for old notion
19N.2 Designing any sequential circuit: beyond counters
19N.3 Designing an odd two-bit counter
19N.4 Selecting the FSM clock frequency
19N.5 Recapitulation: several possible sequential machines
19N.6 AoE Reading
19L Lab: Finite State Machines
19L.1 Design the control logic for a reaction timer
19L.2 Solutions
19W Worked Examples: State Machines
19W.1 Complex blink five ways
19W.2 Takeaway
Part V Digital: Analog–Digital, PLL, Digital Project Lab
20N Analog ↔ Digital; PLL
20N.1 Digital⇔analog conversion, generally
20N.2 Digital to analog (DAC) methods
20N.3 Analog-to-digital conversion
20N.4 Sampling artifacts
20N.5 Dither
20N.6 Phase-locked loop
20N.7 AoE Reading
20L Lab: Analog ↔ Digital; PLL
20L.1 Analog-to-digital converter
20L.2 Phase-locked loop: frequency multiplier
20S Supplementary Notes: Sampling Rules; Sampling Artifacts
20S.1 What’s in this chapter?
20S.2 General notion: sampling produces predictable artifacts in the sampled data
20S.3 Examples: sampling artifacts in time- and frequency-domains
20S.4 Explanation: the images, intuitively
20W Worked Examples: Analog ↔ Digital
20W.1 ADC
21N Digital Project Lab
21N.1 A digital project
21L Lab: Digital Project
21L.1 Multiplex the four-digit LED display
21L.2 Some project ideas
Part VI Microcontrollers
22N Microcontrollers I: Introduction
22N.1 Microcomputer basics
22N.2 Which microcontroller to use?
22N.3 The ARM Cortex architecture
22N.4 Yikes! Isn’t there an easier way?
22N.5 The first day of the microcontroller lab
22N.6 AoE Reading
22L Lab: Microcontrollers I
22L.1 Introduction to the SparkFun SAMD21 Mini
22L.2 Install the SparkFun SAMD21 Mini
22L.3 Testing your development environment
22L.4 A debugging primer
22L.5 Blink the external LED
22L.6 Add a delay to permit full speed operation
22L.7 Make the delay a function
22L.8 Use read-modify-write to toggle the LED
22L.9 Use a single register write to toggle the LED
22L.10 Solutions
22S Supplementary Notes: Microcontrollers I
22S.1 Preparing the SparkFun SAMD21 Mini Breakout
22S.2 Installing Segger Embedded Studio for ARM
22S.3 Programming in C
22O Online Content: Microcontrollers I
22O.1 Alternatives to the SparkFun SAMD21 Mini
23N Microcontrollers II: Stacks, Timers and Input
23N.1 The computer stack
23N.2 Subroutine (function) calls
23N.3 An improved delay function
23N.4 SAMD21 port input
23N.5 Intrinsic functions for CPU instructions
23N.6 AoE Reading
23L Lab: Microcontrollers II
23L.1 Create a better Delay() function
23L.2 Add a pushbutton to control the LED
23L.3 Scan a matrix keyboard
23L.4 Solutions
23S Supplementary Notes: Creating Robust, Readable and Maintainable Code
23S.1 Write functions to isolate hardware from your application
23S.2 Write your application as a finite state machine
23S.3 A deeper dive into the CMSIS structure format
24N Microcontrollers III: Using Internal Peripherals
24N.1 Initialize the DAC
24N.2 Write the DAC output function
24N.3 Lab preview
24N.4 AoE Reading
24L Lab: Microcontrollers III
24L.1 DAC skeleton code
24L.2 Test the SAMD21 DAC
24L.3 Add an audio amp, so you can listen
24L.4 Conclusion
24L.5 Solutions
24S Supplementary Notes: Waveform Processing
24S.1 Add the hardware
24S.2 Test your waveform processing system
24S.3 Some suggested lab exercises
24S.4 Skeleton code for waveform processing
24S.5 Solutions
24W Worked Examples: Speeding up the SAMD21 CPU clock
24W.1 Why does the SAMD21 run so slowly after a reset?
24W.2 Let’s look at the CPU clock (literally!)
24W.3 Speeding up the SAMD21
25N Microcontrollers IV: Timers & Interrupts
25N.1 The SAMD21 Timer/Counter peripherals
25N.2 Interrupts
25N.3 Lab preview
25N.4 AoE Reading
25L Lab: Microcontrollers IV
25L.1 Use Timer/Counter 4 to generate a square wave
25L.2 Use the TC4 interrupt to update the DAC
25L.3 Timer/DAC skeleton code
25L.4 Conclusion
25L.5 Solutions
25S Supplementary Notes: A Detailed Look at SAMD21 Interrupt Handling
25S.1 The test program
25S.2 Let’s take a look at the foreground program
25S.3 Conclusion
25W Worked Examples: Using SAMD Interrupts
25W.1 An interrupt-driven pulse measurement system
25O Online Content: Creating PlaySong() data
25O.1 What is PlaySong?
26N Microcontrollers V: Serial Communication
26N.1 Some serial buses
26N.2 The SAMD21 SERCOM peripheral
26N.3 Other serial protocols. . .
26N.4 Readings
26L Lab: Microcontrollers V
26L.1 Using the SAMD21 SERCOM peripheral
26L.2 Selecting the SparkFun SAMD21 Port I/O pins
26L.3 The SparkFun SerLCD display
26L.4 Program the SERCOM for SPI communications
26L.5 LCD display tests
26L.6 The MCP41010 digital potentiometer
26L.7 SPI digipot test program
26L.8 Build a theremin
26L.9 Cleanup
26L.10 SPI test code
26L.11 Conclusion
26L.12 Solutions
26W Worked Examples: Interrupt-Driven Serial I/O and SPI Off-chip RAM
26W.1 An interrupt-driven version of SPI SendData()
26W.2 Adding more RAM
26W.3 Make a voice recorder
26W.4 Solutions
27N Microcontrollers VI: Using an RTOS
27N.1 Real-time operating systems
27N.2 Segger embOS
27N.3 Readings
27L Lab: Microcontrollers VI
27L.1 Complete the hardware build
27L.2 Install embOS and updated sample code
27L.3 Get familiar with the RTOS
27L.4 Build a lullaby jukebox
27L.5 Testing and debugging an embOS program
27L.6 Conclusion
27L.7 Solutions
27S Supplementary Notes: Installing embOS
27S.1 Installing Segger embOS
27W Worked Examples: Adding IR Remote Control to the Jukebox
27W.1 Remote control
27W.2 The hardware
27W.3 Choosing an IR transmitter
27W.4 Decoding the demodulated IR signal
28N Project Possibilities: Toys in the Attic
28N.1 Projects: an invitation and a caution
28N.2 Some pretty projects
28N.3 Some other memorable projects
28N.4 Games
28N.5 Sensors, actuators, gadgets
28N.6 Stepper-motor drive
28N.7 Project ideas
28N.8 And many examples are shown in AoE
28N.9 Now go forth
28O Online Content: Toys in the Attic Sensors, Actuators, and Gadgets
28O.1 A few good sources of sensors, actuators, and other devices
28O.2 A source of small parts for mechanical linkages
28O.3 “Servo” motors
28O.4 Nitinol muscle wires
28O.5 Transducers
28O.6 Displays
28O.7 Interface devices
Appendices
A Appendix: Debugging Circuits
A.1 A debugging checklist
A.2 David’s Axiom
B Appendix: Pinouts
B.1 Analog
B.2 Digital
C Appendix: Transmission Lines
C.1 A topic we have dodged till now
C.2 A new case: transmission line
C.3 Reflections
C.4 But why do we care about reflections?
C.5 Transmission-line effects for sinusoidal signals
D Appendix: Scope Advice
D.1 What we don’t intend to tell you
D.2 What we’d like to tell you
O Online Appendices
Index