I'm trying to build a circuit that realizes the transfer function:
$$ V_o = 0.33V_i + 1.65V
$$
Using what I know about voltage dividers and resistive adders, I built:
simulate this circuit – Schematic created using CircuitLab
but this is giving me an output much closer to:
$$V_o = 0.2V_i + 1V$$
Where am I going wrong?
Best Answer
There are two problems with your design.
Bottom line is that your approach isn't going to be fruitful.
Fortunately a much simpler design will solve your problem. We just need a weighted average circuit.
For ease of calculation i'm going to assume that when you wrote 0.33 you meant \$\frac{1}{3}\$ if you want to actually use 0.33 that makes the numerics less nice but does'nt change the principles.
We can rewrite your equation as a weighted average and implement it as a weighted average circuit. This consists of three resistors, one from the input to the output, one from 3.3V to the output and one from ground to the output.
$$V_o = \frac{1}{3}V_i + 1.65 = \frac{2}{6}V_i + \frac{3}{6}3.3+\frac{1}{6}0$$
(note that our weights add up to 1 and all of them are positive, that is important)
Now we simply take the reciprocal of the weights to work out our resistor values.
$$R_{Vi} = \frac{6}{2}R$$ $$R_{3.3V} = \frac{6}{3}R$$ $$R_{Ground} = \frac{6}{1}R$$
Where \$R\$ is the output impedance of our weighted average circuit.
Then it becomes a matter of picking a \$R\$ value to set the actual value of our resistors. Ideally we want to pick it such that all three values are standard values. Turns out that \$R=0.5\mathrm{k}\Omega\$ works out nicely giving us.
$$R_{Vi} = \frac{6}{2}R = 1.5\mathrm{k}\Omega$$ $$R_{3.3V} = \frac{6}{3}R = 1\mathrm{k}\Omega$$ $$R_{Ground} = \frac{6}{1}R = 3\mathrm{k}\Omega$$