> There's a good example at > http://www.tfs.net/~petek/rockets/altimeter/circuit.html, but I cannot > figure out how to go from the first circuit, with two opamps, to the > second with only one. I want to map a span of 0,2V - 0,439026V to the > ADC's 0-5V, non-inverting. And there might be issues with noise etc > since the interesting range is so narrow. > Of course, I could do it inverted and handle that in software, but > shouldn't this be a really basic thing?? Ok, frankly, you're going to need a pair of potentiometers and a DMM to do this and get the numbers that exact. Ok, the opamp needs to be biased at the average of the 2 extremes (0.319513V) and it needs to have a gain of 5V/(Vupper-Vlower) which is 20.9182264691. So, here comes the ASCII art: +5V | | | | |\ Vin O-- | ----------|+\ > | \ < | >---+----O Vout R1 > | / | < +----|-/ | > | |/ | < | | | | | +------+--/\/\/\/---+ | R3 > < > R2 < > < | ----- / / / (In case you havent seen ASCII art used before, copy this out of your email program if it looks like garbage, and paste it into something that uses a mono-spaced font like Notepad) Ok, R1 and R2 can be a single potentiometer with the wiper connected to the -ve input of the opamp, but if they are, then R3 should also be a potentiometer. So, to get the values of resistors required, here's what I did: Av = R3*(1/R1 + 1/R2) + 1 Vbias = 0.319513 = 5 * R2 / (R1 + R2) Solving the Vbias equation for R1, R1 = R2(5-0.319513)-0.319513 Subbing into the Av equation, Av = R3*(1 / (4.680487*R2 - 0.319513) + 1/R2) + 1 or Av-1 = R3*(1 / (4.680487*R2 - 0.319513) + 1/R2) Now, at this point, I used a graphing calculator to choose my values, as it makes the formula easily reusable. Since there is no third equation, we have to pick an arbitrary value I picked 180k for R3, because it gave 10k for R2, and that gives roughly 50k for R1. The high resistance is better for low power, to reduce the power loss in the divider, and since the opamp should have low output impedance, anyways, The actual values I calculated are the following: R3 = 180k R2 = 10.9678404701 kohms R1 = 51.3316396084 kohms If you use 2 pots, you'll need to do some careful calibrating. Configure the R1/R2 pot first, to get the correct bias voltage, then configure the R3 pot to get the right gain. Oh, and make sure you use a rail-to-rail opamp, or you'll get some clipping. Hope this helps. Regards, Brendan -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.