# Help making a voltage-scaling amplifier (op-amp)

I'm using a zener-diode temperature sensor, LM335, from sparkfun. It drops 10mV per degree K, so at 298K it drops 2.98V.

The trouble is when I read it with the Arduino analog pins, 1 notch on the ADC is nearly 1/2 degree C. For example, at room temperature I get 614 from analogRead() which my code spits out as 25.00C, but if it goes to 615, I get 25.49C. I'm usually only interested in temperatures from 0C to 100C at the very most, so this is a waste of my ADC's resolution.

I want to make a circuit so I can scale the output of the temperature sensor from 0 to 5V for any arbitrary temperature interval I'm interested in. I designed an op-amp circuit to do this, but I want to make sure it's valid before I build it.

I'm not sure about the feedback resistor...sometimes op-amp circuits use a simple inline feedback resistor like in my diagram, and sometimes they seem to require a voltage divider to ground, and I don't understand why. Also, I'm not sure if I can swing the output from 0 to 5V while operating the op-amp on 5v. Finally, what op-amp should I use?

That doesn't look like it's going to work. I suggest researching the non-inverting buffer op-amp configuration, as well as an inverting buffer with level shift configuration. Prototype these circuits in LTSpice to get a feel for how they work.

You're going to need a "rail-to-rail I/O" op-amp, often abbreviated RRIO, to get a voltage swing on the output from 0V to 5V (even then they don't go QUITE all the way to the supply rails but usually stop shy by a few millivolts). Names that come to mind are TLV2371 and MC33202.

sometimes op-amp circuits use a simple inline feedback resistor like in my diagram, and sometimes they seem to require a voltage divider to ground, and I don't understand why

It depends on the type of amplifier you are designing. One is for an inverting amplifier and the other is for a non inverting amplifier.
With the inverting type not only is there a resistor from output to -ve input but a resistor from -ve input to your input. Your circuit hasn't got that so that's why it won't work.

It depends on the type of amplifier you are designing. One is for an inverting amplifier and the other is for a non inverting amplifier.

As far as inverting or non-inverting, I don't really care which, because I can fix it in software. I only know I need 2 things...ability to amplify the signal from 10mV/degree to like 100mV/degree, and the ability to shift the zero down (because it starts at about 3v).

I suggest researching the non-inverting buffer op-amp configuration, as well as an inverting buffer with level shift configuration. Prototype these circuits in LTSpice to get a feel for how they work.

I found a level shift for non-inverting amplifiers. Does this look like it would work?

That has potential (no pun intended).

Put it into LTSpice and find out!

Bettersence, how did you get on with this project? i have the 0-255 scale vs the LM35 issue but interfacing a PC not a PIC.

Would apreciate a scetch of your final working circuit if you could spare the time?

Cheers!

Steve