Sunteți pe pagina 1din 98

Transistors - learn.sparkfun.

com

1 of 28

https://learn.sparkfun.com/tutorials/transistors

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

Transistors
C ON TR IBU TO R S:

JI MB0

S H A RE

Sections

Introduction

Introduction

Transistors make our electronics world go round. Theyre critical as a


control source in just about every modern circuit. Sometimes you see them,
but more-often-than-not theyre hidden deep within the die of an integrated
circuit. In this tutorial well introduce you to the basics of the most common
transistor around: the bi-polar junction transistor (BJT).

Symbols, Pins, and


Construction
Extending the Water Analogy
Operation Modes
Applications I: Switches
Applications II: Amplifiers
Resources and Going Further
Comments

View Paginated
Print

Tags
In small, discrete quantities, transistors can be used to create simple
electronic switches, digital logic, and signal amplifying circuits. In quantities
of thousands, millions, and even billions, transistors are interconnected and
embedded into tiny chips to create computer memories, microprocessors,
and other complex ICs.

Covered In This Tutorial

E L E CTRI C A L E N GI N E E RI N G
TE CH N OL OGY

License
tutorials are CC BY-NC-SA 3.0

After reading through this tutorial, we want you to have a broad


understanding of how transistors work. We wont dig too deeply into
semiconductor physics or equivalent models, but well get deep enough into
the subject that youll understand how a transistor can be used as either a
switch or amplifier.
This tutorial is split into a series of sections, covering:
Symbols, Pins, and Construction Explaining the differences
between the transistors three pins.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

2 of 28

https://learn.sparkfun.com/tutorials/transistors

Extending the Water Analogy Going back to the water analogy to


explain how a transistor acts like a valve.
Operation Modes An overview of the four possible operating modes
of a transistor.
Applications I: Switches Application circuits showing how
transistors are used as electronically controlled switches.
Applications II: Amplifiers More application circuits, this time
showing how transistors are used to amplify voltage or current.
There are two types of basic transistor out there: bi-polar junction (BJT) and
metal-oxide field-effect (MOSFET). In this tutorial well focus on the BJT,
because its slightly easier to understand. Digging even deeper into
transistor types, there are actually two versions of the BJT: NPN and PNP.
Well turn our focus even sharper by limiting our early discussion to the
NPN. By narrowing our focus down getting a solid understanding of the
NPN itll be easier to understand the PNP (or MOSFETS, even) by
comparing how it differs from the NPN.

Suggested Reading
Before digging into this tutorial, wed highly recommend giving these
tutorials a look-through:
Voltage, Current, Resistance, and Ohms Law An introduction to the
fundamentals of electronics.
Electricity Basics Well talk a bit about electricity as the flow of
electrons. Find out how those electrons flow in this tutorial.
Electric Power One of the transistors main applications is
amplifying increasing the power of a signal. Increasing power
means we can increase either current or voltage, find out why in this
tutorial.
Diodes A transistor is a semiconductor device, just like a diode. In
a way, its what youd get if you stacked two diodes together, and tied
their anodes together. Understanding how a diode works will go a
long way towards uncovering the operation of a transistor.

Symbols, Pins, and Construction


Transistors are fundamentally three-terminal devices. On a bi-polar junction
transistor (BJT), those pins are labeled collector (C), base (B), and
emitter (E). The circuit symbols for both the NPN and PNP BJT are below:

The only difference between an NPN and PNP is the direction of the arrow
on the emitter. The arrow on an NPN points out, and on the PNP it points in.
A useful mnemonic for remembering which is which is:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

3 of 28

https://learn.sparkfun.com/tutorials/transistors

NPN: Not Pointing iN


Backwards logic, but it works!

Transistor Construction
Transistors rely on semiconductors to work their magic. A semiconductor is
a material thats not quite a pure conductor (like copper wire) but also not
an insulator (like air). The conductivity of a semiconductor how easily it
allows electrons to flow depends on variables like temperature or the
presence of more or less electrons. Lets look briefly under the hood of a
transistor. Dont worry, we wont dig too deeply into quantum physics.

A Transistor as Two Diodes


Transistors are kind of like an extension of another semiconductor
component: diodes. In a way transistors are just two diodes with their
cathodes (or anodes) tied together:

The diode connecting base to emitter is the important one here; it matches
the direction of the arrow on the schematic symbol, and shows you which
way current is intended to flow through the transistor.
The diode representation is a good place to start, but its far from accurate.
Dont base your understanding of a transistors operation on that model
(and definitely dont try to replicate it on a breadboard, it wont work).
Theres a whole lot of weird quantum physics level stuff controlling the
interactions between the three terminals.
(This model is useful if you need to test a transistor. Using the diode (or
resistance) test function on a multimeter, you can measure across the BE
and BC terminals to check for the presence of those diodes.)

Transistor Structure and Operation


Transistors are built by stacking three different layers of semiconductor
material together. Some of those layers have extra electrons added to them
(a process called doping), and others have electrons removed (doped with
holes the absence of electrons). A semiconductor material with extra
electrons is called an n-type (n for negative because electrons have a
negative charge) and a material with electrons removed is called a p-type
(for positive). Transistors are created by either stacking an n on top of a p
on top of an n, or p over n over p.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

4 of 28

https://learn.sparkfun.com/tutorials/transistors

Simplified diagram of the structure of an NPN. Notice the origin of any


acronyms?
With some hand waving, we can say electrons can easily flow from n
regions to p regions, as long as they have a little force (voltage) to push
them. But flowing from a p region to an n region is really hard (requires a lot
of voltage). But the special thing about a transistor the part that makes
our two-diode model obsolete is the fact that electrons can easily flow
from the p-type base to the n-type collector as long as the
base-emitter junction is forward biased (meaning the base is at a higher
voltage than the emitter).

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

5 of 28

https://learn.sparkfun.com/tutorials/transistors

The NPN transistor is designed to pass electrons from the emitter to the
collector (so conventional current flows from collector to emitter). The
emitter emits electrons into the base, which controls the number of
electrons the emitter emits. Most of the electrons emitted are collected by
the collector, which sends them along to the next part of the circuit.
A PNP works in a same but opposite fashion. The base still controls current
flow, but that current flows in the opposite direction from emitter to
collector. Instead of electrons, the emitter emits holes (a conceptual
absence of electrons) which are collected by the collector.

The transistor is kind of like an electron valve. The base pin is like a
handle you might adjust to allow more or less electrons to flow from emitter
to collector. Lets investigate this analogy further

Extending the Water Analogy


If youve been reading a lot of electricity concept tutorials lately, youre
probably used to water analogies. We say that current is analogous to the
flow rate of water, voltage is the pressure pushing that water through a
pipe, and resistance is the width of the pipe.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

6 of 28

https://learn.sparkfun.com/tutorials/transistors

Unsurprisingly, the water analogy can be extended to transistors as well: a


transistor is like a water valve a mechanism we can use to control the
flow rate.
There are three states we can use a valve in, each of which has a different
effect on the flow rate in a system.

1) On Short Circuit
A valve can be completely opened, allowing water to flow freely passing
through as if the valve wasnt even present.

Likewise, under the right circumstances, a transistor can look like a short
circuit between the collector and emitter pins. Current is free to flow
through the collector, and out the emitter.

2) Off Open Circuit


When its closed, a valve can completely stop the flow of water.

In the same way, a transistor can be used to create an open circuit


between the collector and emitter pins.

3) Linear Flow Control


With some precise tuning, a valve can be adjusted to finely control the
flow rate to some point between fully open and closed.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

7 of 28

https://learn.sparkfun.com/tutorials/transistors

A transistor can do the same thing linearly controlling the current


through a circuit at some point between fully off (an open circuit) and fully
on (a short circuit).
From our water analogy, the width of a pipe is similar to the resistance in a
circuit. If a valve can finely adjust the width of a pipe, then a transistor can
finely adjust the resistance between collector and emitter. So, in a way, a
transistor is like a variable, adjustable resistor.

Amplifying Power
Theres another analogy we can wrench into this. Imagine if, with the slight
turn of a valve, you could control the flow rate of the Hoover Dams flow
gates. The measly amount of force you might put into twisting that knob has
the potential to create a force thousands of times stronger. Were
stretching the analogy to its limits, but this idea carries over to transistors
too. Transistors are special because they can amplify electrical signals,
turning a low-power signal into a similar signal of much higher power.

Kind of. Theres a lot more to it, but thats a good place to start! Check out
the next section for a more detailed explanation of the operation of a
transistor.

Operation Modes
Unlike resistors, which enforce a linear relationship between voltage and
current, transistors are non-linear devices. They have four distinct modes
of operation, which describe the current flowing through them. (When we
talk about current flow through a transistor, we usually mean current
flowing from collector to emitter of an NPN.)
The four transistor operation modes are:
Saturation The transistor acts like a short circuit. Current freely
flows from collector to emitter.
Cut-off The transistor acts like an open circuit. No current flows
from collector to emitter.
Active The current from collector to emitter is proportional to the
current flowing into the base.
Reverse-Active Like active mode, the current is proportional to
the base current, but it flows in reverse. Current flows from emitter to
collector (not, exactly, the purpose transistors were designed for).
To determine which mode a transistor is in, we need to look at the voltages
on each of the three pins, and how they relate to each other. The voltages
from base to emitter (VBE), and the from base to collector (VBC) set the
transistors mode:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

8 of 28

https://learn.sparkfun.com/tutorials/transistors

The simplified quadrant graph above shows how positive and negative
voltages at those terminals affect the mode. In reality its a bit more
complicated than that.
Lets look at all four transistor modes individually; well investigate how to
put the device into that mode, and what effect it has on current flow.
Note: The majority of this page focuses on NPN transistors. To understand
how a PNP transistor works, simply flip the polarity or > and < signs.

Saturation Mode
Saturation is the on mode of a transistor. A transistor in saturation mode
acts like a short circuit between collector and emitter.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

9 of 28

https://learn.sparkfun.com/tutorials/transistors

In saturation mode both of the diodes in the transistor are forward biased.
That means VBE must be greater than 0, and so must VBC. In other words,
VB must be higher than both VE and VC.

Because the junction from base to emitter looks just like a diode, in reality,
VBE must be greater than a threshold voltage to enter saturation. There
are many abbreviations for this voltage drop Vth, V, and Vd are a few
and the actual value varies between transistors (and even further by
temperature). For a lot of transistors (at room temperature) we can
estimate this drop to be about 0.6V.
Another reality bummer: there wont be perfect conduction between emitter
and collector. A small voltage drop will form between those nodes.
Transistor datasheets will define this voltage as CE saturation voltage
VCE(sat) a voltage from collector to emitter required for saturation. This
value is usually around 0.05-0.2V. This value means that VC must be slightly
greater than VE (but both still less than VB) to get the transistor in saturation
mode.

Cutoff Mode
Cutoff mode is the opposite of saturation. A transistor in cutoff mode is off
there is no collector current, and therefore no emitter current. It almost
looks like an open circuit.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

10 of 28

https://learn.sparkfun.com/tutorials/transistors

To get a transistor into cutoff mode, the base voltage must be less than
both the emitter and collector voltages. VBC and VBE must both be negative.

In reality, VBE can be anywhere between 0V and Vth (~0.6V) to achieve


cutoff mode.

Active Mode
To operate in active mode, a transistors VBE must be greater than zero and
VBC must be negative. Thus, the base voltage must be less than the
collector, but greater than the emitter. That also means the collector must
be greater than the emitter.

In reality, we need a non-zero forward voltage drop (abbreviated either


Vth, V, or Vd) from base to emitter (VBE) to turn on the transistor. Usually
this voltage is usually around 0.6V.
Amplifying in Active Mode
Active mode is the most powerful mode of the transistor because it turns
the device into an amplifier. Current going into the base pin amplifies
current going into the collector and out the emitter.
Our shorthand notation for the gain (amplification factor) of a transistor is
(you may also see it as F, or hFE). linearly relates the collector current
(IC) to the base current (IB):

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

11 of 28

https://learn.sparkfun.com/tutorials/transistors

The actual value of varies by transistor. Its usually around 100, but can
range from 50 to 200even 2000, depending on which transistor youre
using and how much current is running through it. If your transistor had a
of 100, for example, thatd mean an input current of 1mA into the base could
produce 100mA current through the collector.

Active mode model. VBE = Vth, and IC = IB.


What about the emitter current, IE? In active mode, the collector and base
currents go into the device, and the IE comes out. To relate the emitter
current to collector current, we have another constant value: . is the
common-base current gain, it relates those currents as such:

is usually very close to, but less than, 1. That means IC is very close to,
but less than IE in active mode.
You can use to calculate , or vice-versa:

If is 100, for example, that means is 0.99. So, if IC is 100mA, for


example, then IE is 101mA.

Reverse Active
Just as saturation is the opposite of cutoff, reverse active mode is the
opposite of active mode. A transistor in reverse active mode conducts,
even amplifies, but current flows in the opposite direction, from emitter to
collector. The downside to reverse active mode is the (R in this case) is

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

12 of 28

https://learn.sparkfun.com/tutorials/transistors

much smaller.
To put a transistor in reverse active mode, the emitter voltage must be
greater than the base, which must be greater than the collector (VBE<0 and
VBC>0).

Reverse active mode isnt usually a state in which you want to drive a
transistor. Its good to know its there, but its rarely designed into an
application.

Relating to the PNP


After everything weve talked about on this page, weve still only covered
half of the BJT spectrum. What about PNP transistors? PNPs work a lot
like the NPNs they have the same four modes but everything is turned
around. To find out which mode a PNP transistor is in, reverse all of the <
and > signs.
For example, to put a PNP into saturation VC and VE must be higher than
VB. You pull the base low to turn the PNP on, and make it higher than the
collector and emitter to turn it off. And, to put a PNP into active mode, VE
must be at a higher voltage than VB, which must be higher than VC.
In summary:
Voltage relationsNPN ModePNP Mode
VE < VB < VC
VE < VB > VC
VE > VB < VC
VE > VB > VC

Active
Reverse
Saturation Cutoff
Cutoff Saturation
Reverse

Active

Another opposing characteristic of the NPNs and PNPs is the direction of


current flow. In active and saturation modes, current in a PNP flows from
emitter to collector. This means the emitter must generally be at a higher
voltage than the collector.

If youre burnt out on conceptual stuff, take a trip to the next section. The
best way to learn how a transistor works is to examine it in real-life circuits.
Lets look at some applications!

