Voltage Translation for Analog to Digital Interface
孕龙逻辑分析仪 ZeroPlus Logic Analyzer
How to modify analog output range of Arduino Due
In today's microcontroller market, most of the Analog to Digital converters
are only able to accept voltages from the Vcc of the device to ground.
But what if you want to measure a bipolar signal?
This short tutorial plans to show you a simple but effective method
to interface a bipolar voltage to any single polarity input.

On the left is the ideal basic circuit for interfacing.
vi is the input voltage, vo is the voltage sent to the ADC,
vr is a reference voltage used for setting the center or zero input voltage,
and R1 and R2 are used for input scaling and current limiting
to bring the input voltage into the range of the ADC.
Now that I have my basic circuit, and the required formulas, let's now create a useful example.
In this example, my parameters will be as follows:
- Input impedance of at least 1Mohm.
- vin = +/- 12V
- vo = 0-5V
So when vin = 12v, vo = 5v
vin = -12v, vo = 0v
vin = 0v, vo = 2.5v
To begin, I need to calculate the value of R
R2 = (R * R1)/(1-R) = (.2083 * 1M)/(1-.2083) = 208,300/.7917 = 263,104 ohms.
Next I need to calculate the value of vr.
Using the case of vin = 12, vo = 5, and using formula III:
vr = (vo - R * vi)/(1 - R) = (5 - .2083 * 12)/(1 - .2083) = 2.5004/.7917 = 3.158v
I now have the 3 values required for my design.
R1 = 1M
R2 = 263,104
vr = 3.158v
I can now plug these numbers into formula I
vo (vin=+12) = R(vi - vr) + vr = .2083(12 - 3.158) + 3.158 = 5.000
vo (vin= 0) = .2083(0 - 3.158) + 3.158 = 2.500
vo (vin=-12) = .2083(-12 - 3.158) + 3.158 = 0

- A diode and zener diode used to protect the ADC input from overvoltage.
- R2 is composed of a fixed value, and a trim pot to dial in the correct value.
- A trim pot connected to the non inverting input of an op amp in a voltage follower configuration for setting vr.
To calibrate the circuit, adjust the op amp trim pot for an output voltage of vr as calculated above.
Now I have a working circuit, but the last thing to calculate is the maximum and minimum input voltages.
The maximum input voltage will occur when the zener diode goes into breakdown regulation.
vi = ((vo - vr)/R) + vr = ((5.1 - 3.158)/.2083) + 3.158 = 12.481v
The minimum input voltage will occur when the diode is forward biased.
vi = ((-0.7 - 3.158)/.2083) + 3.158 = -15.363v
Effective input impedance can be calculated as follows:
zin = vin(R1 + R2)/(vin - vr)
This is a varying quantity depending on vin.