The battery voltage = 12 volts.
In the first circuit The op amp works as a current to voltage converter and its output equation is:
Vout = - I * R
I choosed R to be 20 ohm so that each 50 mA will make -1 volt drop.
I put 240 ohm across the 12v battery and I closed S1 switch to make sure that the current passing through it is 50 mA.
Then, I opened S1 and Closed S2 and the output voltage of the op amp is -1 volt.
The equation works well yet.
In practice, I don't have a supply that can produce negative voltages, so I have to build a bias for the op amp which is in the second circuit.
The positive input of the op amp is now 6 volts.
When I close S2, I would expect the voltage to be 6 - 1 = 5 volts.
but the result is 5.5 volts !!
Why does that happen? and What modifications should I make to get correct results? can I add a buffer or something like that ?
If I can not modify the circuit, What is the best way to measure small currents without using multimeter or ammeter?
Thank you very much,