# Operational Amplifier Circuit - +/- Signal to 0 ... 5 V

I know that this question has been ask in similiar ways already. Since I am rather new to Electrical Engineering and I don't want to waste material I wanted to ask you guys first if my approach is feasible. So basically I think I already solved the problem but still need some feedback.

Problem

In order to measure a position, I want to move a permanent magnet between two hall sensors and calibrate the output to the position of the magnet.

I have two hall sensors positioned at x = 0 and x = L, each of them is delivering an output voltage V_1 and V_2 ranging only from 2.00 V to 2.01 V, depending on the position of the permanent magnet. I am using a Arduino to read the signal (0 ... 5 V, 1024 bits, 256 "effective" bits). I am interested in the difference between the two voltage levels since it is correlated to the position of the magnet.

Approach

I wanted to combine a differential OAmp (left part) and a simple potential divider (?) as shown below.

simulate this circuit – Schematic created using CircuitLab

Question

Do I really get this output voltage? Or is this unrealistic? Thank you very much in advance!

Cheers, Urs.

https://www.mikrocontroller.net/articles/Operationsverst%C3%A4rker-Grundschaltungen

Level shifting a +/- 2.5V signal to 0 - 5V

Starting with the op-amp, the TL081 recommended supply voltages are +/- 5 volts to +/- 15 volts so it fails the first test because you are using a single rail supply of only 5 volts.

If it were an op-amp that could work from a single supply of 5 volt you hit the next problem of the quiescent output signal being set at 0 volts for equal values on the input. In other words, when using a single rail circuit like this you need to bias the op-amp via R7 to possible mid-rail (2.5 volts).

Putting all the above to one side, if you used a 5 volt rated rail-to-rail op-amp then it stands a chance but you have very low values for R11 and R12 and more-than-likely, any op-amp you choose won't be able to supply the current just to get the bias condicitons right.

I would also scale up R4, R5, R6 and R7 by a factor of ten to avoid the op-amp having to supply 10 mA to the feedback network when the input differential is 10 mV.

• Oops. Brain fart there. I've deleted. Commented Feb 2, 2017 at 19:45
• Thank you very much for your answer! I will search for a different OPAmp with the specifications. I will work in the other inputs. This helps a lot!! Commented Feb 2, 2017 at 21:22
• I have one more question concerning the bias of the input signal if it is as edited above: Now I am amplifying a voltage which is ranging from 2.49 to 2.51(after the substraction), right? The problem with this is that I will end up with a very high voltage which i cannot read out. Please correct me if i am wrong. Therefore the bias might not be sutiable here. Commented Feb 2, 2017 at 22:01
• No, with 2.5 volts feeding R7 that offset won't be amplified. Just transferred to the opamp output as a mid rail offset. Commented Feb 2, 2017 at 23:05
• Now you need to make R6 21 kohm because of the two 2k resistors feeding R7. Commented Feb 2, 2017 at 23:08

You are going to have a hard time achieving balance in that diff amp, because:

• The gain of 200 is quite high and the voltage difference you are comparing is very low. Getting resistor match will be difficult. And don't you need a total gain of 500, in order to amplify a 10mV difference signal up to 5V?
• Your Hall-effect transducers are each seeing a vastly different load. The top one is effectively driving 10 ohms, and the lower one is driving 2010 ohms. I don't think the behavior with this wildly mismatched load will give you what you need.

Elsewhere, you don't need to use the voltage divider to reduce the gain and provide offset. Instead, connect a bias voltage to R7 (instead of ground) to provide the offset. and select the value for R7 and R6 to set the gain.

You may be able to use a trim resistor to adjust the circuit balance. However, I suggest that you look at other differential amplifier topologies, because that 10 Ohm load on the top transducer will be a very big problem.

• Thank you very much for your reply. Concerning the first point: The difference in the signal is +/- 0.01 V and I want to amplify it to +/- 2 V before I put in the 2.5 V offset. Therefore factor 200. But: The 0 and 5 V for the opamp are not correct. I will try to search for an alternative. I don't really get the second point because I am really on a beginner level ;) Why is the load that much different? Sorry for the stupid question (some people say there is no such thing as a stupid question, I think that exceptions can prove the truth ;) ) Commented Feb 2, 2017 at 21:16
• The amplifier circuit uses negative feedback to set the desired gain. This feedback forces the inverting input to the same voltage as the non-inverting input. (I had a long explanation here, but I hit the character limit). Do study op-amps and virtual ground at the inverting terminal. Actually, as I study the circuit, I see that likely current your transducers will need to provide is between 1 and 2 mA, which may not be a problem. Usually though, you want to keep the diff-amp input impedances higher than you've got here, to avoid unequal loading of your signal sources. Commented Feb 2, 2017 at 22:02

I think I found the solution for my problem based on the previous answers. I will use the following amplifier:

Datasheet, see page 27, figure 4-1

$$V_{out} \approx V_{ref} + \Big(1 + \frac{R_F}{R_G} \Big) \cdot (V_{IP} - V_{IM})$$

$V_{IP}$ and $V_{IM}$ are the inputs of the hall sensors. $V_{out}$ goes to the arduino analog in. $V_{ref}$ will be set to 2.5 V. $R_F / R_G$ has to be 99 (e. g. $R_F = 99 k\Omega$, $R_G = 1 k\Omega$). I will use the gain 100 version.