Applications I: Switches
One of the most fundamental applications of a transistor is using it to
control the flow of power to another part of the circuit using it as an
electric switch. Driving it in either cutoff or saturation mode, the transistor
can create the binary on/off effect of a switch.
Transistor switches are critical circuit-building blocks; theyre used to make
logic gates, which go on to create microcontrollers, microprocessors, and
other integrated circuits. Below are a few example circuits.

Transistor Switch
Lets look at the most fundamental transistor-switch circuit: an NPN switch.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

13 of 28

https://learn.sparkfun.com/tutorials/transistors

Here we use an NPN to control a high-power LED:

Our control input flows into the base, the output is tied to the collector, and
the emitter is kept at a fixed voltage.
While a normal switch would require an actuator to be physically flipped,
this switch is controlled by the voltage at the base pin. A microcontroller I/O
pin, like those on an Arduino, can be programmed to go high or low to turn
the LED on or off.
When the voltage at the base is greater than 0.6V (or whatever your
transistors Vth might be), the transistor starts saturating and looks like a
short circuit between collector and emitter. When the voltage at the base is
less than 0.6V the transistor is in cutoff mode no current flows because it
looks like an open circuit between C and E.
The circuit above is called a low-side switch, because the switch our
transistor is on the low (ground) side of the circuit. Alternatively, we can
use a PNP transistor to create a high-side switch:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

14 of 28

https://learn.sparkfun.com/tutorials/transistors

Similar to the NPN circuit, the base is our input, and the emitter is tied to a
constant voltage. This time however, the emitter is tied high, and the load is
connected to the transistor on the ground side.
This circuit works just as well as the NPN-based switch, but theres one
huge difference: to turn the load on the base must be low. This can cause
complications, especially if the loads high voltage (VCC in this picture) is
higher than our control inputs high voltage. For example, this circuit
wouldnt work if you were trying to use a 5V-operating Arduino to switch on
a 12V motor. In that case itd be impossible to turn the switch off because
VB would always be less than VE.

Base Resistors!
Youll notice that each of those circuits uses a series resistor between the
control input and the base of the transistor. Dont forget to add this resistor!
A transistor without a resistor on the base is like an LED with no currentlimiting resistor.
Recall that, in a way, a transistor is just a pair of interconnected diodes.
Were forward-biasing the base-emitter diode to turn the load on. The diode
only needs 0.6V to turn on, more voltage than that means more current.
Some transistors may only be rated for a maximum of 10-100mA of current
to flow through them. If you supply a current over the maximum rating, the
transistor might blow up.
The series resistor between our control source and the base limits current
into the base. The base-emitter node can get its happy voltage drop of
0.6V, and the resistor can drop the remaining voltage. The value of the
resistor, and voltage across it, will set the current.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

15 of 28

https://learn.sparkfun.com/tutorials/transistors

The resistor needs to be large enough to effectively limit the current, but
small enough to feed the base enough current. 1mA to 10mA will usually be
enough, but check your transistors datasheet to make sure.

Digital Logic
Transistors can be combined to create all our fundamental logic gates:
AND, OR, and NOT.
(Note: These days MOSFETS are more likely to be used to create logic
gates than BJTs. MOSFETs are more power-efficient, which makes them
the better choice.)

Inverter
Heres a transistor circuit that implements an inverter, or NOT gate:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

16 of 28

https://learn.sparkfun.com/tutorials/transistors

An inverter built out of transistors.


Here a high voltage into the base will turn the transistor on, which will
effectively connect the collector to the emitter. Since the emitter is
connected directly to ground, the collector will be as well (though it will be
slightly higher, somewhere around VCE(sat) ~ 0.05-0.2V). If the input is low,
on the other hand, the transistor looks like an open circuit, and the output is
pulled up to VCC
(This is actually a fundamental transistor configuration called common
emitter. More on that later.)

AND Gate
Here are a pair of transistors used to create a 2-input AND gate:

2-input AND gate built out of transistors.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

17 of 28

https://learn.sparkfun.com/tutorials/transistors

If either transistor is turned off, then the output at the second transistors
collector will be pulled low. If both transistors are on (bases both high),
then the output of the circuit is also high.

OR Gate
And, finally, heres a 2-input OR gate:

2-input OR gate built out of transistors.


In this circuit, if either (or both) A or B are high, that respective transistor
will turn on, and pull the output high. If both transistors are off, then the
output is pulled low through the resistor.

H-Bridge
An H-bridge is a transistor-based circuit capable of driving motors both
clockwise and counter-clockwise. Its an incredibly popular circuit the
driving force behind countless robots that must be able to move both
forward and backward.
Fundamentally, an H-bridge is a combination of four transistors with two
inputs lines and two outputs:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

18 of 28

https://learn.sparkfun.com/tutorials/transistors

Can you guess why its called an H bridge?


(Note: theres usually quite a bit more to a well-designed H-bridge including
flyback diodes, base resistors and Schmidt triggers.)
If both inputs are the same voltage, the outputs to the motor will be the
same voltage, and the motor wont be able to spin. But if the two inputs are
opposite, the motor will spin in one direction or the other.
The H-bridge has a truth table that looks a little like this:
Input AInput BOutput AOutput BMotor Direction
0
0

0
1

1
1

1
0

Stopped (braking)
Clockwise

1
1

0
1

0
0

1
0

Counter-clockwise
Stopped (braking)

Oscillators
An oscillator is a circuit that produces a periodic signal that swings between
a high and low voltage. Oscillators are used in all sorts of circuits: from
simply blinking an LED to the producing a clock signal to drive a
microcontroller. There are lots of ways to create an oscillator circuit
including quartz crystals, op amps, and, of course, transistors.
Heres an example oscillating circuit, which we call an astable
multivibrator. By using feedback we can use a pair of transistors to
create two complementing, oscillating signals.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

19 of 28

https://learn.sparkfun.com/tutorials/transistors

Aside from the two transistors, the capacitors are the real key to this
circuit. The caps alternatively charge and discharge, which causes the two
transistors to alternatively turn on and off.
Analyzing this circuits operation is an excellent study in the operation of
both caps and transistors. To begin, assume C1 is fully charged (storing a
voltage of about VCC), C2 is discharged, Q1 is on, and Q2 is off. Heres
what happens after that:
If Q1 is on, then C1s left plate (on the schematic) is connected to
about 0V. This will allow C1 to discharge through Q1s collector.
While C1 is discharging, C2 quickly charges through the lower value
resistor R4.
Once C1 fully discharges, its right plate will be pulled up to about
0.6V, which will turn on Q2.
At this point weve swapped states: C1 is discharged, C2 is charged,
Q1 is off, and Q2 is on. Now we do the same dance the other way.
Q2 being on allows C2 to discharge through Q2s collector.
While Q1 is off, C1 can charge, relatively quickly through R1.
Once C2 fully discharges, Q1 will be turn back on and were back in
the state we started in.
It can be hard to wrap your head around. You can find another excellent
demo of this circuit here.
By picking specific values for C1, C2, R2, and R3 (and keeping R1 and R4
relatively low), we can set the speed of our multivibrator circuit:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

20 of 28

https://learn.sparkfun.com/tutorials/transistors

So, with the values for caps and resistors set to 10F and 47k
respectively, our oscillator frequency is about 1.5 Hz. That means each
LED will blink about 1.5 times per second.

As you can probably already see, there are tons of circuits out there that
make use of transistors. But weve barely scratched the surface. These
examples mostly show how the transistor can be used in saturation and
cut-off modes as a switch, but what about amplification? Time for more
examples!

Applications II: Amplifiers


Some of the most powerful transistor applications involve amplification:
turning a low power signal into one of higher power. Amplifiers can increase
the voltage of a signal, taking something from the V range and converting it
to a more useful mV or V level. Or they can amplify current, useful for
turning the A of current produced by a photodiode into a current of much
higher magnitude. There are even amplifiers that take a current in, and
produce a higher voltage, or vice-versa (called transresistance and
transconductance respectively).
Transistors are a key component to many amplifying circuits. There are a
seemingly infinite variety of transistor amplifiers out there, but fortunately a
lot of them are based on some of these more primitive circuits. Remember
these circuits, and, hopefully, with a bit of pattern-matching, you can make
sense of more complex amplifiers.

Common Configurations
Three of the most fundamental transistor amplifiers are: common emitter,
common collector and common base. In each of the three configurations
one of the three nodes is permanently tied to a common voltage (usually
ground), and the other two nodes are either an input or output of the
amplifier.

Common Emitter
Common emitter is one of the more popular transistor arrangements. In this
circuit the emitter is tied to a voltage common to both the base and emitter
(usually ground). The base becomes the signal input, and the collector
becomes the output.

The common emitter circuit is popular because its well-suited for voltage
amplification, especially at low frequencies. Theyre great for amplifying
audio signals, for example. If you have a small 1.5V peak-to-peak input

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

21 of 28

https://learn.sparkfun.com/tutorials/transistors

signal, you could amplify that to a much higher voltage using a slightly more
complicated circuit, like:

One quirk of the common emitter, though, is that it inverts the input signal
(compare it to the inverter from the last page!).

Common Collector (Emitter Follower)


If we tie the collector pin to a common voltage, use the base as an input,
and the emitter as an output, we have a common collector. This
configuration is also known as an emitter follower.

The common collector doesnt do any voltage amplification (in fact, the
voltage out will be 0.6V lower than the voltage in). For that reason, this
circuit is sometimes called a voltage follower.
This circuit does have great potential as a current amplifier. In addition to
that, the high current gain combined with near unity voltage gain makes this
circuit a great voltage buffer. A voltage buffer prevents a load circuit from
undesirably interfering with the circuit driving it.
For example, if you wanted to deliver 1V to a load, you could go the easy
way and use a voltage divider, or you could use an emitter follower.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

22 of 28

https://learn.sparkfun.com/tutorials/transistors

As the load gets larger (which, conversely, means the resistance is lower)
the output of the voltage divider circuit drops. But the voltage output of the
emitter follower remains steady, regardless of what the load is. Bigger loads
cant load down an emitter follower, like they can circuits with larger output
impedances.

Common Base
Well talk about common base to provide some closure to this section, but
this is the least popular of the three fundamental configurations. In a
common base amplifier, the emitter is an input and the collector an output.
The base is common to both.

Common base is like the anti-emitter-follower. Its a decent voltage


amplifier, and current in is about equal to current out (actually current in is
slightly greater than current out).
The common base circuit works best as a current buffer. It can take an
input current at a low input impedance, and deliver nearly that same current
to a higher impedance output.

In Summary
These three amplifier configurations are at the heart of many more
complicated transistor amplifiers. They each have applications where they
shine, whether theyre amplifying current, voltage, or buffering.

Voltage Gain
Current Gain
Input Impedance
Output Impedance

Common EmitterCommon CollectorCommon Base


Medium
Low
High
Medium
High
Low
Medium
Medium

High
Low

Low
High

Multistage Amplifiers
We could go on and on about the great variety of transistor amplifiers out
there. Here are a few quick examples to show off what happens when you
combine the single-stage amplifiers above:

Darlington
The Darlington amplifier runs one common collector into another to create a
high current gain amplifier.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

23 of 28

https://learn.sparkfun.com/tutorials/transistors

Voltage out is about the same as voltage in (minus about 1.2V-1.4V), but
the current gain is the product of two transistor gains. Thats 2, upwards of
1000!
The Darlington pair is a great tool if you need to drive a large load with a
very small input current.

Differential Amplifier
A differential amplifier subtracts two input signals and amplifies that
difference. Its a critical part of feedback circuits, where the input is
compared against the output, to produce a future output.
Heres the foundation of the differential amp:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

24 of 28

https://learn.sparkfun.com/tutorials/transistors

This circuit is also called a long tailed pair. Its a pair of common-emitter
circuits that are compared against each other to produce a differential
output. Two inputs are applied to the bases of the transistors; the output is
a differential voltage across the two collectors.

Push-Pull Amplifier
A push-pull amplifier is a useful final stage in many multi-stage amplifiers.
Its an energy efficient power amplifier, often used to drive loudspeakers.
The fundamental push-pull amp uses an NPN and PNP transistor, both
configured as common collectors:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

25 of 28

https://learn.sparkfun.com/tutorials/transistors

The push-pull amp doesnt really amplify voltage (voltage out will be slightly
less than that in), but it does amplify current. Its especially useful in bi-polar
circuits (those with positive and negative supplies), because it can both
push current into the load from the positive supply, and pull current out
and sink it into the negative supply.
If you have a bi-polar supply (or even if you dont), the push-pull is a great
final stage to an amplifier, acting as a buffer for the load.

Putting Them Together (An Operational


Amplifier)
Lets look at a classic example of a multi-stage transistor circuit: an Op
Amp. Being able to recognize common transistor circuits, and understanding
their purpose can get you a long way! Here is the circuit inside an LM3558,
a really simple op amp:

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

26 of 28

https://learn.sparkfun.com/tutorials/transistors

The internals of an LM358 operational amplifier. Recognize some


amplifiers?
Theres certainly more complexity here than you may be prepared to digest,
however you might see some familiar topologies:
Q1, Q2, Q3, and Q4 form the input stage. Looks a lot like an
common collector (Q1 and Q4) into a differential amplifier, right?
It just looks upside down, because its using PNPs. These
transistors help to form the input differential stage of the amplifier.
Q11 and Q12 are part of the second stage. Q11 is a common
collector and Q12 is a common emitter. This pair of transistors will
buffer the signal from Q3s collector, and provide a high gain as the
signal goes to the final stage.
Q6 and Q13 are part of the final stage, and they should look familiar
as well (especially if you ignore RSC) its a push-pull! This stage
buffers the output, allowing it to drive larger loads.
There are a variety of other common configurations in there that we
havent talked about. Q8 and Q9 are configured as a current mirror,
which simply copies the amount of current through one transistor into
the other.
After this crash course in transistors, we wouldnt expect you to understand
whats going on in this circuit, but if you can begin to identify common
transistor circuits youre on the right track!

Resources and Going Further


If youre looking to get deeper into transistors, here are some resources
wed recommend:
Getting Started in Electronics by Forrest Mims Mims is a master of
explaining electronics in an easy-to-understand highly applicable
manner. Definitely check this book out if you want a more in-depth
introduction to transistors.
LTSpice and Falstad Circuit These are free software tools you can
use to simulate circuits. Digitally experimenting with circuits is a great
way to learn. You get all of the experimentation, without the pain of
breadboarding or fear of blowing stuff up. Try putting together some
of the stuff weve talked about!

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

27 of 28

https://learn.sparkfun.com/tutorials/transistors

2N3904 Datasheet Another way to learn about transistors is to dig


