Datasheets, Schematics and Bench Tools
This volume turns the course towards the bench. It reads a real schematic part by part, designs a transistor switch from the worst-case figures in a datasheet, shows how accurate a multimeter really is and how it disturbs what it measures, introduces the oscilloscope and the logic analyser, and ends with a first build on a breadboard - and a table of what your meter should read.
- How to read a schematic: designators, power symbols, dots and compact values like 4k7
- How a datasheet is organised, and why designs use its minimum and maximum values
- What a multimeter's accuracy figure means, and how an ammeter changes the current
- How to read an oscilloscope trace and choose a probe, and what a logic analyser shows
- How to build a circuit on a breadboard and check it against predicted measurements
8.1 Reading a schematic
A schematic is a map of connections. Each part has a symbol, a name such as R1 or Q1, and a value, and lines show which pins join. Read it by finding the supply, following the current round, and asking what each part is there to do.
The language of schematics
You have been reading schematics all through this course. Real ones use the same symbols, and a few more habits:
- Reference designators. Each part has a letter and a number. R is a resistor, C a capacitor and L an inductor. D is a diode or LED, Q a transistor, U a chip and S a switch.
- Power and ground symbols. Instead of drawing every wire back to the battery, a schematic marks points with a supply symbol, such as VDD, or a ground symbol. All points with the same symbol are joined.
- Dots. A dot joins crossing wires. Two wires that cross with no dot are not connected.
- Signal flow. Inputs are usually on the left, outputs on the right, higher voltages near the top.
Values without a decimal point
Printed schematics often put the prefix letter where the decimal point would be, because a dot is easily lost when a drawing is copied. R stands for the point in a plain ohms value:
4k7 = 4.7 kΩ
2R2 = 2.2 Ω
1M5 = 1.5 MΩ
4n7 = 4.7 nF
100n = 100 nF
2u2 = 2.2 µF
Reading a whole circuit
Here is the circuit you will build in Module 5:
- Find the supply. B1, a 9 V battery, with ground at its - end.
- Find the load. The LED D1, with R3 to set its current, as in Volume 04.
- Find what switches it. Q1, an NPN transistor below the LED, as in Volume 05.
- Find what controls the switch. The button S1, through R1 into Q1's base. R2 is a pull-down, so the base circuit rests at 0 V when S1 is released.
Put in words: pressing the button turns the transistor on, and the transistor lights the LED. Every part has a reason to be there.
On a schematic, two wires cross with no dot where they meet. Are they connected?
Show the answer
Answer: D. A dot marks a join. Wires that cross without one are drawn crossing only because the page is flat; they are not connected.
8.2 Reading a datasheet
A datasheet is a part's rulebook. Absolute maximum ratings are limits never to approach; electrical characteristics give minimum, typical and maximum values. Design with the worst case, not the typical.
Three kinds of number
A datasheet starts with a summary of what the part is for, then gives its numbers in sections:
- Absolute maximum ratings. Beyond these, the part may be damaged. They are not targets: stay well below them.
- Recommended operating conditions. The range the part is designed to work in.
- Electrical characteristics. What the part actually does, as minimum, typical and maximum values, each under stated test conditions.
Here is an example of the key lines for a small NPN transistor. These are round numbers for teaching, not the figures of any particular part:
| Parameter | Symbol | Min | Typ | Max | Unit |
|---|---|---|---|---|---|
| Collector-emitter voltage | VCEO | - | - | 40 | V |
| Collector current | IC | - | - | 200 | mA |
| Power | PD | - | - | 500 | mW |
| Current gain, at 100 mA | hFE | 50 | 150 | - | - |
| Voltage when fully on, at 100 mA | VCE(sat) | - | - | 0.3 | V |
| Base-emitter voltage when fully on | VBE(sat) | - | - | 0.95 | V |
Designing with the worst case
The typical gain is 150, but some parts will only reach 50. A design must work with every part it might get, so it uses the worst figures:
the load wants (12 V - 0.3 V) / 117 Ω = 100 mA
with a gain of only 50, the base needs at least 100 mA / 50 = 2 mA
twice that for safety: 4 mA, so RB = (3.3 V - 0.95 V) / 4 mA = 588 Ω; the E12 value below is 560 Ω
circuit worst-case: base current 4.2 mA; Q1 fully on; load current 100 mA; Q1 turns 30 mW into heat
Rounding RB down gives a little more base current, which is the safe way. Every figure is inside the datasheet's limits: 100 mA of the allowed 200 mA, and 30 mW of the allowed 500 mW. A typical part works too, of course:
with a typical part instead - gain 150, 0.7 V and 0.2 V - Q1 is fully on and the load gets 101 mA
Designing with typical values. The circuit works on the bench, with the parts you happened to test, and then fails on some of the thousands made. Minimum and maximum values are there to be used.
A datasheet gives a transistor's gain as minimum 50, typical 150. Which figure should a switch design use?
Show the answer
Answer: A. The design has to work with the worst part it might be given. With a gain of 50, the base needs three times as much current as with 150, so design for 50.
8.3 The multimeter
A multimeter measures volts, amps and ohms, and its datasheet says how accurately. Every meter also changes what it measures a little: a voltmeter by drawing current, and an ammeter by adding resistance.
Modes
Volume 01 introduced the three basic modes. Most meters add a few more. One measures alternating voltage. A continuity test beeps when two points are joined. A diode test pushes a small current through a diode and shows its forward voltage.
How accurate?
A meter's accuracy is given as a percentage of the reading plus a number of digits in the last place:
reading 4.700 V at +/-(0.5% + 2 digits): +/-0.0255 V, so the true value is between 4.6745 V and 4.7255 V
So the last digit of a display is not a promise. A reading of 4.700 V means "somewhere near 4.7 V".
The ammeter's own resistance
To measure current, a meter passes it through a small resistance inside and measures the voltage across it. That resistance adds to the loop:
circuit burden: an ideal ammeter would read 20 mA
a meter with 1 Ω inside reads 19.9 mA
a meter with 10 Ω inside reads 18.8 mA
Low-current ranges use bigger internal resistances, so switch to the highest range that still gives a useful reading. Volume 01 showed the voltmeter's version of the same effect.
A meter reads 3.300 V with an accuracy of ±(1% + 3 digits), in steps of 0.001 V. How far might the true value be from the reading?
Show the answer
Answer: C. 1% of 3.300 V is 0.033 V, and 3 digits of 0.001 V add 0.003 V: 0.036 V in all.
8.4 The oscilloscope and the logic analyser
An oscilloscope draws a voltage against time, so you can see a signal change. A logic analyser records many digital signals as 1s and 0s, and can decode the messages they carry.
The oscilloscope
An oscilloscope, or scope, draws a graph of voltage (up the screen) against time (across it). Its screen is marked in divisions. Two knobs set the scales: volts per division, and time per division. A trigger holds the picture still, by starting each sweep at the same point of the signal, such as each rising edge.
Here is a trace like one on a scope's screen:
one cycle lasts 1 ms, so the frequency is 1 / 1 ms = 1 kHz; high for 0.25 ms of each 1 ms: duty cycle 25%
Probes
A scope connects to the circuit through a probe. A 10x probe hides a resistor that divides the signal by ten, so it disturbs the circuit less:
circuit probe: the scope input sees 500 mV - a tenth - and the scope shows it ten times bigger: 5 V
a 1 kΩ source driving a 10x probe of about 15 pF: time constant 15 ns
a 1 kΩ source driving a 1x probe of about 100 pF: time constant 100 ns
The probe's cable and input have capacitance, and Volume 03 showed what capacitance does to a fast edge. A 10x probe adds far less, so it shows fast edges more truthfully. Use it by default.
The logic analyser
A logic analyser has many channels, often 8 or 16. It records each one only as 1 or 0, many millions of times a second. It cannot show voltages, but it can follow a whole digital conversation between chips. Here is what it shows when a microcontroller sends the letter A on a serial line:
the letter A is code 65 = 01000001 in binary; sent lowest bit first: 1 0 0 0 0 0 1 0
at 9600 bits per second, one bit lasts 104 µs and the whole 10-bit frame 1.04 ms
Good analysers decode this automatically and print the letter. The analyser must sample fast enough to see every change:
sampling at 24 MHz, a 4 MHz clock is seen 6 times per cycle
sampling at 24 MHz, a 16 MHz clock is seen 1.5 times per cycle
Four or more samples per cycle is a sensible minimum. At 1.5, the recording cannot be trusted. Embedded C from Zero uses these serial links.
A scope shows a square wave whose rising edges are 2 divisions apart, at 500 µs per division. What is its frequency?
Show the answer
Answer: B. The period is 2 × 500 µs = 1 ms, and the frequency is 1 / 1 ms = 1 kHz.
8.5 Your first build on a breadboard
A breadboard lets you build a circuit without soldering. Build it from the schematic one part at a time, check it with a multimeter against the numbers you expect, and a fault has nowhere to hide.
The breadboard
A breadboard is a plastic block full of holes, with metal clips inside. In the main area, each short row of five holes is joined underneath, so parts pushed into the same row are connected. A gap runs down the middle, and chips sit across it, so each pin gets its own row. Long strips along the edges are the power rails, for the supply and ground.
What you need
A 9 V battery and clip, a push button, an NPN transistor such as a general-purpose small-signal type, a red LED, and resistors of 10 kΩ, 100 kΩ and 390 Ω. Plus a few wires and a multimeter. Nothing here is dangerous, but disconnect the battery while you change anything.
Building it
Build the circuit of Figure 8.1:
- Power rails. Clip the battery's + lead to one edge rail and its - lead to the other. Leave it unplugged for now.
- The LED and R3. R3 from the + rail to a free row; the LED from that row to another, long lead (the anode) towards R3.
- The transistor. Check its datasheet for which pin is which. Collector to the LED's cathode row; emitter to the - rail.
- The base. R1 from the base's row to a new row. R2 from that new row to the - rail. The button from that same row to the + rail.
- Check, then power up. Compare every connection with the schematic, then connect the battery.
What you should measure
The solver worked out what your meter should read, with the button released and pressed:
| Measure | Button released | Button pressed |
|---|---|---|
| Across the battery | 9 V | 9 V |
| R1, left end to ground | 0 V | 9 V |
| Q1 base to ground | 0 V | 700 mV |
| Across R3 | 0 V | 6.8 V |
| LED current | 0 A | 17.4 mA |
| Battery current | 0 A | 18.4 mA |
released: no current flows through the LED, so Q1's collector floats, anywhere up to 9 V - 2 V = 7 V
pressed: base current 830 µA, far more than the 174 µA the LED current needs
Your readings will not match exactly: the resistors have a tolerance, a real battery sags, and your LED's forward voltage will not be exactly 2 V. But they should be close. A reading far away points straight at the fault. A fresh battery may even read a little above 9 V.
When it does not work
- Nothing lights. Check the battery voltage, then that the LED is the right way round.
- The LED is always on. The button may be in the wrong rows, or the transistor's pins swapped.
- Still nothing. Measure the base voltage with the button pressed. About 0.7 V means the base circuit works, so look at the collector side. 0 V means look at the button and R1.
Measure, do not guess. Every reading either matches what the circuit should do, or tells you where it does not.
With the button pressed, the base reads 0.7 V but the LED stays dark. Where is the fault most likely to be?
Show the answer
Answer: C. 0.7 V at the base shows that current is flowing into it, so the button, R1 and the battery are working. The fault is in the path the transistor should switch: R3, the LED (perhaps backwards) or the collector.
What you learned
- Schematics use reference designators, power and ground symbols, and dots for joins; 4k7 means 4.7 kΩ.
- Read a circuit by finding the supply, the load, the switch and what controls it.
- A datasheet's absolute maximum ratings are limits; design with its minimum and maximum values.
- A multimeter's accuracy is a percentage plus digits, and its ammeter adds a little resistance.
- A scope shows voltage against time; a 10x probe disturbs the circuit less.
- A logic analyser records many digital signals and can decode messages such as serial bytes.
- On a breadboard, build step by step and compare every measurement with what you expect.
Key words from this volume
Every word below has a plain-English entry in the glossary.
Practice
Compact values
What are 6k8, 47R and 3n3?
Show the solution
6k8 = 6.8 kΩ
47R = 47 Ω
3n3 = 3.3 nF
Sample fast enough
A logic analyser samples at 24 MHz. Can it record an 8 MHz clock reliably?
Show the solution
sampling at 24 MHz, an 8 MHz clock is seen 3 times per cycle
Only 3 samples per cycle - below the sensible minimum of four. Use a faster analyser.
A dimmer LED
In the first build, R3 is changed to 680 Ω. What LED current flows with the button pressed?
Show the solution
with R3 = 680 Ω, pressed: LED current 10 mA
Interview corner
Debugging a board
"A board you built doesn't work. How do you go about finding the fault?"
Show the solution
"First the basics: is it powered, and is the supply at the right voltage at the chips' pins, not just at the connector? Then I split the problem in half. I find a point in the middle of the signal path and measure it against what it should be, which tells me which half the fault is in. I repeat until I'm down to one part or one connection. Throughout, I compare measurements with what the design says they should be. I use a multimeter for steady voltages, a scope for anything that changes, and a logic analyser for digital buses. And I check the simple things before the clever ones: backwards parts, wrong values, and connections that aren't made."
That completes Electronics from Zero. From here, Digital Logic from Zero builds with the gates you now know how to make. Embedded C from Zero puts a microcontroller in charge of circuits like the one you built.