Andy Errington wrote: > > I want to use a National Semiconductor LM355 absolute temperature sensor to > measure ambient temperature. This 3pin device behaves as a zener diode > whose voltage is linearly proportional to absolute temperature. At 25degC > you get 2.982 volts (=298.2Kelvin), and the voltage changes by 10mV per > degree. LM355. Hmmm, Maybe you mean LM335? I think so. But maybe your should consider the LM35, since it is calibrated for Centigrade. (0v = 0 degrees C) > I want everything to operate on a single rail 5V supply, so I need to put > the output of the sensor into a circuit which has a gain of about 4, and > which subtracts about 2.6V from the sensor output first. This will give me > a sensible output voltage range which can be read using an ADC (connected to > a PIC of course!) The LM335 has a transfer function of Vot(T) = 2.732V + (10mV/C) * T ...............(1) Where, T is the temperature in degrees Centigrade. However, you desire a different transfer function: Vd(T) = K * T ................................(2) Where, T is again the temperature in degrees C and K, the proportionality constant is around 10mV/C. Consider the op-amp circuit shown below: R4 +------/\/\/\----+ R3 | |\ | Vref ----/\/\/\------+---|-\ | | \ | | \ | |U1 /--------+--- Vd(T) R1 | / Vot(T) ---/\/\/\------+---|+/ | |/ \ / R2 \ / | ---- / / / The transfer function for this circuit is Vd(T) = K1 * Vot(T) - K2 * Vref .............(3) K1 = R2 * (R3 + R4) / [ R3 * (R1 + R2)] K2 = R4 / R3 Substitute (1) into (3) Vd(T) = K1 * (2.732 + 10mV/C *T) - K2 * Vref and equate to (2) K * T = K1 * (2.732+ 10mV/C *T) - K2 * Vref This gives you two equations, one for the coefficient of T: K * T = K1 * 10mv/C * T K = K1 * 10mv/C and the other associated with the constant term: 0 = K1 * 2.732 - K2 * Vref K1 * 2.732 = K2 * Vref Now, it's a grind. You need to choose a Voltage reference, Vref. If you can live with some inaccuracy, then low pass filter Vcc (i.e. 5V) and use it. Otherwise, an LM385 (1.2V reference) is a very reasonable reference. Next, you need to pick resistor values for R1 - R4. But, I can't provide them here unless you tell me your K, i.e. your temperature to voltage proportionality constant. Finally, you need a 5V, single-supply op-amp. Most single-supply op-amps accept common mode input voltages all the way to the negative rail (0 Volts). However, they only go to within 1.5 to 2 volts of the postive rail. The LM324 is good example. If you are willing to tolerate low bandwidth, and I mean really low bandwidth, then consider Maxim's rail-to-rail opamps like the MAX406A. The gain bandwidth is 40kHz(!), yet for a 5V supply it is guranteed to swing within 30mv of either rail. This will probably work, because temperature is almost always a slowly varying signal. Hope this helps, Scott