into their datasheet. The 2N3904 is a really common transistor that
we use all the time (and the 2N3906 is its PNP sibling). Check out the
datasheet, see if you recognize any familiar characteristics.
On top of that, our very own Director of Engineering, Pete, has produced a
series of According to Pete videos with a focus on transistors and
transistor amplifiers. Definitely check out his Diodes and Transistors video:

Then you can move on to: Transistor Biasing Configurations Part 1 and
Part 2, and finally Current Mirrors. Great stuff!

Going Further
Or, if youre itching to learn more about electronics in general, check out
some of these SparkFun tutorials:
Integrated Circuits What do you get when you combine thousands
of transistors and stuff them in a black box? An IC!
Shift Registers Shift registers are one of the most common
integrated circuits around. Learn how you can use a transistor to
blink dozens of LEDs with just a few inputs.
Mini FET Shield Hookup Guide This is a really simple Arduino shield
which uses 8 MOSFETs to control 8 high-current outputs. This is a
good, real-life example of using a transistor as a switch.
Designing PCBs with EAGLE Take your new transistor skills to the
next level. Design them into a PCB! This tutorial explains how to use
a freely available software (Eagle) to design PCBs.
How to Solder If you design a PCB, though, youll need to know
how to solder too. Learn how to through-hole solder in this tutorial.

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.

10/21/2014 12:10 AM

Transistors - learn.sparkfun.com

28 of 28

https://learn.sparkfun.com/tutorials/transistors

About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:10 AM

How to Read a Schematic - learn.sparkfun.com

1 of 14

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

How to Read a Schematic


C ON TR IBU TO R S:

JI MB0

Sections

S H A RE

Overview

Overview
Schematics are our map to designing, building, and troubleshooting circuits.
Understanding how to read and follow schematics is an important skill for
any electronics engineer.
This tutorial should turn you into a fully literate schematic reader! Well go
over all of the fundamental schematic symbols:

Schematic Symbols (Part 1)


Schematic Symbols (Part 2)
Name Designators and Values
Reading Schematics
Resources and Going Further

Comments

View Paginated
Print

Tags
E L E CTRI C A L E N GI N E E RI N G
SK I LL

License
tutorials are CC BY-NC-SA 3.0

Then well talk about how those symbols are connected on schematics to
create a model of a circuit. Well also go over a few tips and tricks to watch
out for.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

2 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Suggested Reading
Schematic comprehension is a pretty basic electronics skill, but there are a
few things you should know before you read this tutorial. Check out these
tutorials, if they sound like gaps in your growing brain:
What is Electricity?
What is a Circuit?
Voltage, Current, Resistance, and Ohms Law

Schematic Symbols (Part 1)


Are you ready for a barrage of circuit components? Here are some of the
standardized, basic schematic symbols for various components.

Resistors
The most fundamental of circuit components and symbols! Resistors on a
schematic are usually represented by a few zig-zag lines, with two
terminals extending outward. Schematics using international symbols may
instead use a featureless rectangle, instead of the squiggles.

Potentiometers and Variable Resistors


Variable resistors and potentiometers each augment the standard resistor
symbol with an arrow. The variable resistor remains a two-terminal device,
so the arrow is just laid diagonally across the middle. A potentiometer is a
three-terminal device, so the arrow becomes the third terminal (the wiper).

Capacitors
There are two commonly used capacitor symbols. One symbol represents a
polarized (usually electrolytic or tantalum) capacitor, and the other is for
non-polarized caps. In each case there are two terminals, running
perpendicularly into plates.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

3 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

The symbol with one curved plate indicates that the capacitor is polarized.
The curved plate represents the cathode of the capacitor, which should be
at a lower voltage than the positive, anode pin. A plus sign might also be
added to the positive pin of the polarized capacitor symbol.

Inductors
Inductors are usually represented by either a series of curved bumps, or
loopy coils. International symbols may just define an inductor as a filled-in
rectangle.

Switches
Switches exist in many different forms. The most basic switch, a singlepole/single-throw (SPST), is two terminals with a half-connected line
representing the actuator (the part that connects the terminals together).

Switches with more than one throw, like the SPDT and SP3T below, add
more landing spots for the the actuator.

Switches with multiple poles, usually have multiple, alike switches with a
dotted line intersecting the middle actuator.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

4 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Power Sources
Just as there are many options out there for powering your project, there
are a wide variety of power source circuit symbols to help specify the
power source.

DC or AC Voltage Sources
Most of the time when working with electronics, youll be using constant
voltage sources. We can use either of these two symbols to define whether
the source is supplying direct current (DC) or alternating current (AC):

Batteries
Batteries, whether theyre those cylindrical, alkaline AAs or rechargeable
lithium-polymers, usually look like a pair of disproportionate, parallel lines:

More pairs of lines usually indicates more series cells in the battery. Also,
the longer line is usually used to represent the positive terminal, while the
shorter line connects to the negative terminal.

Voltage Nodes
Sometimes on really busy schematics especially you can assign special
symbols to node voltages. You can connect devices to these one-terminal
symbols, and itll be tied directly to 5V, 3.3V, VCC, or GND (ground).
Positive voltage nodes are usually indicated by an arrow pointing up, while
ground nodes usually involve one to three flat lines (or sometimes a
down-pointing arrow or triangle).

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

5 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Schematic Symbols (Part 2)


Diodes
Basic diodes are usually represented with a triangle pressed up against a
line. Diodes are also polarized, so each of the two terminals require
distinguishing identifiers. The positive, anode is the terminal running into the
flat edge of the triangle. The negative, cathode extends out of the line in the
symbol (think of it as a - sign).

There are a all sorts of different types of diodes, each of which has a
special riff on the standard diode symbol. Light-emitting diodes (LEDs)
augment the diode symbol with a couple lines pointing away. Photodiodes,
which generate energy from light (basically, tiny solar cells), flip the arrows
around and point them toward the diode.

Other special types of diodes, like Schottkys or zeners, have their own
symbols, with slight variations on the bar part of the symbol.

Transistors
Transistors, whether theyre BJTs or MOSFETs, can exist in two
configurations: positively doped, or negatively doped. So for each of these
types of transistor, there are at least two ways to draw it.

Bipolar Junction Transistors (BJTs)


BJTs are three-terminal devices; they have a collector (C), emitter (E), and
a base (B). There are two types of BJTs NPNs and PNPs and each has
its own unique symbol.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

6 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

The collector (C) and emitter (E) pins are both in-line with each other, but
the emitter should always have an arrow on it. If the arrow is pointing
inward, its a PNP, and, if the arrow is pointing outward, its an NPN. A
mnemonic for remembering which is which is NPN: not pointing in.

Metal Oxide Field-Effect Transistors (MOSFETs)


Like BJTs, MOSFETs have three terminals, but this time theyre named
source (S), drain (D), and gate (G). And again, there are two different
versions of the symbol, depending on whether youve got an n-channel or
p-channel MOSFET. There are a number of commonly used symbols for
each of the MOSFET types:

The arrow in the middle of the symbol (called the bulk) defines whether the
MOSFET is n-channel or p-channel. If the arrow is pointing in means its a
n-channel MOSFET, and if its pointing out its a p-channel. Remember: n is
in (kind of the opposite of the NPN mnemonic).

Digital Logic Gates


Our standard logic functions AND, OR, NOT, and XOR all have unique
schematic symbols:

Adding a bubble to the output negates the function, creating NANDs, NORs,
and XNORs:

They may have more than two inputs, but the shapes should remain the
same (well, maybe a bit bigger), and there should still only be one output.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

7 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Integrated Circuits
Integrated circuits accomplish such unique tasks, and are so numerous,
that they dont really get a unique circuit symbol. Usually, an integrated
circuit is represented by a rectangle, with pins extending out of the sides.
Each pin should be labeled with both a number, and a function.

Schematic symbols for an ATmega328 microcontroller (commonly found


on Arduinos), an ATSHA204 encryption IC, and an ATtiny45 MCU. As you
can see, these components greatly vary in size and pin-counts.
Because ICs have such a generic circuit symbol, the names, values and
labels become very important. Each IC should have a value precisely
identifying the name of the chip.

Unique ICs: Op Amps, Voltage Regulators


Some of the more common integrated circuits do get a unique circuit
symbol. Youll usually see operation amplifiers laid out like below, with 5
total terminals: a non-inverting input (+), inverting input (-), output, and two
power inputs.

Often, there will be two op amps built into one IC package requiring only
one pin for power and one for ground, which is why the one on the right
only has three pins.
Simple voltage regulators are usually three-terminal components with input,
output and ground (or adjust) pins. These usually take the shape of a
rectangle with pins on the left (input), right (output) and bottom
(ground/adjust).

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

8 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Miscellany
Crystals and Resonators
Crystals or resonators are usually a critical part of microcontroller circuits.
They help provide a clock signal. Crystal symbols usually have two
terminals, while resonators, which add two capacitors to the crystal, usually
have three terminals.

Headers and Connectors


Whether its for providing power, or sending out information, connectors are
a requirement on most circuits. These symbols vary depending on what the
connector looks like, heres a sampling:

Motors, Transformers, Speakers, and Relays


Well lump these together, since they (mostly) all make use of coils in some
way. Transformers (not the more-than-meets-the-eye kind) usually involve
two coils, butted up against each other, with a couple lines separating them:

Relays usually pair a coil with a switch:

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

9 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Speakers and buzzers usually take a form similar to their real-life


counterparts:

And motors generally involve an encircled M, sometimes with a bit more


embellishment around the terminals:

Fuses and PTCs


Fuses and PTCs devices which are generally used to limit large inrushes
of current each have their own unique symbol:

The PTC symbol is actually the generic symbol for a thermistor, a


temperature-dependent resistor (notice the international resistor symbol in
there?).

No doubt, there are many circuit symbols left off this list, but those above
should have you 90% literate in schematic reading. In general, symbols
should share a fair amount in common with the real-life components they
model. In addition to the symbol, each component on a schematic should
have a unique name and value, which further helps to identify it.

Name Designators and Values


One of the biggest keys to being schematic-literate is being able to
recognize which components are which. The component symbols tell half
the story, but each symbol should be paired with both a name and value to
complete it.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

10 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Names and Values


Values help define exactly what a component is. For schematic
components like resistors, capacitors, and inductors the value tells us how
many ohms, farads, or henries they have. For other components, like
integrated circuits, the value may just be the name of the chip. Crystals
might list their oscillating frequency as their value. Basically, the value of a
schematic component calls out its most important characteristic.
Component names are usually a combination of one or two letters and a
number. The letter part of the name identifies the type of component Rs
for resistors, Cs for capacitors, Us for integrated circuits, etc. Each
component name on a schematic should be unique; if you have multiple
resistors in a circuit, for example, they should be named R1, R2, R3, etc.
Component names help us reference specific points in schematics.
The prefixes of names are pretty well standardized. For some components,
like resistors, the prefix is just the first letter of the component. Other name
prefixes are not so literal; inductors, for example, are Ls (because current
has already taken I [but it starts with a Celectronics is a silly place]).
Heres a quick table of common components and their name prefixes:
Name IdentifierComponent
R
Resistors
C
L
S

Capacitors
Inductors
Switches

D
Q
U

Diodes
Transistors
Integrated Circuits

Crystals and Oscillators

Although theses are the standardized names for component symbols,


theyre not universally followed. You might see integrated circuits prefixed
with IC instead of U, for example, or crystals labeled as XTALs instead of
Ys. Use your best judgment in diagnosing which part is which. The symbol
should usually convey enough information.

Reading Schematics
Understanding which components are which on a schematic is more than
half the battle towards comprehending it. Now all that remains is identifying
how all of the symbols are connected together.

Nets, Nodes and Labels


Schematic nets tell you how components are wired together in a circuit.
Nets are represented as lines between component terminals. Sometimes
(but not always) theyre a unique color, like the green lines in this
schematic:

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

11 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Junctions and Nodes


Wires can connect two terminals together, or they can connect dozens.
When a wire splits into two directions, it creates a junction. We represent
junctions on schematics with nodes, little dots placed at the intersection of
the wires.

Nodes give us a way to say that wires crossing this junction are
connected. The absences of a node at a junction means two separate
wires are just passing by, not forming any sort of connection. (When
designing schematics, its usually good practice to avoid these
non-connected overlaps wherever possible, but sometimes its
unavoidable).

Net Names
Sometimes, to make schematics more legible, well give a net a name and
label it, rather than routing a wire all over the schematic. Nets with the same
name are assumed to be connected, even though there isnt a visible wire

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

12 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

connecting them. Names can either be written directly on top of the net, or
they can be tags, hanging off the wire.

Each net with the same name is connected, as in this schematic for an
FT231X Breakout Board. Names and labels help keep schematics from
getting too chaotic (imagine if all those nets were actually connected with
wires).
Nets are usually given a name that specifically states the purpose of
signals on that wire. For example, power nets might be labeled VCC or
5V, while serial communication nets might be labeled RX or TX.

Schematic Reading Tips


Identify Blocks
Truly expansive schematics should be split into functional blocks. There
might be a section for power input and voltage regulation, or a
microcontroller section, or a section devoted to connectors. Try recognizing
which sections are which, and following the flow of circuit from input to
output. Really good schematic designers might even lay the circuit out like a
book, inputs on the left side, outputs on the right.

If the drawer of a schematic is really nice (like the engineer who designed
this schematic for the RedBoard), they may separate sections of a
schematic into logical, labeled blocks.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

13 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Recognize Voltage Nodes


Voltage nodes are single-terminal schematic components, which we can
connect component terminals to in order to assign them to a specific
voltage level. These are a special application of net names, meaning all
terminals connected to a like-named voltage node are connected together.

Like-named voltage nodes like GND, 5V, and 3.3V are all connected
to their counterparts, even if there arent wires between them.
The ground voltage node is especially useful, because so many
components need a connection to ground.

Reference Component Datasheets


If theres something on a schematic that just doesnt make sense, try finding
a datasheet for the most important component. Usually the component
doing the most work on a circuit is an integrated circuit, like a
microcontroller or sensor. These are usually the largest component,
oft-located at the center of the schematic.

Resources and Going Further


Thats all there is to schematic reading! Knowing component symbols,
following nets, and identifying common labels. Understanding how a
schematic works opens up the whole world of electronics to you! Check out
some of these tutorial, to practice your new-found schematic knowledge:
Voltage Dividers - This is one of the most basic, fundamental circuits.
Learn how to turn a big voltage into a smaller one, with just two
resistors!
How to Use a Breadboard - Now that you know how to read
schematics, why not make one! Breadboards are a great way to
make temporary, functional, prototype circuits.
Working with Wire - Or, skip the breadboard and jump straight into
wiring stuff up. Knowing how to cut, strip, and connect wire is an
important electronics skill.
Series and Parallel Circuits - Building circuits in series or parallel
requires a good understanding of schematics.
Sewing with Conductive Thread - If you dont want to work with wire,
how about building an e-textiles circuit with conductive thread? Thats
the beauty of schematics, the same schematic circuit can be built in
a number of different ways with a number of different mediums.

