Okay I'll start with the application, which is the 6 digit (might go to 6.5 digit) dmm I've been working on for the last 12 months. Lowest digit is 1μV resolution, but as it has a 24 bit ADC there's the potential to do around 200nV resolution or better but I'm not really bothered with it. Most of the design is worked out now, it's the niggly wrinkles to sort out like this, and I've got to the point of being a bit fed up and I just want to get it built (now have pcb layout for display/switch board anyway, whayhay!)
So, the base value for the meter's scales is currently 4, (though after thinking about it again it might end up being changed to 10 or 2, but I'm sticking with 4 for now. I even had the notion of a hardware scale based on 4 combined with a software scale based on 2, using a half digit, but that's another story)
Everything is based on what I can get the cheapest, so going from the highest current range, I found a 500μΩ shunt I can afford, and current on that is limited by what the input socket can stand, 30+ amps, but I'm still using the base figure of 40 whilst working stuff out. The other shunts are simply based on multiplying that by 10, though having different gain for one or more inputs might be the way to go - I haven't looked at that yet.
Total gain up to the ADC needs to be 125 as things stand, but there is a gain stage at the ADC's inputs of 2.5, so going into there means the summing amp needs a gain of 50. I have the choice to connect it to there or to an earlier stage, also gain of 2.5, so the summing amp in that case would need a gain of 20. If the gain is 50 I want an output at FSD of 1v, if it's 20 I want 0.4v.
Since I discovered high voltage reed relays I may end up chucking out part of the original design anyway, so the gain will be different, but I'll stick with this for now.
So, each shunt in the 4A, 400mA and 4mA ranges has the possibility to be connected to the input by a relay, and the 40A one has it's own socket. So the summing amp should only ever see a voltage on 1 of it's inputs, the others being grounded by a very low resistance.
So in the simulation I calibrated the feedback resistor to give correct values on the highest current shunt, and it's linear when the current is changed, but when the other shunts are tried the voltage across the shunt, and the output voltage get more inaccurate as the shunt value is increased. Just tried a different amp, LT1012, same sort of error.