ADC: Signal gain + shift

Hi,

I have an analog signal of low impedance (1 ohm) that goes from 9V to 20V. I want to change it into 0V - 5V. Is it possible to buy a ready made module that shifts and gains / reduces the analog signal to be ready for the Arduino ADC?

Something of this kind

http://electronics.stackexchange.com/a/30741

but just in form of a module that one can buy e.g. on Ebay from China.

Hmmm… so you don’t want to solder? The stack exchange circuit is perfect for what you want.

What about breadboarding it?

Because you have a low-impedence input, you could also use a resistor divider:

  1. With two resistors, 3.3K and 1K, you could get a single ADC input of 2.09V to 4.65V. In your code, just map 0-to-951 onto 0-to-20V (that’s 0-to-1023 onto 0V-to-21.5V). This means a little resolution loss, because you will only be reading 427-to-951 results from the ADC. About one bit loss.

  2. With three resistors, you would use two ADC inputs for a differential reading. This retains full 10-bit resolution.

Still, resistor dividers have to be soldered or breadboarded. I can’t find anything pre-made with adjustable or programmable attenuation (i.e., gain < 1) and offset.

Another high-impedance way to do this is with this. You’d have to solder three resistors and do a little math. Although you’re not after current per se, you will get a suitable input to the Arduino that can be converted to the 9-20 voltage you want to measure.

Really, this is a great project to learn how to solder. Breadboard it first, then solder to perfboard.

Cheers,
/dev