10/21/2014 12:11 AM

How to Read a Schematic - learn.sparkfun.com

14 of 14

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:11 AM

Analog vs. Digital - learn.sparkfun.com

1 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

Analog vs. Digital


C ON TR IBU TO R S:

JI MB0

Sections

S H A RE

Overview

Overview
We live in an analog world. There are an infinite amount of colors to paint
an object (even if the difference is indiscernible to our eye), there are an
infinite number of tones we can hear, and there are an infinite number of
smells we can smell. The common theme among all of these analog signals
is their infinite possibilities.
Digital signals and objects deal in the realm of the discrete or finite,
meaning there is a limited set of values they can be. That could mean just
two total possible values, 255, 4,294,967,296, or anything as long as its
not (infinity).

Analog Signals
Digital Signals
Analog and Digital Circuits
Resources and Going Further

Comments

View Paginated
Print

Tags
CON C E PTS
E L E CTRI C A L E N GI N E E RI N G

License
tutorials are CC BY-NC-SA 3.0

Real-world objects can display data, gather inputs by either analog or


digital means. (From left to right): Clocks, multimeters, and joysticks can
all take either form (analog above, digital below).
Working with electronics means dealing with both analog and digital signals,
inputs and outputs. Our electronics projects have to interact with the real,
analog world in some way, but most of our microprocessors, computers,
and logic units are purely digital components. These two types of signals
are like different electronic languages; some electronics components are
bi-lingual, others can only understand and speak one of the two.
In this tutorial, well cover the basics of both digital and analog signals,
including examples of each. Well also talk about analog and digital circuits,

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

2 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

and components.

Suggested Reading
The concepts of analog and digital stand on their own, and dont require a
lot of previous electronics knowledge. That said, if you havent already, you
should peek through some of these tutorials:
Voltage, Current, Resistance and Ohms Law
What is a Circuit
And some mathematics concepts: reading graphs, and understanding
the difference between finite and infinite sets.

Analog Signals
Define: Signals
Before going too much further, we should talk a bit about what a signal
actually is, electronic signals specifically (as opposed to traffic signals,
albums by the ultimate power-trio, or a general means for communication).
The signals were talking about are time-varying quantities which convey
some sort of information. In electrical engineering the quantity thats
time-varying is usually voltage (if not that, then usually current). So when
we talk about signals, just think of them as a voltage thats changing over
time.
Signals are passed between devices in order to send and receive
information, which might be video, audio, or some sort of encoded data.
Usually the signals are transmitted through wires, but they could also pass
through the air via radio frequency (RF) waves. Audio signals, for example
might be transferred between your computers audio card and speakers,
while data signals might be passed through the air between a tablet and a
WiFi router.

Analog Signal Graphs


Because a signal varies over time, its helpful to plot it on a graph where
time is plotted on the horizontal, x-axis, and voltage on the vertical, y-axis.
Looking at a graph of a signal is usually the easiest way to identify if its
analog or digital; a time-versus-voltage graph of an analog signal should be
smooth and continuous.

While these signals may be limited to a range of maximum and minimum


values, there are still an infinite number of possible values within that range.
For example, the analog voltage coming out of your wall socket might be
clamped between -120V and +120V, but, as you increase the resolution
more and more, you discover an infinite number of values that the signal
can actually be (like 64.4V, 64.42V, 64.424V, and infinite, increasingly

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

3 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

precise values).

Example Analog Signals


Video and audio transmissions are often transferred or recorded using
analog signals. The composite video coming out of an old RCA jack, for
example, is a coded analog signal usually ranging between 0 and 1.073V.
Tiny changes in the signal have a huge effect on the color or location of the
video.

An analog signal representing one line of composite video data.


Pure audio signals are also analog. The signal that comes out of a
microphone is full of analog frequencies and harmonics, which combine to
make beautiful music.

Digital Signals
Digital signals must have a finite set of possible values. The number of
values in the set can be anywhere between two and a-very-large-numberthats-not-infinity. Most commonly digital signals will be one of two values
like either 0V or 5V. Timing graphs of these signals look like square waves.

Or a digital signal might be a discrete representation of an analog


waveform. Viewed from afar, the wave function below may seem smooth
and analog, but when you look closely there are tiny discrete steps as the
signal tries to approximate values:

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

4 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

Thats the big difference between analog and digital waves. Analog waves
are smooth and continuous, digital waves are stepping, square, and
discrete.

Example Digital Signals


Not all audio and video signals are analog. Standardized signals like HDMI
for video (and audio) and MIDI, I2S, or AC'97 for audio are all digitally
transmitted.
Most communication between integrated circuits is digital. Interfaces like
serial, I2C, and SPI all transmit data via a coded sequence of square
waves.

Serial peripheral interface (SPI) uses many digital signals to transmit data
between devices.

Analog and Digital Circuits


Analog Electronics
Most of the fundamental electronic components resistors, capacitors,
inductors, diodes, transistors, and operational amplifiers are all inherently
analog. Circuits built with a combination of solely these components are
usually analog.

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

5 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

Analog circuits are usually complex combinations of op amps, resistors,


caps, and other foundational electronic components. This is an example
of a class B analog audio amplifier.
Analog circuits can be very elegant designs with many components, or they
can be very simple, like two resistors combining to make a voltage divider.
In general, though, analog circuits are much more difficult to design than
those which accomplish the same task digitally. It takes a special kind of
analog circuit wizard to design an analog radio receiver, or an analog
battery charger; digital components exist to make those designs much
simpler.
Analog circuits are usually much more susceptible to noise (small,
undesired variations in voltage). Small changes in the voltage level of an
analog signal may produce significant errors when being processed.

Digital Electronics
Digital circuits operate using digital, discrete signals. These circuits are
usually made of a combination of transistors and logic gates and, at higher
levels, microcontrollers or other computing chips. Most processors, whether
theyre big beefy processors in your computer, or tiny little microcontrollers,
operate in the digital realm.

Digital circuits make use of components like logic gates, or more


complicated digital ICs (usually represented by rectangles with labeled
pins extending from them).
Digital circuits usually use a binary scheme for digital signaling. These
systems assign two different voltages as two different logic levels a high
voltage (usually 5V, 3.3V, or 1.8V) represents one value and a low voltage
(usually 0V) represents the other.
Although digital circuits are generally easier to design, they do tend to be a
bit more expensive than an equally tasked analog circuit.

Analog and Digital Combined

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

6 of 7

https://learn.sparkfun.com/tutorials/analog-vs-digital

