# How do I convert a signal of 3v to 2v to a signal of 0 to 5 v

I'm measuring input voltages between 2v and 3v (3v volts corresponds to a reading of 0 and 2v corresponds to a reading of 10,000) on the analogue in of my arduino. I would like to measure the voltage at the highest possible resolution of the arduinos A/D converters.Using an operational amplifier and common resistors how would I convert a voltage range of 3V - 2V to a corresponding 0v - 5v for the arduino inputs.

I tried Using the simplified method on this page Scaling Voltages With Op amps

|Gain| = Output Range / (Vin.max â€“ Vin.min) so gain would be 5

Gain = Rg / Rin so Rin = Rg/Gain picking a 10k resistor for Rg i get Rin as 2k

Voff = Vin.max * ( |Gain| / ( |Gain| + 1 )) so 3 * (5/(5+1) - this part confuses me, I would think that the offset is simply 2 because I know that the lowest voltage I need to measure is 2V

Voff = Rbot / (Rtop + Rbot) * Vref

and here is where I get lost

• At the risk of being down voted, I'll ask this uninformed question in a comment: You are reading between 2v and 3v with a scale of 0 to 1,000. If you amplify things won't you essentially be reading between 2v and 3v with a scale of maybe 5,000? For your application is there really any operational difference between 2.45v and 2.456v? Like I say, uninformed but curious enough to ask. – mikeY Jun 7 '13 at 16:36
• In this particular instance I think so, it's a PPM meter that normally goes from 0 - 10,000 ppm – user379468 Jun 10 '13 at 1:53

I would suggest just using a lower reference voltage rather than altering your signal. By using a lower reference voltage, your 1024 discrete points are spread over 0-3V rather than 0-5. In most cases, using the default reference voltage is fine, but sometimes the extra precision is needed. In order to do this, use a voltage divider with Vout=3V or slightly higher than the maximum voltage you ever expect to see, and connect the input to the VRef pin on the Arduino. An example of a voltage divider would look something like this:
Remember, the formula for a voltage divider (should you have forgotten or don't know) is $V_{Out}=\frac{R_2 V_{}in}{R_1+R_2}$. It's a good idea to use larger resistors so that you can keep your current draw to a minimum.