A few questions for my current sensing circuit. The main reason for this to exist is sampling current draw from a microcontroller and the surrounding circuits. The high sample rate requirement is for looking at current draw as the microcontroller wakes up and goes to sleep. There is also an ARM CMSIS-DAP debugger and JTAG scan support and a very crappy logic analyzer but these are irrelevant to the discussion here.
Some specifications:
- 1uA to 2A measurement range (switching sense resistors with some mosfets - based on the circuit here: https://www.eevblog.com/forum/projects/reducing-effect-of-rdson-in-mosfets-when-sensing-currents-above-1a/msg5721605/#msg5721605)
- 100mV max drop across sense resistor
- Common mode voltage of at least 5V. I would definitely like higher if possible
- Needs to survive reverse connection. Pretty much if I take the + and - lines connected to the DUT and swap the two there should be no magic smoke.
- Can also act as a power source (switching converter behind a mosfet on the high side).
- Ideally a 500MSPs sample rate. I can compromise a bit on this, but mainly because I suspect that I'm hitting the limits of USB FS. It would be great of course if I could get to 1MSPs.
- Sample using a microcontroller's ADC.
- A set of "calibration" resistors that I can switch in to compensate for offset voltages.
First the ADC. I am likely to use the RP2040 which has an enob of 8.6. However its not guaranteed to be the final part in the case that I would like USB HS (some STM32). If I do end up keeping the RP2040 then I might end up using an external ADC or something like an MSPM0G310 for a "smart" ADC to get to 10 bits.
First question picking an op amp? I have looked at some instrumentation amplifiers but find a lot of these are expensive and have some less than ideal bandwidth. At the same time because I am lazy I would like a part which has a high common mode voltage above 5V. I am tempted to add a gain of 10 as well to make the ADC go a bit further but I would need an instrumentation amp then. A 2nd stage programmable gain is probably another option.
If I can't find a suitable part with a high enough common mode voltage, then what options are available for increasing this while not messing up the current measurements?
A question relating to reverse protection: using a diode is probably a bad idea due to the voltage drop. Some sort of mosfet on the input and output of the sensing I think would stop backwards current flow (which I already need for the power source and to isolate output when using the calibration resistors.