Its not rare to see a mixture of analog and digital components in a circuit.
Although microcontrollers are usually digital beasts, they often have internal
circuitry which enables them to interface with analog circuitry (analogto-digital converters, pulse-width modulation, and digital-to-analog
converters. An analog-to-digital converter (ADC) allows a microcontroller to
connect to an analog sensor (like photocells or temperature sensors), to
read in an analog voltage. The less common digital-to-analog converter
allows a microcontroller to produce analog voltages, which is handy when it
needs to make sound.

Resources and Going Further


Now that you know the difference between analog and digital signals, wed
suggest checking out the Analog to Digital Conversion tutorial. Working with
microcontrollers, or really any logic-based electronics, means working in the
digital realm most of the time. If you want to sense light, temperature, or
interface a microcontroller with a variety of other analog sensors, youll
need to know how to convert the analog voltage they produce into a digital
value.
Also, consider reading our Pulse Width Modulation (PWM) tutorial. PWM is
a trick microcontrollers can use to make a digital signal appear to be
analog.
Here are some other subjects which deal heavily with digital interfaces:
Binary
Logic Levels
Serial Communication
SPI Communication
I2C Communication
IR Communication
Or, if youd like to delve further into the analog realm, consider checking out
these tutorials:
Voltage Dividers
Resistors
Diodes
Capacitors
Transistors

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

10/21/2014 12:12 AM

Analog vs. Digital - learn.sparkfun.com

7 of 7

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

https://learn.sparkfun.com/tutorials/analog-vs-digital

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

1 of 16

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

How to Use an Oscilloscope


C ON TR IBU TO R S:

JI MB0

Sections

S H A RE

Introduction

Introduction
Have you ever found yourself troubleshooting a circuit, needing more
information than a simple multimeter can provide? If you need to uncover
information like frequency, noise, amplitude, or any other characteristic that
might change over time, you need an oscilloscope!

Basics of O-Scopes
Oscilloscope Lexicon
Anatomy of An O-Scope
Using an Oscilloscope
Resources and Going Further

Comments

View Paginated
Print

Tags
E L E CTRI C A L E N GI N E E RI N G

O-scopes are an important tool in any electrical engineers lab. They allow
you to see electric signals as they vary over time, which can be critical in
diagnosing why your 555 timer circuit isnt blinking correctly, or why your
noise maker isnt reaching maximum annoyance levels.

License

Covered in This Tutorial

tutorials are CC BY-NC-SA 3.0

SK I LL

TOOL S

This tutorial aims to introduce the concepts, terminology, and control


systems of oscilloscopes. Its broken down into the following sections:
Basics of O-Scopes An introduction to what, exactly, oscilloscopes
are, what they measure, and why we use them.
Oscilloscope Lexicon A glossary covering some of the more
common oscilloscope characteristics.
Anatomy of an O-Scope An overview of the most critical systems
on an oscilloscope the screen, horizontal and vertical controls,
triggers, and probes.
Using an Oscilloscope Tips and tricks for someone using an
oscilloscope for the first time.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

2 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Well be using the Gratten GA1102CAL a handy, mid-level, digital


oscilloscope as the basis for our scope discussion. Other o-scopes may
look different, but they should all share a similar set of control and interface
mechanisms.

Suggested Reading
Before continuing with this tutorial, you should be familiar with the concepts
below. Check out the tutorial if you want to learn more!
Voltage, Current, Resistance and Ohms Law
How to Use a Multimeter
Analog vs. Digital
Alternating Current (AC) vs. Direct Current (DC)

Basics of O-Scopes
The main purpose of an oscilloscope is to graph an electrical signal as it
varies over time. Most scopes produce a two-dimensional graph with time
on the x-axis and voltage on the y-axis.

An example of an oscilloscope display. A signal (the yellow sine wave in


this case) is graphed on a horizontal time axis and a vertical voltage axis.
Controls surrounding the scopes screen allow you to adjust the scale of
the graph, both vertically and horizontally allowing you to zoom in and out
on a signal. There are also controls to set the trigger on the scope, which
helps focus and stabilize the display.

What Can Scopes Measure


In addition to those fundamental features, many scopes have measurement
tools, which help to quickly quantify frequency, amplitude, and other
waveform characteristics. In general a scope can measure both time-based
and voltage-based characteristics:
Timing characteristics:
Frequency and period Frequency is defined as the number
of times per second a waveform repeats. And the period is the
reciprocal of that (number of seconds each repeating
waveform takes). The maximum frequency a scope can
measure varies, but its often in the 100s of MHz (1E6 Hz)
range.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

3 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Duty cycle The percentage of a period that a wave is either


positive or negative (there are both positive and negative duty
cycles). The duty cycle is a ratio that tells you how long a
signal is on versus how long its off each period.
Rise and fall time Signals cant instantaneously go from 0V
to 5V, they have to smoothly rise. The duration of a wave
going from a low point to a high point is called the rise time,
and fall time measures the opposite. These characteristics are
important when considering how fast a circuit can respond to
signals.
Voltage characteristics:
Amplitude Amplitude is a measure of the magnitude of a
signal. There are a variety of amplitude measurements
including peak-to-peak amplitude, which measures the
absoluted difference between a high and low voltage point of a
signal. Peak amplitude, on the other hand, only measures how
high or low a signal is past 0V.
Maximum and minimum voltages The scope can tell you
exactly how high and low the voltage of your signal gets.
Mean and average voltages Oscilloscopes can calculate
the average or mean of your signal, and it can also tell you the
average of your signals minimum and maximum voltage.

When to Use an O-Scope


The o-scope is useful in a variety of troubleshooting and research
situations, including:
Determining the frequency and amplitude of a signal, which can be
critical in debugging a circuits input, output, or internal systems.
From this, you can tell if a component in your circuit has
malfunctioned.
Identifying how much noise is in your circuit.
Identifying the shape of a wave sine, square, triangle, sawtooth,
complex, etc.
Quantifying phase differences between two different signals.

Oscilloscope Lexicon
Learning how to use an oscilloscope means being introduced to an entire
lexicon of terms. On this page well introduce some of the important o-scope
buzzwords you should be familiar with before turning one on.

Key Oscilloscope Specifications


Some scopes are better than others. These characteristics help define how
well you might expect a scope to perform:
Bandwidth Oscilloscopes are most commonly used to measure
waveforms which have a defined frequency. No scope is perfect
though: they all have limits as to how fast they can see a signal
change. The bandwidth of a scope specifies the range of
frequencies it can reliably measure.
Digital vs. Analog As with most everything electronic, o-scopes
can either be analog or digital. Analog scopes use an electron beam
to directly map the input voltage to a display. Digital scopes
incorporate microcontrollers, which sample the input signal with an

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

4 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

analog-to-digital converter and map that reading to the display.


Generally analog scopes are older, have a lower bandwidth, and less
features, but they may have a faster response (and look much
cooler).
Channel Amount Many scopes can read more than one signal at
a time, displaying them all on the screen simultaneously. Each signal
read by a scope is fed into a separate channel. Two to four channel
scopes are very common.
Sampling Rate This characteristic is unique to digital scopes, it
defines how many times per second a signal is read. For scopes that
have more than one channel, this value may decrease if multiple
channels are in use.
Rise Time The specified rise time of a scope defines the fastest
rising pulse it can measure. The rise time of a scope is very closely
related to the bandwidth. It can be calculated as Rise Time = 0.35 /
Bandwidth .
Maximum Input Voltage Every piece of electronics has its limits
when it comes to high voltage. Scopes should all be rated with a
maximum input voltage. If your signal exceeds that voltage, theres a
good chance the scope will be damaged.
Resolution The resolution of a scope represents how precisely it
can measure the input voltage. This value can change as the vertical
scale is adjusted.
Vertical Sensitivity This value represents the minimum and
maximum values of your vertical, voltage scale. This value is listed in
volts per div.
Time Base Time base usually indicates the range of sensitivities
on the horizontal, time axis. This value is listed in seconds per div.
Input Impedance When signal frequencies get very high, even a
small impedance (resistance, capacitance, or inductance) added to a
circuit can affect the signal. Every oscilloscope will add a certain
impedance to a circuit its reading, called the input impedance. Input
impedances are generally represented as a large resistive
impedance (>1 M) in parallel (||) with small capacitance (in the pF
range). The impact of input impedance is more apparent when
measuring very high frequency signals, and the probe you use may
have to help compensate for it.
Using the GA1102CAL as an example, here are specifications you might
expect from a mid-range scope:
Characteristic
Bandwidth

Value
100 MHz

Sampling Rate
Rise Time

1 GSa/s (1E9 samples per second)


<3.5ns

Channel Count
Maximum Input Voltage
Resolution

2
400V
8-bit

Vertical sensitivity
Time base
Input Impedance

2mV/div - 5V/div
2ns/div - 50s/div
1 M 3% || 16pF 3pF

Understanding these characteristics, you should be able to pick out an


oscilloscope thatll best fit your needs. But you still have to know how to
use itonto the next page!

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

5 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Anatomy of An O-Scope
While no scopes are created exactly equal, they should all share a few
similarities that make them function similarly. On this page well discuss a
few of the more common systems of an oscilloscope: the display,
horizontal, vertical, trigger, and inputs.

The Display
An oscilloscope isnt any good unless it can display the information youre
trying to test, which makes the display one of the more important sections
on the scope.

Every oscilloscope display should be criss-crossed with horizontal and


vertical lines called divisions. The scale of those divisions are modified
with the horizontal and vertical systems. The vertical system is measured in
volts per division and the horizontal is seconds per division. Generally,
scopes will feature around 8-10 vertical (voltage) divisions, and 10-14
horizontal (seconds) divisions.
Older scopes (especially those of the analog variety) usually feature a
simple, monochrome display, though the intensity of the wave may vary.
More modern scopes feature multicolor LCD screens, which are a great
help in showing more than one waveform at a time.
Many scope displays are situated next to a set of about five buttons
either to the side or below the display. These buttons can be used to
navigate menus and control settings of the scope.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

6 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Vertical System
The vertical section of the scope controls the voltage scale on the
display. There are traditionally two knobs in this section, which allow you to
individually control the vertical position and volts/div.

The more critical volts per division knob allows you to set the vertical
scale on the screen. Rotating the knob clockwise will decrease the scale,
and counter-clockwise will increase. A smaller scale fewer volts per
division on the screen means youre more zoomed in to the waveform.
The display on the GA1102, for example, has 8 vertical divisions, and the
volts/div knob can select a scale between 2mV/div and 5V/div. So, zoomed
all the way in to 2mV/div, the display can show waveform that is 16mV from
top to bottom. Fully zoomed out, the scope can show a waveform ranging
over 40V. (The probe, as well discuss below, can further increase this
range.)
The position knob controls the vertical offset of the waveform on the
screen. Rotate the knob clockwise, and the wave will move down, counterclockwise will move it up the display. You can use the position knob to
offset part of a waveform off the screen.

Using both the position and volts/div knobs in conjunction, you can zoom in
on just a tiny part of the waveform that you care about the most. If you had
a 5V square wave, but only cared about how much it was ringing on the
edges, you could zoom in on the rising edge using both knobs.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

7 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Horizontal System
The horizontal section of the scope controls the time scale on the screen.
Like the vertical system, the horizontal control gives you two knobs:
position and seconds/div.

The seconds per division (s/div) knob rotates to increase or decrease


the horizontal scale. If you rotate the s/div knob clockwise, the number of
seconds each division represents will decrease youll be zooming in on
the time scale. Rotate counter-clockwise to increase the time scale, and
show a longer amount of time on the screen.
Using the GA1102 as an example again, the display has 14 horizontal
divisions, and can show anywhere between 2nS and 50s per division. So
zoomed all the way in on the horizontal scale, the scope can show 28nS of
a waveform, and zoomed way out it can show a signal as it changes over
70 seconds.
The position knob can move your waveform to the right or left of the
display, adjusting the horizontal offset.
Using the horizontal system, you can adjust how many periods of a
waveform you want to see. You can zoom out, and show multiple peaks and
troughs of a signal:

Or you can zoom way in, and use the position knob to show just a tiny part
of a wave:

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

8 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Trigger System
The trigger section is devoted to stabilizing and focusing the oscilloscope.
The trigger tells the scope what parts of the signal to trigger on and start
measuring. If your waveform is periodic, the trigger can be manipulated to
keep the display static and unflinching. A poorly triggered wave will produce
seizure-inducing sweeping waves like this:

The trigger section of a scope is usually comprised of a level knob and a


set of buttons to select the source and type of the trigger. The level knob
can be twisted to set a trigger to a specific voltage point.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

9 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

A series of buttons and screen menus make up the rest of the trigger
system. Their main purpose is to select the trigger source and mode. There
are a variety of trigger types, which manipulate how the trigger is
activated:
An edge trigger is the most basic form of the trigger. It will key the
oscilloscope to start measuring when the signal voltage passes a
certain level. An edge trigger can be set to catch on a rising or falling
edge (or both).
A pulse trigger tells the scope to key in on a specified pulse of
voltage. You can specify the duration and direction of the pulse. For
example, it can be a tiny blip of 0V -> 5V -> 0V, or it can be a
seconds-long dip from 5V to 0V, back to 5V.
A slope trigger can be set to trigger the scope on a positive or
negative slope over a specified amount of time.
More complicated triggers exist to focus on standardized waveforms
that carry video data, like NTSC or PAL. These waves use a unique
synchronizing pattern at the beginning of every frame.
You can also usually select a triggering mode, which, in effect, tells the
scope how strongly you feel about your trigger. In automatic trigger mode,
the scope can attempt to draw your waveform even if it doesnt trigger.
Normal mode will only draw your wave if it sees the specified trigger. And
single mode looks for your specified trigger, when it sees it it will draw
your wave then stop.

The Probes
An oscilloscope is only good if you can actually connect it to a signal, and
for that you need probes. Probes are single-input devices that route a
signal from your circuit to the scope. They have a sharp tip which probes
into a point on your circuit. The tip can also be equipped with hooks,
tweezers or clips to make latching onto a circuit easier. Every probe also
includes a ground clip, which should be secured safely to a common
ground point on the circuit under test.

While probes may seem like simple devices that just latch onto your circuit
and carry a signal to the scope, theres actually a lot that goes into probe
design and selection.
Optimally, what a probe needs to be is invisible it shouldnt have any

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

10 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

effect on your signal under test. Unfortunately, long wires all have intrinsic
inductance, capacitance, and resistance, so, no matter what, theyll affect
scope readings (especially at high frequencies).
There are a variety of probe types out there, the most common of which is
the passive probe, included with most scopes. Most of the stock passive
probes are attenuated. Attenuating probes have a large resistance
intentionally built-in and shunted by a small capacitor, which helps to
minimize the effect that a long cable might have on loading your circuit. In
series with the input impedance of a scope, this attenuated probe will
create a voltage divider between your signal and the scope input.

Most probes have a 9M resistor for attenuating, which, when combined


with a standard 1M input impedance on a scope, creates a 1/10 voltage
divider. These probes are commonly called 10X attenuated probes. Many
probes include a switch to select between 10X and 1X (no attenuation).

Attenuated probes are great for improving accuracy at high frequencies, but
they will also reduce the amplitude of your signal. If youre trying to
measure a very low-voltage signal, you may have to go with a 1X probe.
You may also need to select a setting on your scope to tell it youre using
an attenuated probe, although many scopes can automatically detect this.
Beyond the passive attenuated probe, there are a variety of other probes
out there. Active probes are powered probes (they require a separate
power source), which can amplify your signal or even pre-process it before
it get to your scope. While most probes are designed to measure voltage,
there are probes designed to measure AC or DC current. Current probes
are unique because they often clamp around a wire, never actually making
contact with the circuit.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

11 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Using an Oscilloscope
The infinite variety of signals out there means youll never operate an
oscilloscope the same way twice. But there are some steps you can count
on performing just about every time you test a circuit. On this page well
show an example signal, and the steps required to measure it.

Probe Selection and Setup


First off, youll need to select a probe. For most signals, the simple passive
probe included with your scope will work perfectly fine.
Next, before connecting it to your scope, set the attenuation on your
probe. 10X the most common attenuation factor is usually the most
well-rounded choice. If youre trying to measure a very low-voltage signal
though, you may need to use 1X.

Connect the Probe and Turn the Scope On


Connect your probe to the first channel on your scope, and turn it on. Have
some patience here, some scopes take as long to boot up as an old PC.
When the scope boots up you should see the divisions, scale, and a noisy,
flat line of a waveform.

The screen should also show previously set values for time and volts per
div. Ignoring those scales for now, make these adjustments to put your
scope into a standard setup:
Turn channel 1 on and channel 2 off.
Set channel 1 to DC coupling.
Set the trigger source to channel 1 no external source or alternate
channel triggering.
Set the trigger type to rising edge, and the trigger mode to auto (as
opposed to single).
Make sure the scope probe attenuation on your scope matches the
setting on your probe (e.g. 1X, 10X).
For help making these adjustments, consult your scopes users manual (as
an example, heres the GA1102CAL manual).

Testing the Probe


Lets connect that channel up to a meaningful signal. Most scopes will have

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

12 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

a built-in frequency generator that emits a reliable, set-frequency wave


on the GA1102CAL there is a 1kHz square wave output at the bottom-right
of the front panel. The frequency generator output has two separate
conductors one for the signal and one for ground. Connect your probes
ground clip to the ground, and the probe tip to the signal output.

As soon as you connect both parts of the probe, you should see a signal
begin to dance around your screen. Try fiddling with the horizontal and
vertical system knobs to maneuver the waveform around the screen.
Rotating the scale knobs clockwise will zoom into your waveform, and
counter-clockwise zooms out. You can also use the position knob to further
locate your waveform.
If your wave is still unstable, try rotating the trigger position knob. Make
sure the trigger isnt higher than the tallest peak of your waveform. By
default, the trigger type should be set to edge, which is usually a good
choice for square waves like this.
Try fiddling with those knobs enough to display a single period of your wave
on the screen.

Or try zooming way out on the time scale to show dozens of squares.

Compensating an Attenuated Probe


If your probe is set to 10X, and you dont have a perfectly square waveform
as shown above, you may need to compensate your probe. Most probes

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

13 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

have a recessed screw head, which you can rotate to adjust the shunt
capacitance of the probe.

Try using a small screwdriver to rotate this trimmer, and look at what
happens to the waveform.

Adjust the trimming cap on the probe handle until you have a
straight-edged square wave. Compensation is only necessary if your
probe is attenuated (e.g. 10X), in which case its critical (especially if you
dont know who used your scope last!).

Probing, Triggering, and Scaling Tips


Once youve compensated your probe, its time to measure a real signal!
Go find a signal source (frequency generator?, Terror-Min?) and come
back.
The first key to probing a signal is finding a solid, reliable grounding point.
Clasp your ground clip to a known ground, sometimes you may have to use
a small wire to intermediate between the ground clip and your circuits
ground point. Then connect your probe tip to the signal under test. Probe
tips exist in a variety of form factors the spring-loaded clip, fine point,
hooks, etc. try to find one that doesnt require you to hold it in place all the
time.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

14 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Once your signal is on the screen, you may want to begin by adjusting the
horizontal and vertical scales into at least the ballpark of your signal. If
youre probing a 5V 1kHz square wave, youll probably want the volts/div
somewhere around 0.5-1V, and set the seconds/div to around 100s (14
divisions would show about one and a half periods).
If part of your wave is rising or falling of the screen, you can adjust the
vertical position to move it up or down. If your signal is purely DC, you
may want to adjust the 0V level near the bottom of your display.
Once you have the scales ballparked, your waveform may need some
triggering. Edge triggering where the scope tries to begin its scan when
it sees voltage rise (or fall) past a set point is the easiest type to use.
Using an edge trigger, try to set the trigger level to a point on your
waveform that only sees a rising edge once per period.
Now just scale, position, trigger and repeat until youre looking at exactly
what you need.

Measure Twice, Cut Once


With a signal scoped, triggered, and scaled, it comes time to measure
transients, periods, and other waveform properties. Some scopes have
more measurement tools than others, but theyll all at least have divisions,
from which you should be able to at least estimate the amplitude and
frequency.
Many scopes support a variety of automatic measurement tools, they may
even constantly display the most relevant information, like frequency. To get
the most out of your scope, youll want to explore all of the measure
functions it supports. Most scopes will calculate frequency, amplitude, duty
cycle, mean voltage, and a variety of other wave characteristics for you
automatically.

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

15 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

Using the scopes measure tools to find VPP, VMax, frequency, period, and
duty cycle.
A third measuring tool many scopes provide is cursors. Cursors are
on-screen, movable markers which can be placed on either the time or
voltage axis. Cursors usually come in pairs, so you can measure the
difference between one and the other.

Measuring the ringing of a square wave with cursors.


Once youve measured the quantity you were looking for, you can begin to
make adjustments to your circuit and measure some more! Some scopes
also support saving, printing, or storing a waveform, so you can recall it
and remember those good ol' times when you scoped that signal.
To find out more about what your scope can do, consult its users manual!

Resources and Going Further


With the tools discussed in this tutorial, you should be prepared to start
scoping signals of your own. If youre still unsure of what certain parts of
your scope are for, first consult your users manual. Here are some
additional resources we recommend checking out as well:
The XYZs of Oscilloscopes (PDF) A great in-depth introduction to
oscilloscopes.
How to Use an Oscilloscope (YouTube) Great o-scope explanation
straight from the makers of scopes (Tektronix).

10/21/2014 12:12 AM

How to Use an Oscilloscope - learn.sparkfun.com

16 of 16

https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope

GA1102CAL Users Manual.pdf) A users manual for Attens


GA1102CAL 100MHz oscilloscope. While its specific to that scope,
it still provides a nice overview of what similar scopes are capable
of, and how they work.

Going Further
Now that youre a practiced oscilloscop-er, what circuit are you going to be
debugging? Need some inspiration? Here are some related tutorials wed
recommend checking out next!
PCB Design with EAGLE If youre at a point where you need to
troubleshoot circuits at the signal level, maybe youre ready to step
into designing PCBs. Our EAGLE series of tutorials how to use the
freely available software to design your own circuit boards.
Recreating Classic Electronics Kits If youre in search of a circuit
to troubleshoot with a scope, why not make your own version of
50-in-1 electronics kit?
Pulse-Width Modulation PWM signals are the foundation behind
dimming LEDs and driving servo motors. Learn about these signal
types and then scope them with your new skills!

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

