the formula for Vout is as follows: Vout = Vin x [(R1+R2)/R1]
the input voltage coming from my Sharp IR sensor maxes out at about 2.3v. i hope to get it all the way up to 5v. therefor, i want to amplify the signal to about 2x the original.
SO - using that equation, i can use 2 resistors of the same value to double the signal an get about 4.6. **but what resistor value is appropriate? ** moreover, what does one use to make the decision of what value of resistor to use in this circumstance or others?
thanks for your time. i'd be happy to clarify anything
nym
Generally with opamps one uses resitors in the range 1k to 100k, but its pretty arbitrary (too large and input-offset currents lead to increasing error, too small and the circuit draws more power, the opamp might overload.).
Now read the datasheet about the output voltage swing, you'll find opamps can't drive down to 0V or up to Vcc, you'll probably be limited to about 2.5V usable output range given the device needs 3V or more to work. I doubt you'll be able to expand the sensor's output usefully across its full output range with an opamp unless you have dual supply rails.
how would you recommend adding a 2nd supply rail, and where in the circuit would one place it? i can't simply run a line from another of arduino's 5v outputs, can i?
also, this from another page:
The requirements called for a rail-to-rail op amp that could be powered from as low as 5v and provide an output of 0/5V. Also it had to be powered from one single supply rail. National Semiconductors LMC6462
That particular op-amp doesn't require dual rails, but some do.
What this means is that you (typically) need a positive voltage rail, and a negative voltage rail, with a common "ground" rail.
Ground doesn't necessarily mean "0 volts" - just "0 volts" from the point of reference of the circuit.
Take a 6 VDC battery; you have a positive terminal and a negative terminal; we can call the negative "ground". Now, if we hook another 6 VDC battery in series, connecting the positive of that battery to the negative of the first, that "center tap" can still be called "ground"; while the negative terminal of the second battery can be called (and is) "-6 VDC".
Referenced to that center tap, it is 6 volts lower than "ground", while the other side is 6 volts higher.
There are other ways to get negative voltages (using charge pumps and the like); with AC current, you typically are rectifying the voltage to DC anyway (and you would need to do this, of course), so ground is typically the center tap of a multi-tap transformer (on the stepped-down output side of the transformer).
You can also use this fun fact to get an extra "funky" voltage out of a PC powersupply that has 0V, 5V, and 12V DC rails - if you call the 5V rail "ground", and use the 12V rail as the "positive" rail, the voltage between the rails is "7 volts" - PC case modders and the like typically use this trick to run a 12 VDC fan at a lower speed (which is quieter, though it moves less air now).