I've attached probes to the main points of interest. Then applied input values between +4 V and -4 V, in steps of 0.5 V.
The data is collected in a spreadsheet to try and spot trends and stability.
|5||AIN1_P||opamp U1D out||output|
|6||AIN1_N||opamp U1B out||virtual ground|
Test results and calculations
- The first 5 columns reflect the testing points of the previous chapter (without GND), and are all measured (in V).
- diff: ainp - ainn, in essence, it is input * gain, measured
- ain calc: diff * theoretical gain, (circuit gain, based on resistors used, is 0.38298), should ideally match ain
- ain err: ain - ain calc. How much does the calculated ain differ from the actual input
- gain: what is the actual gain of U1D at each sample
Graphs and trends
Let's first look at the error across the range:
This is very linear. and crosses at 0V input. That points to (discuss if you have a different opinion):
- no offset error
- the gain isn't 0,38298, but closer to 0.385
Here is the same graph if I set the gain for calculations to 0.385:
This is good news for calibration algorithms. Easy to program as a function. No lookup tables needed.
The gain is also consistent across the range. I blame the peak at 0 to calculation error factor (discuss). Everything is close to 0 at that point.
I did double-check the values though.
Here are all measurements:
And the spreadsheet: