# How to measure -50V to +50V using a microcontroller ADC?

How to measure -50V to +50V using a microcontroller ADC?

I would like to scale my signal so that -50V signal voltage equals -5V at the input to the ADC and +50V signal voltage equals +5V at the input to the ADC. Vref and Vcc are 5V.

for clarification When I connect the-50V input (trimmer), so the output will be-5V. When I connect the +50 V input (trimmer), so the output will be +5 V.

So the input range for the AD converter is + /-5V.

Thank you very much for your help

I drew a schematic, but this works in the output range of + /-5V. • What is the input range of your ADC? What does "scale my signal so that -30V signal voltage equals 30V at the input to the ADC" mean? Having 30V at the input to your ADC is nonsense as far as I can tell. – Andy aka Sep 2 '13 at 8:46
• Pardon, I described the wrong schema. When I connect the-50V input (trimmer), so the output will be-5V. When I connect the +50 V input (trimmer), so the output will be +5 V. So the input range for the AD converter is + /-5V. – user2362043 Sep 2 '13 at 9:09
• Why don't you edit your question to fix it to what you actually mean. Also, what input current (from an overvoltage via a limit resistor) can your ADC tolerate? Maybe you can tell use the ADC you plan to use? – Andy aka Sep 2 '13 at 9:48
• Unfortunately, I do not know which to use AD converter. I wondered about the MAX1415. But I do not know if I can handle it. – user2362043 Sep 2 '13 at 9:54
• I see you've edited your question but it still makes no sense. What are you trying to achieve. State input voltage to desired output voltage mapping and is your input +/-30V or +/-50V? should this map to +/-5V or 0V to +5V? – Andy aka Sep 2 '13 at 10:03

Please be aware that virtually all microcontroller ADCs that I have encountered support input ranges from 0V to VRef. In your case that would be from 0 to 5V. As such you would not be able to apply -5V as an input to a microcontroller ADC of the types that I've seen. There are of course many ADC implementations that do support input ranges like -10 to +10V or -5 to +5V but these are generally found as part of a more comprehensive data acquisition board or module.

If you want to use a -50 to +50V input range with a microcontroller ADC that supports a 0 to 5V capability then you would have to scale the inputs in a manner as follows:

Trimmer Input -50V => ADC Input at 5V

Trimmer Input 0V => ADC Input at 2.5V

Trimmer Input +50V => ADC Input at 0V

The following circuit shows a typical scaling circuit that can achieve the above range. An additional opamp stage could be added if the inverting characteristic of the circuit is undesirable. Since you are using a microcontroller ADC it would not really be necessary to add the additional stage because the software can be used to invert the ADC readings.

Note that the circuit is sensitive to the absolute accuracy of the +12V and -12V supply levels. In a production design the R4//R2 divider should be replaced with a suitable reference voltage produced from a component such as a TLV431 shunt regulator.

The shown LT1638 opamp was used in the simulation circuit because its model was available. Many other opamp types are usable in this design as well. After a few hours of work and searching the internet I came up with this connection. The output is generated voltage from 0 to 5V. Where 0V corresponds to 2.5 V. 