1 of 13

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

Light-emitting Diodes (LEDs)


C ON TR IBU TO R S:

NPO O L E

Sections

S H A RE

The Basics

The Basics

How to Use Them


LEDs Without Math
Get the Details
Types of LEDs
Delving Deeper

LEDs are all around us: In our phones, our cars and even our homes. Any
time something electronic lights up, theres a good chance that an LED is
behind it. They come in a huge variety of sizes, shapes, and colors, but no
matter what they look like they have one thing in common: theyre the bacon
of electronics. Theyre widely purported to make any project better and
theyre often added to unlikely things (to everyones delight).
Unlike bacon, however, theyre no good once youve cooked them. This
guide will help you avoid any accidental LED barbecues! First things first,
though. What exactly is this LED thing everyones talking about?
LEDs (thats ell-ee-dees) are a particular type of diode that convert
electrical energy into light. In fact, LED stands for Light Emitting Diode. (It
does what it says on the tin!) And this is reflected in the similarity between
the diode and LED schematic symbols:

Resources and Going Further

Comments

View Paginated
Print

Tags
COMPON E N TS
E L E CTRI C A L E N GI N E E RI N G
TE CH N OL OGY

License
tutorials are CC BY-NC-SA 3.0

In short, LEDs are like tiny lightbulbs. However, LEDs require a lot less
power to light up by comparison. Theyre also more energy efficient, so they
dont tend to get hot like conventional lightbulbs do (unless youre really

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

2 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

pumping power into them). This makes them ideal for mobile devices and
other low-power applications. Dont count them out of the high-power game,
though. High-intensity LEDs have found their way into accent lighting,
spotlights and even automotive headlights!
Are you getting the craving yet? The craving to put LEDs on everything?
Good, stick with us and well show you how!

Suggested Reading
Here are some other topics that will be discussed in this tutorial. If you are
unfamiliar with any of them, please have a look at the respective tutorial
before you go any further.
What is Electricty?
What is a Circuit?
Voltage, Current, Resistance, and Ohms Law
Metric Prefixes and SI Uints
Electric Power
Polarity
Diodes

How to Use Them

So youve come to the sensible conclusion that you need to put LEDs on
everything. We thought youd come around. Lets go over the rule book:

1) Polarity Matters
In electronics, polarity indicates whether a circuit component is symmetric
or not. LEDs, being diodes, will only allow current to flow in one direction.
And when theres no current-flow, theres no light. Luckily, this also means
that you cant break an LED by plugging it in backwards. Rather, it just wont
work.

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

3 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

The positive side of the LED is called the anode and is marked by having
a longer lead, or leg. The other, negative side of the LED is called the
cathode. Current flows from the anode to the cathode and never the
opposite direction. A reversed LED can keep an entire circuit from
operating properly by blocking current flow. So dont freak out if adding an
LED breaks your circuit. Try flipping it around.

2) Moar Current Equals Moar Light


The brightness of an LED is directly dependent on how much current it
draws. That means two things. The first being that super bright LEDs drain
batteries more quickly, because the extra brightness comes from the extra
power being used. The second is that you can control the brightness of an
LED by controlling the amount of current across it. But, setting the mood
isnt the only reason to cut back your current.

3) There is Such a Thing as Too Much Power


If you connect an LED directly to a current source it will try to dissipate as
much power as its allowed to draw, and, like the tragic heroes of olde, it will
destroy itself. Thats why its important to limit the amount of current flowing
across the LED.
For this, we employ resistors. Resistors limit the flow of electrons in the
circuit and protect the LED from trying to draw too much current. Dont
worry, it only takes a little basic math to determine the best resistor value to
use. You can find out all about it in our resistor tutorial!
Dont let all of this math scare you, its actually pretty hard to mess things
up too badly. In the next section, well go over how to make an LED circuit
without getting your calculator.

LEDs Without Math


Before we talk about how to read a datasheet, lets hook up some LEDs.
After all, this is an LED tutorial, not a reading tutorial.
Its also not a math tutorial, so well give you a few rules of thumb for getting
LEDs up and running. As youve probably put together from the info in the
last section, youll need a battery, a resistor and an LED. Were using a
battery as our power source, because theyre easy to find and they cant
supply a dangerous amount of current.
The basic template for an LED circuit is pretty simple, just connect your

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

4 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

battery, resistor and LED in series. Like this:

A good resistor value for most LEDs is 330 Ohms. You can use the
information from the last section to help you determine the exact value you
need, but this is LEDs without math So, start by popping a 330 Ohm
resistor into the above circuit and see what happens.
The interesting thing about resistors is that theyll dissipate extra power as
heat, so if you have a resistor thats getting warm, you probably need to go
with a smaller resistance. If your resistor is too small, however, you run the
risk of burning out the LED! Given that you have a handful of LEDs and
resistors to play with, heres a flow chart to help you design your LED
circuit by trial and error:

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

5 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Another way to light up an LED is to just connect it to a coin cell battery!


Since the coin cell cant source enough current to damage the LED, you
can connect them directly together! Just push a CR2032 coin cell between
the leads of the LED. The long leg of the LED should be touching the side of
the battery marked with a +. Now you can wrap some tape around the
whole thing, add a magnet, and stick it to stuff! Yay for throwies!

Of course, if youre not getting great results with the trial and error
approach, you can always get out your calculator and math it up. Dont

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

6 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

worry, its not hard to calculate the best resistor value for your circuit. But
before you can figure out the optimal resistor value, youll need to find the
optimal current for your LED. For that well need to report to the
datasheet

Get the Details


Dont go plugging any strange LEDs into your circuits, thats just not
healthy. Get to know them first. And how better than to read the datasheet.
As an example well peruse the datasheet for our Basic Red 5mm LED.

LED Current
Starting at the top and making our way down, the first thing we encounter is
this charming table:

Ah, yes, but what does it all mean?


The first row in the table indicates how much current your LED will be able
to handle continuously. In this case, you can give it 20mA or less, and it will
shine its brightest at 20mA. The second row tells us what the maximum
peak current should be for short bursts. This LED can handle short bumps
to 30mA, but you dont want to sustain that current for too long. This
datasheet is even helpful enough to suggest a stable current range (in the
third row from the top) of 16-18mA. Thats a good target number to help you
make the resistor calculations we talked about.
The following few rows are of less importance for the purposes of this
tutorial. The reverse voltage is a diode property that you shouldnt have to
worry about in most cases. The power dissipation is the amount of power in
milliWatts that the LED can use before taking damage. This should work
itself out as long as you keep the LED within its suggested voltage and
current ratings.

LED Voltage
Lets see what other kinds of tables theyve put in here Ah!

This is a useful little table! The first row tells us what the forward voltage
drop across the LED will be. Forward voltage is a term that will come up a
lot when working with LEDs. This number will help you decide how much
voltage your circuit will need to supply to the LED. If you have more than
one LED connected to a single power source, these numbers are really
important because the forward voltage of all of the LEDs added together

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

7 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

cant exceed the supply voltage. Well talk about this more in-depth later in
the delving deeper section of this tutorial.

LED Wavelength
The second row on this table tells us the wavelength of the light.
Wavelength is basically a very precise way of explaining what color the
light is. There may be some variation in this number so the table gives us a
minimum and a maximum. In this case its 620 to 625nm, which is just at the
lower red end of the spectrum (620 to 750nm). Again, well go over
wavelength in more detail in the delving deeper section.

LED Brightness
The last row (labeled Luminous Intensity) is a measure of how bright the
LED can get. The unit mcd, or millicandela, is a standard unit for
measuring the intensity of a light source. This LED has an maximum
intensity of 200 mcd, which means its just bright enough to get your
attention but not quite flashlight bright. At 200 mcd, this LED would make a
good indicator.

Viewing Angle

Next, weve got this fan-shaped graph that represents the viewing angle of
the LED. Different styles of LEDs will incorporate lenses and reflectors to
either concentrate most of the light in one place or spread it as widely as
possible. Some LEDs are like floodlights that pump out photons in every
direction; Others are so directional that you cant tell theyre on unless
youre looking straight at them. To read the graph, imagine the LED is
standing upright underneath it. The spokes on the graph represent the
viewing angle. The circular lines represent the intensity by percent of
maximum intensity. This LED has a pretty tight viewing angle. You can see
that looking straight down at the LED is when its at its brightest, because
at 0 degrees the blue lines intersect with the outermost circle. To get the
50% viewing angle, the angle at which the light is half as intense, follow the
50% circle around the graph until it intersects the blue line, then follow the
nearest spoke out to read the angle. For this LED, the 50% viewing angle is
about 20 degrees.

Dimensions

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

8 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Finally, the mechanical drawing. This picture contains all of the


measurements youll need to actually mount the LED in an enclosure!
Notice that, like most LEDs, this one has a small flange at the bottom. That
comes in handy when you want to mount it in a panel. Simply drill a hole the
perfect size for the body of the LED, and the flange will keep it from falling
through!
Now that you know how to decipher the datasheet, lets see what kind of
fancy LEDs you might encounter in the wild

Types of LEDs
Congratulations, you know the basics! Maybe youve even gotten your
hands on a few LEDs and started lighting stuff up, thats awesome! How
would you like to step up your blinky game? Lets talk about makin' it fancy.
Heres the cast of characters:

RGB (Red-Green-Blue) LEDs are actually three LEDs in one! But that
doesnt mean it can only make three colors. Because red, green, and blue
are the additive primary colors, you can control the intensity of each to
create every color of the rainbow. Most RGB LEDs have four pins: one for
each color and a common pin. On some, the common pin is the anode, and
on others, its the cathode.

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

9 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Some LEDs are smarter than others. Take the flashing LED, for example.
Inside these LEDs, theres actually an integrated circuit that allows the LED
to blink without any outside controller. Simply power it up and watch it go!
These are great for projects where you want a little bit more action but dont
have room for control circuitry. There are even RGB flashing LEDs that
cycle through thousands of colors!

SMD LEDs arent so much a specific kind of LED but a package type. As
electronics get smaller and smaller, manufacturers have figured out how to
cram more components in a smaller space. SMD (Surface Mount Device)
parts are tiny versions of their standard counterparts. SMD LEDs come in
several sizes, from fairly large to smaller than a grain of rice! Because
theyre so small, and have pads instead of legs, theyre not as easy to work
with, but if youre tight on space they might be just what the doctor ordered.

High-Power LEDs, from manufacturers like Luxeon and CREE, are crazy
bright. Generally, an LED is considered High-Power if it can dissipate 1
Watt or more of power. These are the fancy LEDs that you find in really
nice flashlights. Arrays of them can even be built for spotlights and
automobile headlights. Because theres so much power being pumped
through the LED, these often require heatsinks. A heatsink is basically a
chunk of heat conducting metal with lots of surface area whose job is to
transfer as much waste heat into the surrounding air as possible.
High-Power LEDs can generate so much waste heat that theyll damage
themselves without proper cooling. Dont let the term waste heat fool you,
though, these devices are still incredibly efficient compared to conventional
bulbs.

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

10 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

There are even LEDs that emit light outside of the normal visible spectrum.
You probably use Infrared LEDs every day, for instance. Theyre used in
things like TV remotes to send small pieces of information in the form of
invisible light! On the opposite end of the spectrum you can also get
Ultraviolet LEDs. Ultraviolet LEDs will make certain materials fluoresce, just
like a blacklight! Theyre also used for disinfecting surfaces, because many
bacteria are sensitive to UV radiation.

With fancy LEDs like these at your disposal, theres no excuse for leaving
anything un-illuminated. However, if your thirst for LED knowledge hasnt
been slaked, then read on, and well get into the nitty-gritty on LEDs, color,
and luminous intensity!

Delving Deeper
So youve graduated from LEDs 101 and you want more? Oh, dont worry,
weve got more. Lets start with the science behind what makes LEDs
tick err blink. Weve already mentioned that LEDs are a special kind of
diode, but lets delve a little deeper into exactly what that means:
What we call an LED is really the LED and the packaging together, but the
LED itself is actually tiny! Its a chip of semiconductor material thats doped
with impurities which creates a boundary for charge carriers. When current
flows into the semi-conductor, it jumps from one side of this boundary to the
other, releasing energy in the process. In most diodes that energy leaves
as heat, but in LEDs that energy is dissipated as light!
The wavelength of light, and therefore the color, depends on the type of
semiconductor material used to make the diode. Thats because the energy
band structure of semiconductors differs between materials, so photons are
emitted with differing frequencies. Heres a table of common LED
semiconductors by frequency:

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

11 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Truncated table of semiconductor materials by color. The full table is


available on the Wikipedia entry for LED
While the wavelength of the light depends on the band gap of the
semiconductor, the intensity depends on the amount of power being pushed
through the diode. We talked about luminous intensity a little bit in a
previous section, but theres more to it than just putting a number on how
bright something looks.
The unit for measuring luminous intensity is called the candela, although
when youre talking about the intensity of a single LED youre usually in the
millicandela range. The interesting thing about this unit is that it isnt really a
measure of the amount of light energy, but an actual measure of
brightness. This is achieved by taking the power emitted in a particular
direction and weighting that number by the luminosity function of the light.
The human eye is more sensitive to some wavelengths of light than others,
and the luminosity function is a standardized model that accounts for that
sensitivity.
The luminous intesity of LEDs can range from the tens to the tens-ofthousands of millicandela. The power light on your TV is probably about 100
mcd, whereas a good flashlight might be 20,000 mcd. Looking straight into
anything brighter than a few thousand millicandela can be painful; dont try
it.

Forward Voltage Drop

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

12 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Oh, I also promised that wed talk about the concept of Forward Voltage
Drop. Remember when we were looking at the datasheet and I mentioned
that the Forward Voltage of all of your LEDs added together cant exceed
your system voltage? This is because every component in your circuit has
to share the voltage, and the amount of voltage that every part uses
together will always equal the amount thats available. This is called
Kirchhoffs Voltage Law. So if you have a 5V power supply and each of your
LEDs have a forward voltage drop of 2.4V then you cant power more than
two at a time.
Kirchhoffs Laws also come in handy when you want to approximate the
voltage across a given part based on the Forward Voltage of other parts.
For instance, in the example I just gave theres a 5V supply and 2 LEDs
with a 2.4V Forward Voltage Drop each. Of course we would want to
include a current limiting resistor, right? How would you find out the voltage
across that resistor? Its easy:

