How to measure the power consumption (security protocol)

Hello everyone,

my colleague implemented two security protocols based on Learning Parity with Noise (LPN) problem which is HB and HB+. One of my task is now to measure the power consumption of the Arduino Uno while it runs the protocol. I didn`t plugged any moduls such as LED, display, ..., its just the Arduino Uno itself running a security protocol plugged into the pc with USB. Btw I have a cheap Multimeter (hama EM393B) but couldn't figure out where to put the probes in order to measure the power consumption.

This is my first post and thank you in advance for any help.

You can get USB power meters that you simply plug into the USB cable between the computer and the Arduino.

In order to measure the power you need to measure the current and voltage at the same time. It is difficult to measure the current when you are using the USB connection so it may be better to supply the unit from the 5 Vcc connection (if your Arduino uses 5 V).

Also note that when using the USB as power supply a fair amount of power is used by the voltage regulator. Depending on what your Arduino is actually doing the power used by voltage regulators, LEDs, etc. can be much larger than what the Arduino uses.

Thank you for your quick reply,

Unfortunately i don’t have USB power meter. I plugged a power supply module (1PC) to a breadboard. Now I used one cable coming from the (+) point of the breadboard into the vin pin from my Arduino. The (-) point is connected to GND pin. (see picture). I also tried to measure the current put the meter in-line.

I followed this discription:

But still no result, maybe i am doing something wrong…

Your setup in the picture looks OK. I assume that your Arduino is working perfectly this way?

What do you mean by "no result"?

You should set your meter to "200 mA" and connect your leads to COM and VmAOhms. Does your meter read 0 A? Try lowering the dial to "20 mA". What happens?

If your meter doesn't respond to any current measurement it could be because a fuse is blown. if so, check the fuse. You may also want to check the battery while you have the case open.

Yes you are right it must be the fuse of the VmAOhms lead(I guess). Now I put the lead into the 10A and it shows 00.3 when the dial is at 200mA (see picture). Before it didn’t even react to anything and the arduino couldn’t even start.

Last question:
Can I take the 00.3 number as a result now?

If the Arduino can't start when you're using the middle socket then it is surely a blown fuse that is to blame.

From the reading you're showing the current is 0.3 mA, which isn't much. Try to change the setting to 20 mA or even lower to see if that gives any useful reading.

The manual says that you must use the middle socket on the meter for measuring less than 200 mA so you'll probably not get any accuracy from using the 10 A socket. You need a new fuse.

Also I fear that your meter is not accurate enough to measure any change in power consumption, but you'll just have to test it.

Also if you need to find how much power the board is using you need to measure the voltage while you are measuring the current. Note that when you use a significant amount of power the voltage will often drop.

If you get the meter (or meters) working what is it you are trying to measure? If you are trying to find the difference between two algorithms you must make sure that everything that is not essential is switched off. This includes LEDs and any circuits outside and inside the MCU that you don't need. If the algorithms do not take the same amount of time to complete you may be more interested in knowing the energy consumed than just the power. When the Arduino is not doing anything (e.g. when using delay) it still just consumes power. You should consider setting the Arduino in sleep mode when it doesn't do anything useful (if that makes sense for your application).

One of my task is now to measure the power consumption of the Arduino Uno while it runs the protocol.

When not in any of the sleep modes, the power consumption of the Arduino processor itself is essentially constant. You probably won't be able to measure any difference with a multimeter.