Jump to content
  • 0

How to Use the Analog Discovery 3 to Measure Deep Sleep Current on an ESP32?


siatran

Question

Posted (edited)

Hello everyone,

My goal is to use the Power Profiler Kit II (PPK2) to measure the energy consumption of an ESP32-H2 under deep sleep, when it is running the boilerplate OpenThread deep sleep program given by Espressif (the manufacturer of the ESP32-H2). However, in order to double check that my PPK2 is actually getting the correct current measurements of ~ 7 uA at deep sleep (as stated by Espressif), I am currently trying to use the Analog Discovery 3 to measure the current of my ESP32-H2 under deep sleep. The reason I am doing so is because an engineer at Nordic Semiconductors (the manufacturer of the PPK2) recommended me to use an external measurement device if I think that the PPK2 is giving me inaccurate measurements.

Since the Digilent Analog Discovery 3 cannot measure current directly, I created the circuit shown below, with a 1 Ω resistor.

OscilloscopeCircuit.thumb.png.8e80d6f06fb2c2f5e621c6ee62f5c4b0.png

A picture the circuit that I built can be seen in the images below:

IMG_8794Medium.png.95ca849551ca35e66b721766c27eaa78.png

IMG_8795Medium.png.f4b9d66e765d63b1961691ad5e4f8d71.png

I used the "Scope mode" of the Digilent Waveforms application. I used a math function to subtract the measured voltages between Channels 1 and 2 to obtain the voltage drop, and then I converted that voltage drop into current, measured in mA.

I then compared the measurements I got from the Analog Discovery 3 with what I got when the PPK2. When using the PPK2, I used its own power supply, rather than the supply of the Discovery 3.

When using the Analog Discovery 3 there are two issues I noticed. First the PPK2 is able to measure the deep sleep current at close to ~7.5-8 uA:

Screenshot2024-06-01at5_40_56PM.thumb.png.29452b5c904328e5170760f42e179c8a.png

 

but the deep sleep current measurements Analog Discovery 3 seem to be a bit noisy:

Screenshot2024-06-01at5_09_18PM.thumb.png.092a5070810d33c498ab1f603041ec16.png

 

When it comes to the current measurements on wakeup, the Analog Discovery 3 gives the same waveform shapes as the PPK2, but the maximum currents are different.

In the PPK2, the maximum current never reaches greater than 140 mA:

Screenshot2024-06-01at5_17_08PM.thumb.png.17e2ea6b117dc71b8b121a0885969f88.png

But the Digilent Analog Discovery gives larger currents as large as 150 mA on wakeup:

Screenshot2024-06-01at5_11_53PM.thumb.png.1c8d16d5857fb9f391136f69e4eb39ba.png

Furthermore, as can be seen above, the waveforms in the Analog Discovery 3 seem to be less detailed than the ones offered by the PPK2. I also tried modifying the circuit by using a 0.1 Ω resistor resistor, but I still get the same deep sleep measurements that I got in the screenshots above (i.e. when using the 1 Ω resistor).

Given that my results from the PPK2 more closely match the expected ~7 uA deep sleep than the Analog Discovery, I could just say that the PPK2 is accurate and my circuit setup is incorrect. However, I can't make this conclusion from the results of the Analog Discovery 3, as it doesn't tell me whether the problem is coming from my circuit setup or the PPK2. As a result, in order to truly confirm that the PPK2 readings are inaccurate, my goal is to set up the circuit with the Analog Discovery to see if it possible to obtain the same results as the PPK2.


At a higher level, I suspect that there might be something I am doing wrong with my setup when measuring deep sleep, and I'm trying to confirm whether the source of the problem is the potential measurement inaccuracies with the PPK2, or how I configured my ESP32-H2 microcontroller. Assuming I am using the Analog Discovery 3 correctly, I can use its measurements to determine where the source of the problem is coming from.

As a result, I would like to ask what am I doing wrong, with respect to my circuit setup and how I use the Analog Discovery 3, that is causing me to have measurements that are inconsistent with the PPK2 and the measurements given by Espressif? Any feedback and guidance that can help me in the right direction would greatly be appreciated. 

 

Edited by siatran
Mentioned that I used PPK2 power supply when using PPK2.
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Hi @siatran

For such measurements dedicated tool may be better which has higher ADC resolution (and lower frequency).
You could use
Current and Power Adapter or similar setup: https://digilent.com/reference/test-and-measurement/current-and-power-adapter/start
The AD3 ADC resolution is ~75uV with 1R ~75uA and you want to measure ~7uA. You could try higher resistor values to increase the current measurement resolution.
Also, for better measurement use the Scope inputs as differential. Perform quick offset calibration in Scope interface with 'Zero offset', Option under Time, or Channel dropdown menu.

image.png

Link to comment
Share on other sites

  • 0

Hi @attila,

I really appreciate you taking the time to answer my question. I've been stuck with how to move forward for some time, but your explanation cleared a lot of things up for me. It makes sense why I wasn't having the correct measurements, as I didn't have the Current and Power Adapter and didn't calibrate my probes for measuring such low currents.

 

Thank you so much for helping me with my question. If I have any followup questions, I will post them later in the week. With your help, I now know what I need to do to head into the right direction.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...