5 (System Voltage) = 2.4 (LED 1) + 2.4 (LED 2) +


Resistor
5 = 4.8 + Resistor
Resistor = 5 - 4.8
Resistor = 0.2
So there is .2V across the resistor! This is a simplified example and it isnt
always this easy, but hopefully this gives you an idea of why Forward
Voltage Drop is important. Using the voltage number you derive from
Kirchhoffs Laws you can also do things like determine the current across a
component using Ohms Law. In short, you want your system voltage
equal to the expected forward voltage of your combined circuit
components.

Resources and Going Further


Youve made it! You know, like, almost everything about LEDs. Now go
forth and put LEDs on whatever you please!
If youd like to learn more about some LED related topics, visit these other
tutorials:
Light
IR Communication
RGB Panel Hookup Guide
Das Blinken Top Hat
LED Display Driver Hookup Guide
Interactive Hanging LED Array Create a giant LED array driven by
the Arduino Pro Mini.

And now a dramatic reenactment of an LED being over powered and


burning itself out:

10/21/2014 12:12 AM

Light-emitting Diodes (LEDs) - learn.sparkfun.com

13 of 13

https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds

Yeah its not spectacular.


S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:12 AM

Metric Prefixes and SI Units - learn.sparkfun.com

1 of 6

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

Metric Prefixes and SI Units


C ON TR IBU TO R S:

JO R D A ND E E

Sections

S H A RE

Overview

Overview
Metric Prefixes are incredibly useful for describing quantities of the
International System of Units (SI) in a more succinct manner.
When exploring the world of electronics, these units of measurement are
very important and allow people from all over the world to communicate and
share their work and discoveries. Some common units used in electronics
include voltage for electrical potential difference, ampere for electrical
current, watts for power, farad for capacitance, henrys for inductance, and
ohms for resistance.

SI Units
The Prefixes
Conversion
Bits and Bytes
Practice

This tutorial will not only go over some of the most commonly used units in
electronics but will also teach you the metric prefixes that help describe all
of these base units in quantities ranging from the insanely large to the
incredibly small.

Practice Answers

Suggested Reading

Comments

If you would like to know more about the components that use the units and
prefixes described in this tutorial, check out some of these related tutorials.

View Paginated

Voltage, Current, Resistance, and Ohms Law


Capacitors
Resistors
You should also be familiar with binary in order to help you understand
binary prefixes.

Going Further

Print

Tags
CON C E PTS

Binary

SI Units
Weve been measuring stuff for millennia, and our units used for those
measures have been evolving since then. There are now dozens of units to
describe physical quantities. For example, length can be measured by the
foot, meter, fathom, chain, parsec, league, and so on. In order to better
communicate measurements, we needed a standardized system of units,
which every scientist and measurer could use to share their findings. This
standardized system has come to be called the <epic voice> International
System of Units </epic voice>, abbreviated SI.

E L E CTRI C A L E N GI N E E RI N G
PH Y SI CS

License
tutorials are CC BY-NC-SA 3.0

Physical SI Units

10/21/2014 12:15 AM

Metric Prefixes and SI Units - learn.sparkfun.com

2 of 6

Quantity
Time
Length

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

SI Unit Unit Abbreviation


second
s
meter
m

Mass
gram
Temperature kelvin
Force
newton

g
K
N

While we can still use units like feet or miles for distance (instead of
meters), liters to describe volume (instead of m3), and Fahrenheit or Celsius
to describe temperature (instead of K), the units above are a
standardized way for every scientist to share their measurements. Using
the units above means everyone is speaking the same language.

Common Electronics Units


In dealing with electronics, there are a handful of units well be encountering
more often than others. These include:
Quantity
SI Unit Unit Abbreviation
Electric Potential Difference (Voltage) volts
V
Electric Current
ampere
A
Power
Energy/Work/Heat
Electric Charge

watt
joule
coulomb

W
J
C

Resistance
Capacitance

ohm
farad

Inductance
Frequency

henry
hertz

H
Hz

Now that we know the units, lets look at how they can be augmented with
prefixes to make them even more usable!

The Prefixes
When first learning about metric prefixes, chances are you were taught
these six prefixes first:
Prefix (Symbol)

Power

Numeric Representation

kilo (k)
hecto (h)
deka (da)

103
102
101

1,000
100
10

no prefix
deci (d)
centi (c)

100
10-1
10-2

1 unit
0.1
0.01

milli (m)

10-3

0.001

These are what well consider the standard six prefixes taught in most High
School science courses. You may have even learned a fun mnemonic to go
along with these such as Kangaroos Have Dirty Underwear During Cold
Months. However, as youll soon see, when learning about electronics and
computer science, the range of prefixes well exceeds the standard six.
While these prefixes cover a rang of 10-3 to 103, many electronic values
can have a much larger range.

10/21/2014 12:15 AM

Metric Prefixes and SI Units - learn.sparkfun.com

3 of 6

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

Describing the Large


Prefix (Symbol)

Power

Numeric Representation

yotta (Y)
zetta (Z)

1024
1021

1 septillion
1 sextillion

exa (E)
peta (P)
tera (T)

1018
1015
1012

1 quintillion
1 quadrillion
1 trillion

giga (G)
mega (M)
kilo (k)

109
106
103

1 billion
1 million
1 thousand

no prefix

100

1 unit

These above prefixes dramatically help describe quanities of units in large


amounts. Instead of saying 3,200,000,000 Hertz, you can say 3.2
GigaHertz, or 3.2 GHz for shorthand written notation. This allows us to
describe incredibly large numbers of units succinctly. There are also
prefixes for helping communicate tiny numbers as well.

Describing the Small


Prefix (Symbol)
no prefix

Power
100

Numeric Representation
1 unit

milli (m)
micro ()
nano (n)

10-3
10-6
10-9

1 thousandth
1 millionth
1 billionth

pico (p)
femto (f)

10-12
10-15

1 trillionth
1 quadrillionth

atto (a)
zepto (z)
yocto (y)

10-18
10-21
10-24

1 quintillionth
1 sextillionth
1 septillionth

Now, instead one trillionth of a second, it can be referred to as a


picosecond. One thing to notice about the prefixes for small values, is that
their shorthand notations are all lower case while the large number prefixes
are upper case (with the exception of kilo-*, hecto- and deca-). This allows
you to distinguish between the two when they use the same letter. As an
example, one mW (milliwatt) does not equal one MW (megawatt).
*Note: Since the upper case K was already used to describe Kelvins, a
lower case k was chosen to represent the prefix kilo-. As youll see in the
Bits and Bytes section, there is also some confusion with k and K when
dealing with the binary (base 2) prefixes.

Conversion
The beautiful thing about these metric prefixes is that, once you get the
hang of conversion between a few of them, translating that ability to all the
other prefixes is easy.
As a first simple example, lets translate 1 Ampere (A) into smaller values. A
milliampere is 1 thousandth of the unit Ampere hence 1 Ampere is equal to
1000 milliamperes. Going further, 1 milliampere is equivalent to 1000
microamperes and so on. Going in the opposite direction, 1 Ampere is .001
Kiloampere, or 1000 Amperes is 1 Kiloampere. Now thats a lot of current!

10/21/2014 12:15 AM

Metric Prefixes and SI Units - learn.sparkfun.com

4 of 6

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

As you may have noticed, switching between prefixes is the same as


moving the decimal point over by 3 places. This is also the same as
multiplying or dividing by 1000. When youre going up to a larger prefix, from
Kilo to Mega for example, the decimal place is moved three places to the
left. 100,000 Kilowatts equals 100 Megawatts. 10 Kilowatts equals .01
Megawatts. Mega is the prefix right above Kilo so regardless of whether we
are talking about Watts, Amperes, Farads, or whatever unit, the movement
of the decimal place by three positions to the left still works when moving up
a prefix.
When moving down a prefix, lets say from nano- to pico-, the decimal place
is moved three places to the right. 1 nanoFarad equals 1000 picoFarads. .5
nanoFarad equals 500 picoFarads. Heres a short list so you can see the
pattern:
1
1
1
1
1

Giga- = 1000 MegaMega- = 1000 KiloKilo- = 1000 units


unit = 1000 millimilli- = 1000 micro-

See the trend? Each prefix is a thousand times larger than the previous.
While a little overwhelming at first, translation from one prefix to another
eventually becomes second nature.

Bits and Bytes


Working with bits and bytes can cause a bit confusion (pun intended). Since
computers work with base 2 numbers instead of base 10, it is often unclear
which number base one is referring to when using the metric prefixes. For
example, 1 Kilobyte is often used to mean 1000 bytes (base 10), or it can
be used to represent 1024 bytes (base 2), resulting in misunderstandings.
To eliminate these mix-ups, the International Electrotechnial Commision
came up with some new prefixes for the base 2 bits and bytes. These are
referred to as binary prefixes.
Prefix (Symbol)
exbi- (Ei-)
pebi- (Pi-)

Power
260
250

Numeric Representation
1,152,921,504,606,846,976
1,125,899,906,842,624

tebi- (Ti-)
gibi (Gi-)
mebi- (Mi-)

240
230
220

1,099,511,627,776
1,073,741,824
1,048,576

kibi- (Ki-)
no prefix

210
20

1,024
1 bit or byte

Adopting this would mean 1 Megabyte = 1000 Kilobytes while 1 Mebibyte


equals 1024 Kibibytes. Essentially for bits and bytes, each jump in prefix
would be a multiple of 1024 (210) instead of 1000 (103). Unfortunately, this
system is not widely used in practice, so anytime you hear a number of
bytes or bits, you have to wonder if they are talking about them in base 2 or
base 10.
Hard drive companies and others typically sell products in base 10 as it
makes it sound larger. A 1 Terabyte hard drive will turn out to actually be
about 931.3 Gibibytes.
This is where we run into the upper case and lower case k situation. The

10/21/2014 12:15 AM

Metric Prefixes and SI Units - learn.sparkfun.com

5 of 6

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

proper prefix for kibi if Ki. However, it will sometimes appear as just and
upper case K, which, again, represents temperature in Kelvins. So, any
time you hear the word Kilobyte, you still have to wonder if it signifies 1000
bytes (base 10) or 1024 bytes (base 2). On the other hand, if you see the
term kibibyte, you know for sure its talking about the base 2 version
interpretation of digital storage (1024 bytes).

Converting Bits to Bytes and Bytes to Bits


Weve covered converting bits and bytes to larger or smaller numbers of
each, but there is also the matter of converting bits to bytes and vise versa.
Remember that 1 Byte is equal to 8 bits (a majority of the time), and one bit
is equal to 0.125 bytes (or 1/8). Granted, there are many orders of
magnitude pertaining to bits, but byte is typically used most frequently. The
practice of converting between one and the other is not all that common, but
it is still useful information when dealing with electronics, especially when it
comes to memory. For example, you could be writing code that stores
individual bits, but your memory is defined as bytes.

Practice
Now for some practice exercises. Well use standard abreviations for each
unit type well convert:
A for Amperes
V for Volts
W for Watts
Hz for Hertz
F for Farads
H for Henrys
for Ohms
s for Seconds
B for Bytes
b for bits

Conversion Example:
Convert: 400 mA to A
Answer: 400 mA = .4 A

Convert:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

50 mA to A
10 nF to pF
500 kW to W
.01 mV to V
20,000 k to M
4680 MHz to GHz
4 TiB to GiB
200 Mb to kb
.00007 s to s
1450 nH to H

Practice Answers
1. .05 A
2. 10,000 pF

10/21/2014 12:15 AM

Metric Prefixes and SI Units - learn.sparkfun.com

6 of 6

3.
4.
5.
6.
7.
8.
9.
10.

https://learn.sparkfun.com/tutorials/metric-prefixes-and-si-units

500,000 W
10 V
20 M
4.68 GHz
4096 GiB
200,000 kb
70 s
1.45 H

Soon, switching between prefixes when needed becomes very quick.

Going Further
Being able to convert numbers to the best prefix depending on the size of
the number is an important skill to have. It allows you to avoid really long
and messy numbers like 5,600,000 or .000000002. Using 5.6M or 2n allows
you to convey the information faster and in a much tidier and easier to read
format.
Now that you are familiar with the metric prefixes, consider taking a look at
our How to Use a Multimeter tutorial. Using a multimeter requires a good
understanding of all the prefixes since your measurements will often show
up as such.

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:15 AM

Diodes - learn.sparkfun.com

1 of 14

https://learn.sparkfun.com/tutorials/diodes

STA RT A PROJ E CT
WORK SHOPS

S H OP
E D U BL OG

LEARN

FORUM

RE SOURCE S

DAT A

TU TORI A L S

CL A SSE S

HE L L O, SE L V A N
YOU R A CCOU NT

CA L E ND A R

search...

CON TA CT

Diodes
C ON TR IBU TO R S:

JI MB0

Sections

S H A RE

Introduction

Introduction
Once you graduate from the simple, passive components that are resistors,
capacitors, and inductors, its time to step on up to the wonderful world of
semiconductors. One of the most widely used semiconductor components
is the diode.

Ideal Diodes
Real Diode Characteristics
Types of Diodes
Diode Applications
Resources and Going Further

In this tutorial well cover:


What is a diode!?
Theory of diode operation
Important diode properties
Different types of diodes
What diodes look like
Typical diode applications

Suggested Reading
Some of the concepts in this tutorial build on previous electronics
knowledge. Before jumping into this tutorial consider reading (at least
skimming) these first:
What is Electricity
Voltage, Current, Resistance, and Ohms Law
What is a Circuit
Series vs. Parallel
How to Use A Multimeter

Comments

View Paginated
Print

Tags
COMPON E N TS
E L E CTRI C A L E N GI N E E RI N G
TE CH N OL OGY

License
tutorials are CC BY-NC-SA 3.0

Ideal Diodes
The key function of an ideal diode is to control the direction of current-flow.
Current passing through a diode can only go in one direction, called the
forward direction. Current trying to flow the reverse direction is blocked.
Theyre like the one-way valve of electronics.
If the voltage across a diode is negative, no current can flow*, and the ideal
diode looks like an open circuit. In such a situation, the diode is said to be

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

2 of 14

https://learn.sparkfun.com/tutorials/diodes

off or reverse biased.


As long as the voltage across the diode isnt negative, itll turn on and
conduct current. Ideally* a diode would act like a short circuit (0V across it)
if it was conducting current. When a diode is conducting current its forward
biased (electronics jargon for on).

The current-voltage relationship of an ideal diode. Any negative voltage


produces zero current an open circuit. As long as the voltage is
non-negative the diode looks like a short circuit.

Ideal Diode Characteristics


