I am designing a circuit to levitate an object using a magnetic field. The idea is fairly simple and this has been done before. My question is about opamps. What I am confused about is how they operate with no "negative" voltage. In my example circuit, if HES1 outputs 3v and HES2 outputs 3.5v I will see .5v on the output of the opamp, correct? HES stands for Hall Effect Sensor.
I will see 0.5 V at the output ideally. If you use 5% tolerance resistors you can see 0.78 V in the worst case.
With a single supply, if the output voltage of HES1 is greater than that of HES2, you will see about 0 V at the output of the op amp.
Ok here is another circuit I drew. Will this circuit take the difference between the voltages on the two hall effect sensors and multiply that value by the gain set by the 20k pot?
The second opamp does multiply the output voltage of the first opamp by 1 + Rpot / 1k, but the output can't swing to 5 V. If the gain of the second stage is too high, the output will saturate.
You should know:
1) the max difference between the output voltages of the sensors
2) the voltage range you need at the output of the second opamp
Then you can calculate the gain of the second stage and decide the supply voltage.
one other point, you will probably want to use rail-to-rail op amps in order to get as much of the full 0-5V range as possible (or design your circuit to not care). If not, you can lose quite a bit of the range. SPICE it, to see what I'm talking about.
I need the output of the second opamp to be able to go between 0 and 2.5v any thing above that is fine but 2.5v is the max that will ever be needed. Will I be able to get the output down to 0v using a lm324?
Edit: looking at the datasheet, I see that the output can swing from Vcc-1.5 (3.5v in my case) to ground.
The output can go near to ground using the LM324 (if you need only two op amps you may consider also the LM358). When the output is supposed to be 0 V, that op amps output some millivolts typically.