Search This Blog

Saturday 26 May 2012

Load Line: BJT signal gain amplification visualization









Some notes on the curves:
1.       DC biasing point - when there is no signal of interest, this is the amount the current through BJT , and Vo2 is the voltage at Vout. Choice of Vo2 is by design - affected by Vdd available, amount of signal gain required, quiescent power dissipation by BJT, linearity required...
2.       Base current deviate from DC biasing point following the signal of interest
3.       Base current changes will cause collector current to change according to curves shown as Ib1, Ib2, Ib3..., the current will cause voltage changes on Vout, choice of Rc will affect the magnitude of the Vout signal.
4.       Non-linear region of IV curve (Cut-Off region) - if Vout swing were to reach this area, the amplification of signal will be distorted. This will cause clipping on output signals, THD (3rd order harmonic distortion)…

Additional note about BJT:
1.       BJT is actually Current Controlled Current Source - Base current controls Collector (compare this to Mosfet - Voltage Controlled Current Source – Gate to Source voltage controls Drain current)
2.       Rc will determine the signal gain, DC biasing point and some other parameters.
3.       From Kirchhoff law (V, I)
a.       only interception of each Ib curve with the load line is possible for a given circuit
b.      so as Ib changes, the instantaneous Vc (collector voltage) will be the intersections of load line with that instantaneous Ib curve.


Wednesday 23 May 2012

Feedback loop element identification: Which is which? Non-Inverting Op amp circuit


General Control Loop block diagram:


Given schematic below, how to know which is which? Knowing which is which is critical, as it allows the use of theory to achieve the best result.






Equations that allowed us to identify corresponding blocks:
From simple voltage divider rule
vn = Ri/(Ri + Rf) * vout
eq 1
let α = Ri/(Ri+Rf)
vn = α * vout
eq 2
We see that vout is just opamp gain (Aamp) multiply by its input voltage
vout = (vp - vn) * Aamp
vout = (vin - α * vout) * Aamp
vout * ( 1 + α * Aamp) = vin * Aamp
vout / vin = Aamp / ( 1+ α * Aamp)
eq 3
From close loop equation of control theory:
vout/vin = TF = Aforward/(1 + Aforward*β)
eq 4
Comparing eq 3 with eq 4 , we see that
Aforward = Aamp
Aforward*β = α * Aamp
β = α = Ri/(Ri+Rf)
When loop gain (Aforward*β) is large enough, we see that
1 + Aforward*β ~= Aforward*β
TF = Aforward/ Aforward*β
TF = 1/β = (Ri + Rf)/Ri = 1 + (Rf/Ri)

Feedback loop element identification: Which is which for Inverting Opamp circuit?


General Control Loop block diagram:



Given schematic below, how to know which is which? Knowing which is which is critical, as it allows the use of theory to achieve the best result.




Equations that allowed us to identify corresponding blocks:

voltage at inverting pin of amp is just vin summed up with voltage drop across Ri

vn = vin + Ri * i
eq 1


since amp input is of high input impedance, current through Ri, Rf is just

i = (vout - vin) / (Ri + Rf)
eq 2


we see that vout is just opamp gain (Aamp) multiply by its input voltage

vout = (0 - vn) * Aamp

vout = - vn* Aamp
eq 3


eq 2 -> eq 1

vn = vin + Ri * (vout - vin) / (Ri + Rf)

let α = Ri/(Ri + Rf)

vn = vin + α * (vout - vin)

vn = (1-α)*vin + α * vout
eq 4


eq 4 -> eq 3

vout = - {(1-α)*vin + α * vout} * Aamp

vout = - {(1-α)*vin* Aamp + α * vout* Aamp}

vout * (1 + α*Aamp) = - {(1-α)*vin* Aamp}

vout/vin = - {(1-α)* Aamp} /(1 + α*Aamp)
eq 5


from close loop equation of control theory:

Vout/Vin = TF = Aforward/(1 + Aforward*β)
eq 6


comparing eq 6 with eq 5 , we see that

Aforward = - {Rf/(Ri+Rf)} *Aamp
eq 7

Aforward*β = α*Aamp
eq 8

and

β = α * Aamp/Aforward
re-arrange eq 8

β = { Ri/(Ri+Rf) } {- (Ri+Rf)/Rf }
substitue Aforward from eq 8

β = - Ri/Rf


when loop gain (Aforward*β) is large enough, we see that

1 + Aforward*β ~= Aforward*β

TF = Aforward/ Aforward*β

TF = 1/β = -Rf/Ri











































































































Saturday 19 May 2012

Application of load line - Photovoltaic Relay Control

A simple task:
Given a battery, a Photovoltaic relay (PVT312) with datasheet, and choice of resistor value, how to select the resistance such that the internal LED current is at a value that ensure output switch portion of the relay is ON properly? Assume Vdd is 2V.

