Divider with offset: bipolar to unipolar level shifter
Three resistors and a reference scale and shift a bipolar signal into an ADC range: −10…+10 V into 0.2…4.8 V, for example. Enter the two ranges and the reference and get the ideal ratios, the best standard resistors, the voltage you will really read at both ends, and the current in each resistor.
Currents are counted into the node: positive flows toward it, negative flows away from it. Together they sum to zero because the follower draws none.
Best standard pairs
Standard R1, R2, R3 for the ideal ratios, smallest worst-ratio error first. Click a row to put it in the drawing and the figures below.
The formula
Vout = (Vin / R1 + Vref / R3) / (1 / R1 + 1 / R2 + 1 / R3) = a·Vin + b a = ΔVout / ΔVin, b = Vout,min − a·Vin,min R1 / R2 = (1 − a − b / Vref) / a, R1 / R3 = b / (a·Vref), smallest Vref = b / (1 − a)
When to use it
Use it when a signal swings both sides of ground (±10 V, ±5 V, ±12 V) and the ADC only takes 0 to Vref or 0 to its supply. R1 from the input and R3 from a reference set the gain and the offset; R2 to ground pulls the node down; a follower (an op-amp buffer) then drives the ADC without loading the network. It needs no negative supply for the divider, only a stable reference at least as large as the limit shown, and the ratios it asks for come out as two numbers you can hand to the resistor ratio finder.
Pitfalls
- Resistor tolerance sets gain and offset accuracy. The network is a ratio, so matched or 0.1 % parts keep the span and the offset from drifting; two loose 1 % parts alone can move the ends by tens of millivolts at 5 V.
- The reference scales the offset directly: a 0.1 % error in Vref moves the offset by 0.1 % of b (b is the offset, 2.5 V in the example, so about 2.5 mV). Use the same reference as the ADC where you can, so the offset follows it, and filter it so noise does not ride in on R3.
- The follower must work at the voltages the network gives. Its input range and output swing have to cover Vout min to Vout max, and its input bias current flows through the source impedance shown (R1 ∥ R2 ∥ R3) as an offset; choose a rail-to-rail, low-bias op-amp.
- Protect the ADC. If Vin can go past its range — a fault, a cable swap — the follower can drive the pin outside its limits. Add a series resistor and clamp diodes, or an op-amp supplied from the ADC rail, so the pin stays inside 0 and Vref.
- The reference must source or sink the current in R3 (see the currents above) and must stay stable while it does; a bare resistive divider is not a reference.
Need the analog front end for your ADC designed and tested, not just the resistor values?