Hi,
I’m teaching low power MCU techniques to undergraduate EE students.
I proposed a challenge to write firmware for an application which reads a sensor and writes the output to an external memory every 3 seconds, and then try to make it use as little current as possible by using my MCU’s low power features (lowering clock and bus speeds, using low power sleep/stop/standby modes), etc. The hardware is an STM32F4DISCOVERY development kit, which has a jumper at the power supply so I can insert a (high-side) ammeter/shunt resistor for current measurement.
Because the MCUs will be going into deep sleep modes, current consumption may range from 1 uA up to 100 mA (but 10-20 mA would probably do). Once the firmware is fully optimized, I expect a typical current profile will be a few uAs during a 2,999 ms interval and a few mAs for 1 ms while actually reading the sensor and writing to memory. Do note that, since it’ll spend most of the time using up just a few uAs (1.7 to 4.0 according to the MCU data sheet), it’s important to have a fairly good resolution at this current (I’m thinking at least 100 nA) to avoid a considerable error while integrating this current for the averaging process.
I need to measure average current consumption of each firmware and rank students according to how low they are able to take it. Ideally, if I could also get fast, instant readings at a high enough rate (say, every few us to at most 1 ms), that would be very useful during firmware development. For this I don’t really need a high precision; I just need to distinguish between the different sleep modes, whose current consumptions are on the order of mA to tens of mAs; hundreds of uA; uA.
I understand tools like the uCurrent Gold or Current Ranger would be best to perform this kind of measurement, but I really need to stick to the hardware the university has at hand, and I can also lend my own personal hardware if it is useful. Unfortunately there’s no budget for new hardware at the moment.
Here’s a listing of what stuff I could use:
- Keysight U1252B;
- Keysight U1271A;
- Old HP 34401A;
- HP 3458A (although I’d like to avoid using it if possible);
- Keysight DSOX2004A, upgraded to MSOX2024A with all options enabled, but only the stock 10x passive voltage probes (no current or differential probes.)
So, can anyone help me concoct a measurement setup for average current consumption measurement in this scenario, and ideally, something that can measure a current consumption waveform that can be viewed on the oscilloscope to aid firmware development?
My thinking right now is to use the HP 34401A on the 10 mA or 100 mA range, in which it uses a 5 ohm shunt resistor according to its data sheet. Then I could integrate over 180 PLCs (the line frequency here is 60 Hz) which should give me on the order of 26-bit resolution according to this Keysight document:
https://www.keysight.com/main/editorial.jspx%3Fcc%3DUS%26lc%3Deng%26ckey%3D710001-1-eng%26nid%3D-33254.0.00%26id%3D710001-1-eng] [url]https://www.keysight.com/main/editorial.jspx%3Fcc%3DUS%26lc%3Deng%26ckey%3D710001-1-eng%26nid%3D-33254.0.00%26id%3D710001-1-eng[/url].
As for measuring a waveform on an oscilloscope, I’m thinking of leaving the multimeter there just to use its shunt resistance, and then to hook up two oscilloscope probes, one at each end of the shunt resistor, to simulate a poor man’s differential probe by using the subtract function on the oscilloscope in math mode. I could probably use the averaging acquisition mode to coax out a few extra bits out of the oscilloscope’s 8-bit ADC.
Any other suggestions? Thanks in advance.