I was planning on implementing a current sense feature on the STM32 Bluepill to measure the current output of a solar panel (150 mA short-circuit current, 14 V Open-circuit voltage) using LM358 single-supply op amps and a 0.01 ohm shunt. No matter what I tried however, I kept getting an inaccurate output value (way bigger than expected, 0.7 V below the positive rail).
That led me to the conclusion that the issue might be caused by the difference between the ground voltage of the op-amp and the measuring loop (schematic below). This made me question whether it was even possible to measure current across such a low resistance shunt using a differential amplifier, or if something else is causing my circuit to act unpredictably.
It is important to note that the resistance between the breadboard pins I am using is 0.07 ohms which is probably the culprit here; in addition, when measuring the voltage on the input pins of the op amp with respect to op-amp ground (the pin itself) I noticed that their values are different from the ones with respect to the ground of my power-supply, and the output seems to correspond to their values and not the ones I intend to amplify. In other words, there doesn't seem to be a problem with the gain of the amplifier, or at least as far as I know.
I would love to get some clarification on this, in order to decide whether to buy instrumentation amplifiers or not.
Note: I also saw people placing ceramic capacitors between the positive input and ground and between the output and ground in this configuration. I thought since the problem might be noise-related then it would probably fix this issue, but it didn't.
simulate this circuit – Schematic created using CircuitLab