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.
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:
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:
Rf/Ri = infinity:
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.
Step#1:
Figuring out what is input, what is output:
Draw out the xy boundaries by circuit inspection:
Step#2:
Acknowledge there is essentially one variable to play around - that is, the ratio of Rf/Ri :