Measuring current consumption on Nano 33 BLE while running neural networks

Hi there,
I'm trying to measure the current consumption from my Nano 33 BLE when it's idle (with empty sketch uploaded) versus when it's running various machine learning models on it. I'm powering it with 3 volts and in the idle state it uses 12.85 mA, while running a machine learning model and using LSM9DS1 sensor, it consumes 7.89 mA.
Why is it using less power when running ML tasks versus when idle? It seems counterintuitive.
Any suggestion or idea why is it so? Thank you!

Why do you believe an "empty" sketch has no instructions that run? Your sketch will always have instructions that run, just a different set.

Thank for your response.
I thought that running large ML models would have relative more tasks to perform for the processor as compare to when it runs empty sketch. Doesn't it works like this?
Is it because when its idle, it powers all the peripherals and BLE module while when running ML models, it doesn't?

It's ALL based on the processor clock speed and the actual instructions being executed. The processor is ALWAYS running if the clock is working. Look at the actual machine instructions that the processor has available and see if some might require more current that others.
When you add your program to the basic stuff the processor is always running, there are just a different mix of instructions. They may all run at the same speed. The processor documentation may or may not give an indication as to the current required changes.

1 Like

I think you have a mistake in the measurements or use a different setup in both cases. For example, did the BLE switched on (or off) the same in both cases?

If the measurements are correct, consumption under the same conditions should be approximately equal - @Paul_KD7HB explained the reason.

I have tried multiple ML models and all of them consume 7.98 mA to 8.03 mA. I tested with another Nano 33 BLE board and its the same readings. Are these measurements correct and is this normal? I didn't configured anything specifically for the BLE module. I just used the board out of the box.

I think you have shown me those results are normal. But! What if they were not normal? How does it really matter?