The Auto-ranging function can be enabled (or toggled) at any time by tapping the nA & mA touch-pads simultaneously. The CurrentRanger will beep, the OLED (if connected) will display an AUTO mode indicator, and it will start auto-ranging. If no load is attached it will quickly switch to the nA range.
A few things to note when enabling auto-ranging:
- When auto-ranging is active, the ADC will sample the output as fast as possible to catch any range switching conditions
- Bias mode and auto-ranging are mutually exclusive, Bias mode will automatically be disabled when auto-ranging is enabled
- To help ensure stable switching with fast dynamic loads, the LPF is automatically enabled during auto-ranging, and disabling the LPF will also disable auto-ranging
- Manual ranging is disabled while auto-ranging is enabled
- The touch-pads can still be used to:
- enable the LPF (nA + µA)
- enable Bias mode (µA + mA), this will then disable auto-ranging
- disable auto-ranging and revert to manual ranging (nA + mA)
It may take up to a few milliseconds for the CurrentRanger to react and switch ranges when an overload condition is detected by the ADC. When a DUT wakes from a low power state (higher impedance) into a higher power consumption mode (lower impedance), there will be a significant voltage drop presented to the DUT until the proper range is switched to.
For some DUTs (especially if they have very low power rail capacitance) this voltage drop may be too much if it lasts more than a certain amount of time (could be on the order of microseconds) and the DUT may “power-starve” or enter into a Brown-Out condition.
However, for all tested DUTs during the development of CurrentRanger, this delay/voltage drop was not significant enough to cause such a power failure for the DUT. This is especially not a problem for purely resistive loads.
Output voltage offset and measurement sample
Here’s an example of measuring current through a 50Ω load from a 2xAA battery. These are the observations:
- DMM and scope are both connected at the output
- OLED is also attached
- LPF is ON resulting in a nice trace on the scope (DMM readings are unaffected by LPF in any way)
- As soon as the DUT load is connected, the unit ranges from nA to mA, updates the OLED with a reading as seen below
Although the constant auto-ranging ADC sampling introduces some noise in the output trace, it can be significantly reduced with the LPF resulting in a smooth trace:
Switching dynamics artifacts
The MAX4239 opamps are very special amplifiers. However they are not perfect and you will notice the output will swing and oscillate when recovering from an overload (ie. when auto-ranging detects an overload, it switches to the next range up). To quote the datasheet (see Overload Settling, page 3):
Overload recovery time is the time required for the device to recover from saturation when the output has been driven to either rail.
This is a documented limitation of amplifiers in general, and will become evident on a scope trace when a DUT creates an overload by waking from a low power state (ex. from drawing a few uA, to drawing a few mA). Other than a potential voltage drop during switching ranges (as mentioned above), the DUT is not affected by this output settling in any way, only the actual output will ring/oscillate while the amplifiers recover from saturation, an example is shown below:
For very low MCU sleep modes, the CurrentRanger will auto-range to the nA or uA range. When your MCU or load wakes up from sleep very quickly, it’s possible it might brownout until the CurrentRanger has a chance to range up to a higher range. There are two possible approaches.
- Add an external diode across the input terminals (from positive > to > negative) – this starts conducting at the diode forward voltage (~0.7V) when there is too large of a drop across the current range shunt. This way, if your MCU can handle a 0.7V drop, then it should not brownout until the proper range is switched. Be aware that the diode can have some leakage, but generally you should still get a fairly accurate reading at the output.
- Modify the ADC algorithm of the CurrentRanger to take less samples and do less averaging before it decides it’s time to switch to a higher range.