2
\$\begingroup\$

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

\$\endgroup\$
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – mikeY Jun 7 '13 at 16:36
  • \$\begingroup\$ In this particular instance I think so, it's a PPM meter that normally goes from 0 - 10,000 ppm \$\endgroup\$ – user379468 Jun 10 '13 at 1:53
1
\$\begingroup\$

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:

schematic

simulate this circuit – Schematic created using CircuitLab

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.

\$\endgroup\$
  • \$\begingroup\$ Also, if you have a negative power rail at hand, you could offset the voltages to be between 0V and 1V, then use atMega's built-in 1V1 voltage reference. \$\endgroup\$ – Sebi Mar 20 '16 at 11:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.