I am trying to design an USB power outlet with current monitoring. See the attached schematic.
I have places a current sense resistor on the low side, and a fuse on the high side.
I am amplifying the voltage across the current sense resistors with an opamp.
I intend the feed the output voltage of the opamp to an ADC of a microcontroller,
and display the current on some display. But that's a part for later, for now, I
am focussing on getting the current sensing part working.
I am using a 1K5 in stead of a 10K for R7 and R8.
I am using a TP2604 in stead of a LM358.
I am running into an offset problem:
Initial offsets ain't a problem, as I can compensate for that, but the problem is the right channel, where the output only starts changing after a certain current is flowing.
| Current (mA) | Left port (mV) | Right port (mV) |
| 0 | 13,7 | 73,8 |
| 23 | 13,7 | 91,6 |
| 45 | 13,7 | 109,6 |
| 66 | 30,0 | 126,4 |
| 87 | 46,7 | 142,3 |
| 107 | 62,9 | 158,0 |
When first running into problems, I've tried to change the resistor values (my initial design has 900K for R5 and R6, thinking this was too high)
Then I tried replacing the opamp. My LM358 was from eBay, so I replaced it to rule out it's a fake.
Is there anything to look for to fix this problem. I'm thinking I possibly need a different type of opamp to operate so close to ground. I realise it only mentions real-to-real output, but doesn't say so about input. Might that be the source of this issue? If so, how to select a suitable opamp, what are the parameters to pay attention to?
Edit: fix table formatting