# op-amp level shifter

I'm working on a brushed dc motor driver and I have to monitor the current. so I use ACHS-7121 current sensor. This sensor convert +-10A into 0V to +5V and have +2.5V in zero current.

Now I want to shift this to 0v to 10v without including the current direction. It means that the sensor shows that 0V to +2.5V means the current is negative and +2.5V to +5V the current is positive. But I want the op-amp map the values that include negative current (0V to +2.5V) on positive values and ignore the current direction. $$\ V_O = |V_I -2.5| \times 4 \$$

I found difference amplifiers such as AD8276 but I'm not sure about that if it works for me or not if I use single positive supply. Can anyone suggest another solution or confirm that AD8276 works fine?

• The transfer function you require is $V_O = |V_I -2.5| \times 4$. Is that correct? If so then add it into your question using MathJAX: $V_O = |V_I -2.5| \times 4$. – Transistor Feb 12 '20 at 7:46
• Are you saying that you want the following mapping from in->out, 0v->10v, 2.5v->0v, 5v->10v? This is what I think you mean by ignore direction and include negative values. If so, that involves rectification, taking the absolute value of the input after shifting by 2.5v, which needs a more complicated circuit than simply a difference amplifier. /edit/ which is words for exactly what Transistor expressed in an equation //edit/. Google for 'absolute value circuit', or here on stackexcahnge – Neil_UK Feb 12 '20 at 7:47 