Working with Electronics Jyhpyng Wang 汪治平 中央研究院原子與分子科學研究所
Working with Electronics
Jyhpyng Wang
汪治平
中央研究院原子與分子科學研究所
Part 1: Circuit Construction
Circuit elements Tools Circuit diagrams Soldering and assembling Shielding and grounding Switch protection
Wires, heat-shrink tubes Resistors, capacitors, inductors, transformers Switches, relays Diodes and transistors Integrated circuits and sockets Varistors, fuses Light-emitting diode, neon lamps, meters Heat sink, mica sheet
Circuit Elements
American Wire Gauge (AWG)
number 18 20 22 24 26 28 30 32
diameter (mm)
1.02 0.81 0.65 0.51 0.40 0.32 0.25 0.20
resistance ohm/km
21 33 53 84 134 213 338 538
Color-Code of Resistors
Low-Power Resistor High-Power Resistor
Large resistors are often made of long coil of conductors. Watch out the parasitic inductance!
10-Turn Variable Resistor
3/4-Turn Variable Resistor
Electrolytic (1μF-10mF, for low-frequency circuits, polar, leaking, temperature sensitive, should be used with ceramic capacitors in parallel)
Tantalum (1μF-500μF, low-leakage electrolytic)
Polyester (Mylar) (1nF-10μF, general purpose, temperature sensitive)
Ceramic (10pF-0.1μF, high-frequency filtering, temperature sensitive)
Polystyrene, polypropylene (10pF-10μF, high quality)
Types of Capacitors
Electrolytic Capacitor Tantalum Capacitor
Polyester Capacitor
Polypropylene Capacitor
Ceramic Capacitor
InductorTransformer
Rotary Switch Relay
TransistorDiode
Integrated Circuit
Tools
Wire striper Soldering iron and solder Desoldering tool Multimeter Oscilloscope Drilling machine Punching machine
Soldering IronWire Striper
Desoldering tool
Multimeter
Oscilloscope
Screw drive with neon lamp
Neutral
HotGround
Hot
Neutral
Electric Outlets
Circuit diagrams
Symbols
Simulation and layout software
Circuit-board fabrication
resistor
capacitor
inductor
switch
ground
transistor
diode
voltage source
current source
transformer
operational amplifier
variable resistor
variable resistor
fuse
field-effect transistor
Zenerdiode
inverting amplifier
NAND gate
NOR gate
AND gate
OR gate
variable capacitor
AC power
lamp
quartz crystal
light emitting diode
Electronic Design Automation
Simulation:http://www.linear.com/designtools/software/index.jsp
Soldering
Solderable materials: Au, Ag, Cu, Sn Scraping off oxides Function of resin Bad contact Presoldering Desoldering
presoldering to ensure quality
bad contact
good contact
Soldering iron should touch both surfaces.
Assembling
Test boards Posts and angle brackets Test points Heat glue Wire stand Power line cramp Shielding Switch protection
Power Switches
PostTest Board
Angle Bracket
Wire StandBuzzer
Fuse Fuse Socket
Light-Emitting Diode Neon Lamp
Meter Battery Holder
Heat Sink Heat Conducting Paste
RG58 Coaxial CableRG174 Coaxial Cable
Power Line Cramp
Cable Tie
Heat Shrink Tube
SMA Connector
RCA Socket RCA Plug
F Connector BNC Connector
Electric-Field Shielding
Use coaxial cables (RG58, RG174)
Use shielded connectors (BNC, LEMO, RCA)
Use grounded metal case
Shielding and Grounding
transformer
3000 VAC
circuit
case
110 VAC
Ground Contamination
earth surface
underground water
hot neutral
ground
equipmentequipment
Lab A Lab B
leak
Supply and Grounding Order
Put high-power units closer to the power supply.
preamplifier
anti-coupling circuit
power amplifier
power supply
Magnetic-Field Shielding
Use twisted-pair wires to eliminate induction currents
Use cases made of high-μ metal
Avoid ground loop, use single-point grounding
Function of Twisted-Pair Wires
alternating magnetic field
induced current
alternating magnetic field
induced currents cancel
Switch Protectionspark
inductive load
100Ω
0.05μF
varistor
solutions
Part 2: Basic Electronics
Diodes and transistors Impedance and passive filters Amplifiers Active filters and oscillators Negative-feedback control Digital circuits Digital/analog interface
Semiconductors
P-type Si, Ge doped with B, Al, Ga, In
N-type Si, Ge doped with P, As, Sb
Current formed by moving holes
Current formed by moving electrons
Working Principle of Diodes
forward biasing
P N
holes electrons
conducting
reverse biasing
P N
holes electrons
non-conducting
Working Principle of Transistors
P N
B (base)
C (collector)E (emitter)
B (base)
C (collector)E (emitter)
N
electrons
Common-Emitter Amplifier
Vo
Vi
Vcc
RL
Rin
Ib
Ic
small signal gain =
Impedance of AC Circuit
capacitance
inductance
definition
Passive Filters
high-pass
low-pass
band-pass
Vi Vo
Vi Vo
Vi Vo
if
if
resonance:
Differentiators and Integrators
high-pass
low-pass
Vi Vo
Vi Vo if
if
equivalent circuit of coaxial cables
Impedance of Coaxial Cables
Assuming the impedance of an infinite-long coaxial cable is Z, and the inductance and capacitance per unit length is L and C respectively, then the impedance of a cable of lengthε(→0) in series with an infinite-long cable is still Z.
independent of
wrong method
correct methods
How to Connect Coaxial Cables
R
1MΩ load
signalsource
signalsource
1MΩ load
receiving end
T-connector
cable impedance, 50Ω for RG58 and RG174
receiving end
receiving end
receiving end
1MΩ load
signalsource
50Ω load
receiving end receiving
end
Input and Output Impedancevoltage source
current source
Zin
Zin
Zout
Zout
Impedance Matching
Zin = Zout
Zout
transmitting power =
Maximum transmitting power occurs at
Zin
Parasitic Capacitance and High-Frequency Response
Rout
Cp
Rout the smaller the better parasitic capacitance
VoVi
Compensation of High-Frequency Response
Rout
Cp
Rin
Cs
compensating condition:
compensating capacitor
parasitic capacitor
Rout Cs
Cp
Rin
input
output
DC Block and Low-Frequency Response
CbRin
Rin the larger the better
VoVi
Operational Amplifiers and Negative Feedback Control
V1
Vo
V2
+Vcc
-Vcc
V1
Vo
R1R2
V2
Active FiltersV1
Vo
CR
Low-frequency boost
if
V1
CR
Vo ifHigh-frequency boost
Frequency Response of Passive and Active Filters
Low-frequency boostHigh-frequency boost
High pass Low pass
f
f
f
f
Power Supply Rectifiers
without capacitor
with capacitor
120-Hz ripple
Regulated Power Supply
unregulated power supply regulated output =
Vz
without regulated circuit
Vout
with regulated circuitVout
Vz
Bistable Circuit
10kΩ
10kΩ
V+
V-
V+ or V-
Relaxation Oscillators
CR
10kΩ
10kΩ
Output switches when the capacitor is charged to V+/2 or discharged to V-/2
Vs
-Vs
Vs
-Vs
Vs /2
- Vs /2
Wien-Bridge Oscillators
CR
500Ω
C
R
Rl < 250Ω (1869 lamp)
ω = RC1
V1 Vo
V2
=Vo
V1
Vo
V2
= 3
low-distortion sinusoidal wave generation
is real and positive
with resistor with lamp
Basic TTL Digital-Circuit Blocks
+5V+5V
A
B
B = ~A
A
B
C
C= ~(A∩B) = (~A)∪(~B)
high (1): open circuit low (0): current flow in
inverter NAND gate
A∪B = ~[(~A)∩(~B)]
=
Decoder or DemultiplexerA A B B C C D D
0
1
9
demultiplexerinput
Encoder0 1 2 3 4 5 6 7
A
B
C
8 9
D
Multiplexerstrobe/enable A A B B
input 0
input 1
input 2
input 3
Bounceless Switch
Q
Q
Q
Q
1
1
1
01
00
1
1
01
0
Q
Q
1
0
0
10
1Q
Q
1
1
0
10
1
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1 ?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
0
1
0
1
1
1
01
0
?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
0
0
0
1
1
1
01
0
?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
0
1
0
1
1
1
01
0
?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
1
0
0
1
1
1
01
0
?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
0
1
0
1
1
1
11
1
?
Latch (Register)
Q
Q
S
R
clock
Sn Rn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
memorywrite-in
1 1
1
1
1
1
1
?
0
1 0
1 0
0 1
0 1
Faster gate wins.
J-K Master-Slave FLIP-FLOP
Jn Kn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
Qn1 1toggle
QJ
K
clock
preset
clear
Q
Q
master slaveCk
Pr
Cr
Q
Output changes state at clock’s falling edge.
Presetting a J-K FLIP-FLOP
QJ
K
clock
preset
clear
Q
Q
master slaveCk
Pr
Cr
Q
0
1
1
1
0
1
0
0
Presetting is done at clock’s rising edge.
Clearing a J-K FLIP-FLOP
QJ
K
clock
preset
clear
Q
Q
master slaveCk
Pr
Cr
Q
0
1
1
1
0
1
0
0
Clearing is done at clock’s rising edge.
Toggling a J-K FLIP-FLOP
Jn Kn Qn+1
Qn0 0
11 0
00 1
stay
set
reset
Qn1 1toggle
QJ
K
clock
preset
clear
Q
Q
master slaveCk
Pr
Cr
Q
1
1
1
0
0
1
1
0
0
1
this cyclenext cycle
Decade Counter
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
If any bit that goes into the NAND gate is reset, theCr disappears. Therefore Cr may be too short to clear all flip-flops.
unreliable clear!
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
Transition begins.
10 (earlier)1
1
01
10
10
10 10
Decade Counter
Decade Counter
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
Resetting.
10011
101
01 01
1(later)0
Decade Counter
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
A new cycle begins.
01 10
10 01
01
00
1
10
Decade Counter
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
Cr is latched.
10 0
0
1
1
1
1
Down Counter
Q
Q
J
K
pulse
Cr
Q
Q
J
K Cr
Q0
Q
Q
J
K Cr
Q1
Q
Q
J
K Cr
Q2 Q3
Ck Ck Ck Ck
Up/down Counter
pulseQ
Q
J
K Cr
Q0
Ck
Q
Q
J
K Cr
Q1
Ck
Q
Q
J
K Cr
Q2
Ck
Q
Q
J
K Cr
Q3
Ck
up/down
One-Bit Computer
input B
Instruction set: 0=add, 1=multiply
input A
instruction I
A*B (I=1)
A+B (I=0)
Series-In, Parallel Out
Q
Q
J
K Cr
Q
Q
J
K Cr
Q3
Q
Q
J
K Cr
Q2
Q
Q
J
K Cr
Q1 Q0
Ck Ck Ck Ck
clear
clock
series input
parallel output
Parallel-In, Series Out
Q
Q
J
K Cr
Q
Q
J
K Cr
Q
Q
J
K Cr
Q
Q
J
K Cr
Ck Ck Ck Ck
clock
series outputPr Pr Pr Pr
parallel input
Q3 Q2 Q1 Q0
R-2R Ladder D/A Converter
Vref
output
R R R
R
2R
2R2R2R2R
Servo A/D Converter
input
up/down counter
Q0
Q1
Q2
Q3
D/A converterclock
up/down
Digital-Analog Interface
analog to digital: Schmitt trigger + one-shot
digital to analog: pull-up resistor + buffer amplifier+5V
A
B
C
+5Vpull-up resistor (1-2 kΩ)
low-impedanceload
Schmitt Trigger
Vo
10k
Vi
+5V
10k
2.5V
input output
Schmitt Trigger with Hysteresis
Vo
10k
Vi
+5V
100k10k
2.5V
input output
Single-Shot Circuit
Vo
Vi R1R1
R
C
T = 0.69RC
T
0.7 V
-Vs
Vs
-Vs
2
Delay-Gate Generator
Vo
Vi
R1 C1
T1=0.69R1C1
Schmitt Trigger single-shot
R2 C2
single-shot
T1
trigger edge
trigger edge
T2=0.69R2C2trigger edge
T1
T1
trigger edge
T2
Part 3: Beyond Basics
Differential amplifiers Field-effect transistors Bootstrapping Power amplifiers Quartz oscillators Voltage controlled oscillators Phase detectors Phase-locked loops Frequency synthesis
Emitter Follower
Vo
Vi
Vcc
IB
RE
Biased Emitter Follower
Vo
Vi
Vcc
Ii
RE
R1
Vcc
R2
IB
Bootstrapping
Vo
Vi
Vcc
Ii
RE
R1
Vcc
R2
IB
R3
Push-Pull Power Amplifier
Vo
Vcc
R1
Vcc
R1
-Vcc
-Vcc
basic idea
Vi
Push-Pull Power Amplifier
Vo
Vi
Vcc
R
Vcc
-Vcc
The resistors reduce distortion and provide thermal stability.
Push-Pull Power Amplifier
Vo
VccR
Vcc
-Vcc
with bootstrapping
Vi
R
How to Become a Master
Try to repair broken electronics for others
Design and construct electronics for yourself
Read electronics catalogs and magazines
Read circuit diagrams of lab equipment
Visit the Guang-Hua Mall from time to time