Background study of the problem
1.       This is an Photovoltaic relay, to properly switch it “ON”, we must have a min LED current.
2.       From the datasheet, the switch characteristic is stated at test condition of 5mA LED current, so 5mA is the desired current, and given Vdd, we need to pick a Rin.
3.       From the datasheet, we know that the voltage drop across pin1, 2 (the internal LED) can vary a lot, at 5mA, it can be at 1.5V is the device is operated at -40degC, and only 0.8V at operating temperature of +85degC
4.       Since this blog is only meant for beginner, let's just assume our device is only to be operated at room temperature (about 25degC), and thus we only consider the typical curve which has about 1.2V of diode drop at LED current level of 5mA.



Solution method#1 (direct calculation)
1.       From the curve, we know that at desired LED current of 5mA, the voltage drop of LED is about 1.2V, so Rin = (Vdd - 1.2V)/5mA, if Vdd = 2V, then Rin = (2V-1.2V)/5mA = 160Ohm.
2.       This is really quite simply, and everybody can do it, but there is a better way that gives you a lot more "insight", the load line way...

Solution method#2 (graphical approach – load line)


Just by drawing the load line, we can easily estimate Rin = 2V/13mA = 153Ohm. And it is not much different from the method#1. The difference is about 100*(160-153)/160 = 4%. The slightly different values is due to approximation when reading the graph scale, but in actual world it hardly matters, as when the time passes (aging), or different batch of IC being use, some variances are inevitable.
On the bonus side, using load line we can easily see at extreme operating temperature the actual current about 4mA to 7mA. Without doing any calculation!!!

Sunday 13 May 2012

Derivation of load line

Derivation of load line:
1.       Let's say we know that we will always deal with some circuit form in which a voltage source, a resistor (linear element) will always be in series with another element which can be linear or non-linear. Then it makes sense to try to come up some sort of rules that can be easily applied in the encounters of such problem. To do this, refer to Figure1 above. Where X can be anything linear (such as resistor) and non-linear (diode, BJT...).
2.       If we consider the cases of Vx changing from 0 to Vdd, we can then draw the line of I versus Vx, and this line is our load line, with the slope equal to (-1/Rin). Where VRin is the voltage across Rin.

Load line when X block is a resistor:
3.       To ensure that this method makes sense, let block X be another resistor, Rx. Compare the value from typical normal derivation where I = Vdd / (Rin + Rx)), compare this result to the interception of two straight lines shown on the Figure 3 above (graphical approach), which can be seen as identical.

Load line when X block is a diode:
4.       Now to make things more relevant in real life, let's assume that X block is a diode and super-impose the diode IV curve on the diagram. Although there is no way for voltage across diode to reach Vdd (assuming Vforward of ~0.7V, Vdd of 3.3V or more), but we can still extend the load line till Vdd, creating some sort of asymptotes.



Example usage of load line:
Now, given a diode curve (Figure 4), if we need to pick a Rin value that allowed to circuit to have a bias current of Ibias, we just need to draw a straight line (load line) from x-axis Vdd to the point of diode curve that has the y-axis value of Ibias, then the y-axis intercept current, Io can be used to calculate Rin, with Rin = Vdd/Io.

Why do I want to talk about load line

A load line is used in graphic analysis of circuits, representing the constraint other parts of the circuit place on a non-linear device, like a diode or transistor. A load line represents the response of a linear circuit connected to the nonlinear device in question. The operating point is where the parameters of the nonlinear device and the parameters of the linear circuit match, according to how they are connected while still adhering to their internal systems.

It sounds simple, but for some reason it takes me years to really appreciate it and use it in the design works naturally. While I was still in school, I was taught to apply rules, plot out the load line, and use it to answer question. But in my mind, I always wonders about
1.       How does someone come up with the concept of load line?
2.       Why is it important? As I can still solve the circuit another way.

Not knowing the load line concept, but instead being forced upon to apply the rules blindly, my brain did what it must, memorized the question answering techniques, get in exams, score some pretty good marks, and completely forget about it in months after the exam.

Things that I intend to do blogging about load line:
1.       Derive load line based on actual need and basic concepts
2.       Relate real-life circuit design that applicable to load line.
3.       Shows the advantage it offers compared to other methods

Hopefully these few articles about load line will let the load line concept comes natural to the audience and hence allow application of load line comes in naturally when the need arises.


Friday 4 May 2012

Debugging - In Circuit R measurement

Shown below are the points for consideration when measuring resistance on board (no power applied). As it can be seen, the conclusion is that when you measured some resistance higher than expected, then mostly the resistor has the wrong value. And most of the time we can only compare the value to a known good board.