Search This Blog

Showing posts with label opamp. Show all posts
Showing posts with label opamp. Show all posts

Sunday, 26 May 2013

The Catches: Voltage follower that rings

In my first year doing circuit design – I was evaluating a circuit that contains a voltage follower op-amp – something that I didn’t quite happy with is the amount of overshoot on the step input. Digging through all the information – I found out that not op-amp are suitable for being a voltage follower. And in fact – for a voltage feedback op-amp to be used as voltage follower – it will state “unity gain stable” in the datasheet.
image
 
image
 
Lesson learnt –
There are certain amp that are not meant to be unity gain stable – mainly for fast response – read the datasheet before using them.





Opamp Level Shift & Scaling Circuit Analysis

image

Generally DAC output will be from 0V to Vref, and to get bipolar output we typically use this circuit that convert [0:Vref] -> [-Vref: Vref], with Rf = Ri.

But what else can this circuit do if we are able to tweak Rf, Ri? Can it gives Vo > Vref?

There are few ways to get the transfer function of this circuit block, namely:

  1. circuit simulation - overkilled for such a simply circuit - don't you think so?
  2. algebra manipulation - going to be tough for those not doing it for a while
  3. graphical analysis base on circuit inspection - quick and intuitive - my personal favourite

in this example, I'm going to shows you alternative #2, and #3, have a nice read-up!


The algebra way:

Vo = Vdac + i * Rf
Vo = Vdac + [(Vdac-Vref)/Ri] * Rf
Vo = Vdac*(1+Rf/Ri) - Vref*(Rf/Ri)

but it is time consuming to write Rf/Ri, let's just replace it by α

Vo = Vdac*(1+α) - Vref*α

but Vdac is a function of Vref, let Vdac = β*Vref, where 0<= β<=1

Vo = β*Vref*(1+α) - Vref*α
Vo = Vref* [β + α*β - α]

where
α = Rf/Ri
β = dacData/dacFullResolution

it is always good idea to drop in some number to verify nothings goes wrong in the algebra derivation, let's do it now

let α = Rf/Ri = 1
Vo = Vref* [2β - 1]
β = 0: Vo = -Vref
β = 1: Vo = Vref
which is expected

Now that we have the final equation, we can inspect the equation as ratio of Rf/Ri changes:

Rf/Ri = 0:

  • Vo = Vref*β

Rf/Ri = infinity:

  • from Vo = Vref* [β + α*β - α]
  • when β = 0 (Vdac = 0): Vo = negative infinity
  • when β = 1 (Vdac = Vref): Vo = Vref

Conclusion:

from general equation of y = m*x + c, this circuit configuration allows us to configure maximum m = +1 @ c = 0, minimum m = negative infinity @ c = negative infinity, and max Vout = Vref.

For example, you are not getting more that Vo = Vref regardless of what Ri, Rf values you used.

 


The Graphical Way:


image

Step#1:

Figuring out what is input, what is output:

  1. draw out XY axis
  2. acknowledge that we control dac output directly, hence x-axis is label as Vdac
  3. Vo is the output of circuit block - we want to know what happen to Vo as Vdac changes - thus Vo as label for y-axis

Draw out the xy boundaries by circuit inspection:

  1. from circuit inspection - dac output can only varies between 0V to Vref, thus we draw at vertical line at x = Vref.
  2. from circuit inspection - when Vdac = Vref:
    • since inputs of op-amp is essentially the same potential - the inverting input is at Vref,
    • there is no voltage drop across Ri, both side of Ri at Vref, thus i=0A, and since there is no voltage drop across Rf, Vo=Vref
    • thus draw a horizontal lines at y = Vref

image

Step#2:

Acknowledge there is essentially one variable to play around - that is, the ratio of Rf/Ri :

  1. from circuit inspection - consider the case Rf/Ri = 0, it means Ri = open and i=0, and the amp act as voltage follower , Vo = Vdac, from y = m*x + c, this gives m =1, c =0, draw a line that cross point (x,y) = (Vref, Vref), (0,0), this is one of our boundary.
  2. from circuit inspection - consider the case Rf/Ri = infinity, when Vdac =Vref, Vo = Vref, when Vdac is slightly less than Vref, Vo = negative infinity, draw a vertical lines at x = Vref.
  3. region bounded by the 2 lines above is the possible circuit function for this circuit configuration. For example, you are not getting more that Vo = Vref regardless of what Ri, Rf values you used.

Saturday, 11 May 2013

The Catches: My first encounter with Current Feedback Op-Amp

So to say, I was evaluating a circuit given in manufacturer’s reference circuit, being young and naïve (ignorant too), I just get the parts and put it in together – most of the time the circuit works – but when debugging one particular non-working circuit – something was not working accordingly.
So it was the time that I look at the datasheet of that amp – and found out that it was current feedback op-amp – not the assumed typical voltage amp – it turns out to be that current feedback op-amp are generally faster – and the behaviour differs as well.
for more details refer to wiki:
http://en.wikipedia.org/wiki/Current-feedback_operational_amplifier
Lesson Learnt:
Textbook op-amp circuit is generally voltage feedback op-amp – and there are much more in the market then what offered in text book.




Sunday, 3 February 2013

Debug – Inverting Op Amp

image
Let’s say you measured Vin = –1V, but Vout way off +1V, now what can be wrong? How do you debug it? Below are some suggestions for you to consider:
  • check the supply to see if the supplies are correct
  • visual inspect for
    • wrong polarity
    • wrong part (if manual assembly involved)
    • missing solder or “cold” solder
  • check if wrong resistors being loaded - power down – measure resistance of R1, R2 to see if any of R1, R2 is larger than 1KOhm – since this is in-circuit measurement – we don’t expect to see 1KOhm, but we definitely expect 1KOhm or less, since parallel resistance of any resistors is the minimum of those.
  • check if oscillation occurs - if everything looks good – get hold of a scope and confirmed there’s no oscillation on either pins mentioned above
  • check if op-amp already sourcing too much current - lift output pin, insert a small resistance resistor from pin to pad, measure the voltage drop to see if the amp is sourcing or sinking more that datasheet stated. It is possible that the next stage is demanding more current than expected.
So good luck with your troubleshooting Smile