I have been thinking about how to automatically switch ranges on a current sensing application, to choose between different shunt resistors. The requirement would be to sense current on a +5V rail from below 100mA (not sure what exactly, but not really single-digits mA) to somewhere in the region of 4.5A. Initially, I was hoping to do this with a single 22mR shunt resistor, but I've realised that the accuracy would be garbage at the lower current levels. So I have been attempting to come up with a way of having 2 current shunts - one for 'low' range and another for 'high' range - and to switch between them automatically depending on load.
What I've come up with is the following:
I've chosen 220mR and 22mR shunt resistors. The former is for 'low' range which should handle 0-0.45A, and the latter for 'high' range, 0.45-4.5A. The current sense amplifier has a gain of 50V/V, giving an output in the range of 0-5V. The switching of current flow between the shunts is done by P-channel MOSFETs. The gates of the P-FETs are driven from a 12V rail, which should give them at least 5Vgs, yielding a decent on-resistance (will choose something with Vgs@-4.5V of <20mR) and fairly low power dissipation (<0.5W at full current). The negative input to the current sense amplifier is switched between the shunts by an analogue SPDT mux, which is a break-before-make type. The range switching input signal will be controlled by a microcontroller, which is also reading the current level with ADC.
There are some uncertainties or areas of concern I have:
- I'm using a 74-series inverter to drive one FET to the opposite state of the other. I'm aware that such inverters have propagation delay. Will this be an issue?
- Does the on-resistance of the analogue mux have any effect on the current-sense amplifier? I'm assuming the inputs to that are very high impedance, just like an op-amp, and it won't. I chose a mux that seems to be common, a TI TS5A3159A with 1R on-resistance, but others have 5R, 15R, etc.
- Are there any special tricks to implementing range-switching logic? I do plan to put some hysteresis in the change-over thresholds.
Any other comments welcome.