Operation Mode On (Forward biased)Off (Reverse biased)
Current Through
Voltage Across
Diode looks like

I>0
V=0
Short circuit

I=0
V<0
Open circuit

Circuit Symbol
Every diode has two terminals connections on each end of the
component and those terminals are polarized, meaning the two terminals
are distinctly different. Its important not to mix the connections on a diode
up. The positive end of a diode is called the anode, and the negative end is
called the cathode. Current can flow from the anode end to the cathode,
but not the other direction. If you forget which way current flows through a
diode, try to remember the mnemonic ACID: anode current in diode (also
anode cathode is diode).
The circuit symbol of a standard diode is a triangle butting up against a
line. As well cover in the later in this tutorial, there are a variety of diode
types, but usually their circuit symbol will look something like this:

The terminal entering the flat edge of the triangle represents the anode.
Current flows in the direction that the triangle/arrow is pointing, but it cant
go the other way.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

3 of 14

https://learn.sparkfun.com/tutorials/diodes

Above are a couple simple diode circuit examples. On the left, diode D1 is
forward biased and allowing current to flow through the circuit. In essence it
looks like a short circuit. On the right, diode D2 is reverse biased. Current
cannot flow through the circuit, and it essentially looks like an open circuit.

*Caveat! Asterisk! Not-entirely-true Unfortunately, theres no such thing


as an ideal diode. But dont worry! Diodes really are real, theyve just got a
few characteristics which make them operate as a little less than our ideal
model

Real Diode Characteristics


Ideally, diodes will block any and all current flowing the reverse direction, or
just act like a short-circuit if current flow is forward. Unfortunately, actual
diode behavior isnt quite ideal. Diodes do consume some amount of power
when conducting forward current, and they wont block out all reverse
current. Real-world diodes are a bit more complicated, and they all have
unique characteristics which define how they actually operate.

Current-Voltage Relationship
The most important diode characteristic is its current-voltage (i-v)
relationship. This defines what the current running through a component is,
given what voltage is measured across it. Resistors, for example, have a
simple, linear i-v relationshipOhms Law. The i-v curve of a diode, though,
is entirely non-linear. It looks something like this:

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

4 of 14

https://learn.sparkfun.com/tutorials/diodes

The current-voltage relationship of a diode. In order to exaggerate a few


important points on the plot, the scales in both the positive and negative
halves are not equal.
Depending on the voltage applied across it, a diode will operate in one of
three regions:
1. Forward bias: When the voltage across the diode is positive the
diode is on and current can run through. The voltage should be
greater than the forward voltage (VF) in order for the current to be
anything significant.
2. Reverse bias: This is the off mode of the diode, where the voltage
is less than VF but greater than -VBR. In this mode current flow is
(mostly) blocked, and the diode is off. A very small amount of current
(on the order of nA) called reverse saturation current is able to
flow in reverse through the diode.
3. Breakdown: When the voltage applied across the diode is very large
and negative, lots of current will be able to flow in the reverse
direction, from cathode to anode.

Forward Voltage
In order to turn on and conduct current in the forward direction, a diode
requires a certain amount of positive voltage to be applied across it. The
typical voltage required to turn the diode on is called the forward voltage
(VF). It might also be called either the cut-in voltage or on-voltage.
As we know from the i-v curve, the current through and voltage across a
diode are interdependent. More current means more voltage, less voltage
means less current. Once the voltage gets to about the forward voltage
rating, though, large increases in current should still only mean a very small
increase in voltage. If a diode is fully conducting, it can usually be assumed
that the voltage across it is the forward voltage rating.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

5 of 14

https://learn.sparkfun.com/tutorials/diodes

A multimeter with a diode setting can be used to measure (the minimum of)
a diodes forward voltage drop.
A specific diodes VF depends on what semiconductor material its made out
of. Typically, a silicon diode will have a VF around 0.6-1V. A
germanium-based diode might be lower, around 0.3V. The type of diode also
has some importance in defining the forward voltage drop; light-emitting
diodes can have a much larger VF, while Schottky diodes are designed
specifically to have a much lower-than-usual forward voltage.

Breakdown Voltage
If a large enough negative voltage is applied to the diode, it will give in and
allow current to flow in the reverse direction. This large negative voltage is
called the breakdown voltage. Some diodes are actually designed to
operate in the breakdown region, but for most normal diodes its not very
healthy for them to be subjected to large negative voltages.
For normal diodes this breakdown voltage is around -50V to -100V, or even
more negative.

Diode Datasheets
All of the above characteristics should be detailed in the datasheet for
every diode. For example, this datasheet for a 1N4148 diode lists the
maximum forward voltage (1V) and the breakdown voltage (100V) (among a
lot of other information):

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

6 of 14

https://learn.sparkfun.com/tutorials/diodes

A datasheet might even present you with a very familiar looking currentvoltage graph, to further detail how the diode behaves. This graph from the
diodes datasheet enlarges the curvy, forward-region part of the i-v curve.
Notice how more current requires more voltage:

That chart points out another important diode characteristic the maximum
forward current. Just like any component, diodes can only dissipate so
much power before they blow. All diodes should list maximum current,
reverse voltage, and power dissipation. If a diode is subject to more voltage
or current than it can handle, expect it to heat up (or worse; melt,
smoke,).
Some diodes are well-suited to high currents 1A or more others like the
1N4148 small-signal diode shown above may only be suited for around
200mA.

That 1N4148 is just a tiny sampling of all the different kinds of diodes there
are out there. Next well explore what an amazing variety of diodes there
are and what purpose each type serves.

Types of Diodes

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

7 of 14

https://learn.sparkfun.com/tutorials/diodes

Normal Diodes
Standard signal diodes are among the most basic, average, no-frills
members of the diode family. They usually have a medium-high forward
voltage drop and a low maximum current rating. A common example of a
signal diode is the 1N4148. Very general purpose, its got a typical forward
voltage drop of 0.72V and a 300mA maximum forward current rating.

A small-signal diode, the 1N4148. Notice the black circle around the
diode, that marks which of the terminals is the cathode.
A rectifier or power diode is a standard diode with a much higher
maximum current rating. This higher current rating usually comes at the cost
of a larger forward voltage. The 1N4001, for example, has a current rating
of 1A and a forward voltage of 1.1V.

A 1N4001 PTH diode. This time a gray band indicates which pin is the
cathode.
And, of course, most diode types come in surface-mount varieties as well.
Youll notice that every diode has some way (no matter how tiny or hard to
see) to indicate which of the two pins is the cathode.

Light-Emitting Diodes (LEDs!)


The flashiest member of the diode family must be the light-emitting diode
(LED). These diodes quite literally light up when a positive voltage is
applied.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

8 of 14

https://learn.sparkfun.com/tutorials/diodes

A handful of through-hole LEDs. From left to right: a yellow 3mm, blue


5mm, green 10mm, super-bright red 5mm, an RGB 5mm and a blue
7-segment LED.
Like normal diodes, LEDs only allow current through one direction. They
also have a forward voltage rating, which is the voltage required for them to
light up. The VF rating of an LED is usually larger than that of a normal diode
(1.2~3V), and it depends on the color the LED emits. For example, the rated
forward voltage of a Super Bright Blue LED is around 3.3V, while that of the
equal size Super Bright Red LED is only 2.2V.
Youll obviously most-often find LEDs in lighting applications. Theyre blinky
and fun! But more than that, their high-efficiency has lead to widespread
use in street lights, displays, backlighting, and much more. Other LEDs emit
a light that is not visible to the human eye, like infrared LEDs, which are the
backbone of most remote controls. Another common use of LEDs is in
optically isolating a dangerous high-voltage system from a lower-voltage
circuit. Opto-isolators pair an infrared LED with a photosensor, which allows
current to flow when it detects light from the LED. Below is an example
circuit of an opto-isolator. Note how the schematic symbol for the diode
varies from the normal diode. LED symbols add a couple arrows extending
out from the symbol.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

9 of 14

https://learn.sparkfun.com/tutorials/diodes

Schottky Diodes
Another very common diode is the Schottky diode. The semiconductor
composition of a Schottky diode is slightly different from a normal diode,
and this results in a much smaller forward voltage drop, which is usually
between 0.15V and 0.45V. Theyll still have a very large breakdown voltage
though.
Schottky diodes are especially useful in limiting losses, when every last bit
of voltage must be spared. Theyre unique enough to get a circuit symbol of
their own, with a couple bends on the end of the cathode-line.

Zener Diodes
Zener diodes are the weird outcast of the diode family. Theyre usually used
to intentionally conduct reverse current. Zeners are designed to have a
very precise breakdown voltage, called the zener breakdown or zener
voltage. When enough current runs in reverse through the zener, the
voltage drop across it will hold steady at the breakdown voltage.
Taking advantage of their breakdown property, Zener diodes are often used
to create a known reference voltage at exactly their Zener voltage. They
can be used as a voltage regulator for small loads, but theyre not really
made to regulate voltage to circuits that will pull significant amounts of

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

10 of 14

https://learn.sparkfun.com/tutorials/diodes

current.
Zeners are special enough to get their own circuit symbol, with wavy ends
on the cathode-line. The symbol might even define what, exactly, the
diodes zener voltage is. Heres a 3.3V zener diode acting to create a solid
3.3V voltage reference:

Photodiodes
Photodiodes are specially constructed diodes, which capture energy from
photons of light (see Physics, quantum) to generate electrical current. Kind
of operating as an anti-LED.

A BPW34 photodiode (not the quarter, the little thing on top of that). Get it
under the sun and it can generate about few Ws of power!.
Solar cells are the main benefactor of photodiode technology. But these
diodes can also be used to detect light, or even communicate optically.

Diode Applications
For such a simple component, diodes have a huge range of uses. Youll find
a diode of some type in just about every circuit. They could be featured in
anything from a small-signal digital logic to a high voltage power conversion
circuit. Lets explore some of these applications.

Rectifiers
A rectifier is a circuit that converts alternating current (AC) to direct current
(DC). This conversion is critical for all sorts of household electronics. AC
signals come out of your houses wall outlets, but DC is what powers most

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

11 of 14

https://learn.sparkfun.com/tutorials/diodes

computers and other microelectronics.


Current in AC circuits literally alternates quickly switches between running
in the positive and negative directions but current in a DC signal only runs
in one direction. So to convert from AC to DC you just need to make sure
current cant run in the negative direction. Sounds like a job for DIODES!
A half-wave rectifier can be made out of just a single diode. If an AC
signal, like a sine wave for example, is sent through a diode any negative
component to the signal is clipped out.

Input (red/left) and output (blue/right) voltage waveforms, after passing


through the half-wave rectifier circuit (middle).
A full-wave bridge rectifier uses four diodes to convert those negative
humps in the AC signal into positive humps.

The bridge rectifier circuit (middle), and the output wave form it creates
(blue/right).
These circuits are a critical component in AC-to-DC power supplies, which
turn the wall outlets 120/240VAC signal into 3.3V, 5V, 12V, etc. DC signals.
If you tore apart a wall-wart, youd most likely see a handful of diodes in
there, rectifying it up.

Can you spot the four diodes making a bridge rectifier in this wall-wart?

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

12 of 14

https://learn.sparkfun.com/tutorials/diodes

Reverse Current Protection


Ever stick a battery in the wrong way? Or switch up the red and black
power wires? If so, a diode might be to thank for your circuit still being alive.
A diode placed in series with the positive side of the power supply is called
a reverse protection diode. It ensures that current can only flow in the
positive direction, and the power supply only applies a positive voltage to
your circuit.

This diode application is useful when a power supply connector isnt


polarized, making it easy to mess up and accidentally connect the negative
supply to the positive of the input circuit.
The drawback of a reverse protection diode is that itll induce some voltage
loss because of the forward voltage drop. This makes Schottky diodes an
excellent choice for reverse protection diodes.

Logic Gates
Forget transistors! Simple digital logic gates, like the AND or the OR, can be
built out of diodes.
For example, a diode two-input OR gate can be constructed out of two
diodes with shared cathode nodes. The output of the logic circuit is also
located at that node. Whenever either input (or both) is a logic 1 (high/5V)
the output becomes a logic 1 as well. When both inputs are a logic 0
(low/0V), the output is pulled low through the resistor.

An AND gate is constructed in a similar manner. The anodes of both diodes


are connected together, which is where the output of the circuit is located.
Both inputs must be logic 1 forcing current to run towards the output pin and
pull it high also. If either of the inputs are low, current from the 5V supply
runs through the diode.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

13 of 14

https://learn.sparkfun.com/tutorials/diodes

For both logic gates, more inputs can be added by adding just a single
diode.

Flyback Diodes and Voltage Spike Suppression


Diodes are very often used to limit potential damage from unexpected large
spikes in voltage. Transient-voltage-suppression (TVS) diodes are specialty
diodes, kind of like zener diodes lowish breakdown voltages (often around
20V) but with very large power ratings (often in the range of kilowatts).
Theyre designed to shunt currents and absorb energy when voltages
exceed their breakdown voltage.
Flyback diodes do a similar job of suppressing voltage spikes, specifically
those induced by an inductive component, like a motor. When current
through an inductor suddenly changes, a voltage spike is created, possibly
a very large, negative spike. A flyback diode placed across the inductive
load, will give that negative voltage signal a safe path to discharge, actually
looping over-and-over through the inductor and diode until it eventually dies
out.

10/21/2014 12:16 AM

Diodes - learn.sparkfun.com

14 of 14

https://learn.sparkfun.com/tutorials/diodes

Thats just a handful of applications for this amazing little semiconductor


component.

Resources and Going Further


Now that youve gotten a handle on diodes, maybe youd like to further
explore more semiconductors:
Transistors
LEDs
Or learn about integrated circuits, like:
555 Timers
Operational Amplifiers
Shift Registers
Or discover some of the other common electronic components:
Resistors
Capacitors
Inductors
Voltage Regulators

S H A RE

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether
it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to
make the world of electronics more accessible.
In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful
world of embedded electronics.
About Us
About SparkFun
SparkFun Education
Feeds
Jobs
Contact

Help
Customer Service
Shipping
Return Policy
FAQ

Programs
Educator Discount
Hacker-in-Residence Program
Request SparkFun Sponsorship
Tell Us About Your Project
Sell Your Widget on SparkFun
Become a SparkFun Distributor

Community
Forum
SparkFun IRC Channel
Take the SparkFun Quiz
SparkFun Kickstarter Projects
Distributors

SparkFun Electronics / Niwot, Colorado / Customer Service / Site Map / Terms of Service / Privacy Policy
/ Desktop Site

10/21/2014 12:16 AM

S-ar putea să vă placă și