I'm attempting to convert a 12bit dac output to a range of 0-20V (only really care about 1.25-20). I have a reference voltage a 4.096V and I intend to use values 1250(dec) through 4000(dec) (1.25V - 4V) to get a voltage output from an old lm324 between 1.25 and 20V linearly. I need a near-perfect gain of 5, but I'm learning that op-amp gain doesn't seem to be stable across a range.
I've tried using a 5k 20-turn trim pot for my feedback loop for the op amp. If I tune it to give me a perfect 10.000V output with a 2.000V non-inverting input, and then set the input to 0.400V, I would expect to see an output of 2.00V. What I'm seeing is 1.94V output. If I set the input to 3.000V, I get 15.12V output. It isn't drift, because I can always go back to the input voltage that I used to calibrate, and the output is perfect.
I know there is a big difference between how we learn an op amp works and how one actually behaves, but I've never read anything about the gain being inconstant across a range, so I feel like I'm doing something wrong.
Is there a circuit that will give me consistent and accurate gain of 5 across those input and output ranges? I would prefer to use the lm324n because I have a box of them, but I can buy components if I have to. My supply line is also not set in stone. I'm working from a bench supply right now, and I plan to use a very good quality transformer that I have with 19.36V and 36V (6A) secondaries, and a low current 21.4V tap.
Thanks for any help.
I've tried using a 5k 20-turn trim pot for my feedback loop for the op amp. If I tune it to give me a perfect 10.000V output with a 2.000V non-inverting input, and then set the input to 0.400V, I would expect to see an output of 2.00V. What I'm seeing is 1.94V output. If I set the input to 3.000V, I get 15.12V output. It isn't drift, because I can always go back to the input voltage that I used to calibrate, and the output is perfect.
I know there is a big difference between how we learn an op amp works and how one actually behaves, but I've never read anything about the gain being inconstant across a range, so I feel like I'm doing something wrong.
Is there a circuit that will give me consistent and accurate gain of 5 across those input and output ranges? I would prefer to use the lm324n because I have a box of them, but I can buy components if I have to. My supply line is also not set in stone. I'm working from a bench supply right now, and I plan to use a very good quality transformer that I have with 19.36V and 36V (6A) secondaries, and a low current 21.4V tap.
Thanks for any help.