Transistors, so far 2N3904 e b c b npn c e ules 1. Vc>Ve 2. b-e and b-e circuits ~ diodes 3. max values of Ic, Ib, Vce 4. if rules are obeyed, β I c = βi b ~100, but variable c b Ic conservation of current: Ib e Ie I e = I c + I b = βi b + I b = (1 + β) I b βi b
Simple view I e = (1 + β)i b V b = V e + 0.6 Vb in, small I b supply c e e Ve out large I follower: output voltage ~ same output current larger output resistance lower
Current Source 1) pick load current 2) pick emitter resistor and bias 3) set up base V divider Iout +10V load (e.g., led) 12k 1 5.6V 1mA ~5V 5kΩ 15k 2 want 1mA, pick 5V over 5k (keep power ~mw) make Ve ~ 1V for stability sets base at 5.6V given 10V supply, split to 5.6V to ignore base current/load... resistance into base ~ße divider s smaller
caveats: want divider stiff c.f. ße so Vb ~ constant can t push Ve below ground require Ve<Vc limits voltage drop across load to a bit under Vsupply still: very good & stable I source, simple +10V 1mA +10V 1mA 1 load δvin(t) 1 load 2 5kΩ 2 5kΩ programmable: add a signal at the base...
Signals: voltage & current varying in time sine ramp pulse noise resistor doesn t care capacitor follows I = C dv/dt e.g., differentiator / integrator circuits really analog signal processing
(a) feed resistor a sine wave it doesn t care V V 0 sin ωt (b) V V I I t
(a) V V 0 sin ωt C feed capacitor a sine wave... current is cosine! ~dv/dt charging/discharging power goes in & out (b) I V I V t
diodes are even funnier current in 1 direction load wires do not touch here
a b I positive voltage X V t d X c e load
I negative voltage e V t d X c X b a load
Voltage (Volts) 1.4 1.2 1.0 source voltage load current load voltage 0.8 0.6 0.4 0.2 0.0-0.2-0.4-0.6-0.8-1.0 0 5 10 15 20 time (a.u.)
look back at I source... but feed it with a sine wave 1 c δvin(t) C 1 c δvout(t) 2 e 2 e just use C to block any constant voltages (only time-varying gets through) we ll see later: filtering
static analysis: 1mA through 6k load base at 1.6V what happens for small change in base voltage? signal in 65k 0.2uF 6k +12V signal out V b V e fixed = δv e = δv b 10k 1k wiggle at base, emitter follows
+12V δv in = δv e, δi e δi c δi e = δv e / e = δv in / e signal in 65k 0.2uF 10k 6k 1k signal out δv out = δv c = δi c c = c e δv in! wiggle input, output wiggles c/e times larger (but inverted) common emitter amplifier, voltage gain of G = -c/e no, e can t just be zero. thermal drift, instability, distortion... and power limits
Some generic transistor circuits in fix b c e fix out b c e in out b c e in fix c b c e out out fix fix e fix follower Vin~Vout raises I lowers output I source fixing Vb fixes Ve fixing Ve fixes Ie fixing Ie fixes Ic switch Vb>Ve, valve opens allows I to flow from supply to c amplifier input fixes Ve Ve fixes Ic out/in ~ e/b
the comparator two inputs: V +, V- one output: V o if V +>V-, output is open if V +<V-, output is negative inputs output V- > V+ negative V+ > V- floating Vo +Vsupply V- - V+ + -Vsupply Vo V+ - V- which input is larger? -Vsupply
realization & abstraction out +Vsupply in 1 b c e V+ 1 2 Vo in 2 V- V- V+ - + +Vsupply Vo ideal comparator: inputs draw no current -Vsupply
typical comparator (e.g., LM311) GND V+ V- -Vee (supply) 1 2 3 4 + - 7 6 5 8 (supply) Vout balance/strobe balance come in double & quad packages (L339) what to do with them?
threshold detection Vin - + Vout Vout ={ V cc, Vin>Vcc/2 0, Vin>Vcc/2 divider ensures V+ = Vcc/2 (threshold) negative input: V- = Vin if Vin < Vcc/2, output is at negative supply (GND) if Vin > Vcc/2, output floating (pulled up by 10k to Vcc) V- could just be a switch/photo/transducer connected to Vcc! disadvantage: sharp threshold gives bouncing near transition. need some hysteresis...
zero crossing detector +Vsupply 20k Vin + - Vo if Vin > 0, output is floating but 20k to supply pulls up -Vsupply if Vin < 0, output is at -Vsupply but also pulled up ground neg supply, 0/1 sig
some uses for comparators switching/amp (drive base of transistor) A/D conversion & interfacing pulse width modulation threshold/level detection use of feedback allows much more - memory (flip-flop, last state?) - - oscillators (intermittent wipers) hysteresis - better regulation (thermostat)
relaxation oscillator C V- - WTF? V+ + -Vcc Vo use C charge as comparator input compare to fixed ref output feeds back to C
C V- - pull up to make output centered (else -Vcc to 0) V+ + Vo -Vcc feedback: Vo depends on V+ V+ is fixed by voltage divider at Vo/2 = (+/-)Vcc/2 since inputs draw no current, and C currents same C dv dt = V o V dv dt + V C = V o C
C dv dt + V C = V o C V- V+ - + -Vcc Vo general solution: V = A + Be t/c = V o + Be t/c (steady state, V-=Vo) V+ is fixed at Vcc/2; when V-<Vcc/2 output goes to -VCC this discharges C toward -Vcc and makes V+ = -Vcc/2 when V- reaches -Vcc/2: V-<V+ and output goes high (pull-up); this charges C once V- reaches Vcc/2 V+<V- so output goes low, discharging C... starts over
C V- - C cycles between -Vcc/2 and Vcc/2 this is a half period we know capacitor V(t)! V+ + -Vcc Vo at t=0, V- = -Vcc/2 time for V- = /2 is half period (T/2) V = V cc 3 2 V cce t/c V cc 2 = V cc 1 32 e (T/2)/C period is thus: T = 2C ln 3
C output stage - 10k 200 LM311 + Vo LED flasher /2 pick C~0.1-2 sec, ~10k-100k C ~ uf Vcc = 5V oscillator GND V+ V- -Vcc 1 2 3 4 + - 7 6 5 8 Vout
the lab build a relaxation oscillator to drive an LED or speaker LED: < 40Hz or so to see speaker: ~100Hz-10kHz to hear make Arduino count every Nth cycle