Search This Blog

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.
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


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* [β + α*β - α]

α = 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


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:



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



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.

Wednesday, 22 May 2013

The Catches: Boost Converter that don’t last

This happen about second year i started hands-on design – it was a 100V boost converter – most of the time the prototype works well – but every once a while – it stop working  after a large “blak” sound.

So tracing back on the switching waveforms – voltage, current I deduced that the inductance was not right – VL = L * (di/dt) relationship does not hold – drop in another piece – and it start working again.

Being curious as I am (luckily), I check the resistance of the inductor and compared to the new part (did not have LCR meter on hand). The resistance is much lower lower than the number stated in datasheet.

As the failure made me very un-comfortable – I went Google around – and it turns out that inductor does have voltage rating (although not mentioned in the datasheet of the one I was using), so the design was flawed in the first case – luckily it was found out earlier than later (it pays for being curious), else can’t even imagine what it would do in the field. Changing the part to high voltage part – and it work out solid!

For more details, refer to previous post:

Lesson –
Inductor does have voltage rating – due to the insulation coating of the windings, and the way wires being wound – and the inductor intended for high voltage operation will have working voltage stated in the datasheet – else don’t use it at high voltages.

Always look for the root-cause – it will save your ass

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:
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.