Your fault is that your design specs are neglected. As a consequence, so is the margin to your operating conditions to specifications. Important things to consider are the margin to loss of CMRR where it stops working. The critical specs are input CM bias for a single supply;
- Vcc=5V
- Vio . . .1.7 typ 7 max. [+/- mV]
- CMRR 0 min -0.2 typ [V]
- All unused control inputs of the device must be held at VCC or GND to ensure proper device operation
The reason is that you are violating some parameter in the datasheet or the system design specs, such as;
-
Min V drop and input offset error, noise error
The input RMS noise levels can also degrade low current thresholds so this specification also comes into play
Recommendation
A design improvement adds some positive input Vcm margin to the inputs so that R2 is replaced with a circuit that moves from Gnd=0V to 1V
Pay attention to fine print on unused inputs and input offset voltage.
There are many different classes of OA's but it may not be obvious.
- RRI ( input only)
- RRO ( output only) e.g. LMV358
- RRIO ( input and output)
- CM input extends to or past Negative Supply (LM358 = -0.3V) which is why this part did not fail