What does the J5 Pin Specifically Do on the ESP32-H2?

siatran
Posts: 7
Joined: Sat Mar 02, 2024 4:04 am

What does the J5 Pin Specifically Do on the ESP32-H2?

Postby siatran » Sun May 26, 2024 9:12 pm

Hello everyone,

My goal is to measure the energy consumption of my ESP32-H2 DevKit when running the OpenThread deep sleep example program given on ESP-IDF: https://github.com/espressif/esp-idf/tr ... deep_sleep. In order to do so, I am using the Power Profiler Kit II, since it was one of the recommended devices in the ESP32-H2 documentation: https://docs.espressif.com/projects/esp ... te-ammeter.

When I first measured the power consumption of my ESP32-H2, I connected the VOUT of my PPK2 to the 5V pin of my ESP32-H2, and the GND of my PPK2 to the GND of the ESP32-H2. When doing so, I was getting measurements of ~1.25 mA when the device on deep sleep, when my PPK2 was supplying 5V of power to the ESP32-H2:
Screenshot 2024-05-26 at 1.47.25 PM.png
Screenshot 2024-05-26 at 1.47.25 PM.png (331.91 KiB) Viewed 2009 times

However, this is way off, as per the screenshot shown in the ESP-IDF OpenThread deep sleep example:

Image

the device should be average around ~7-8 uA on deep sleep.

After doing some investigation, I found a section in the ESP32-H2 DevKit documentation that talked about a J5 pin that must be used when measuring current: https://docs.espressif.com/projects/esp ... easurement.

According to the documentation, it seems that the "J5" pin must be removed before measuring current the ESP32-H2. As a result, I did the following steps:

1. I removed the J5 Pin Header from my ESP32-H2.

2. I connected the VOUT of my PPK2 to the 3V3 pin of the ESP32-H2 (rather than the 5V pin).

3. I connected the GND of my PPK2 to the GND of my ESP32-H2.

4. I made my PPK2 supply 3.3V of power to the ESP32-H2 (rather than 5V).

At the hardware level, I noticed the following observations, as shown in the pictures below:
Screenshot 2024-05-26 at 2.01.27 PM.png
Screenshot 2024-05-26 at 2.01.27 PM.png (859.58 KiB) Viewed 2009 times

Even though the LED of the ESP32-H2 was off with the J5 header removed, it was still on and sending packets.

When I removed the J5 header, and used the 3V3 port, I was getting significantly more accurate measurements on the PPK2:
accurate.png
accurate.png (336.79 KiB) Viewed 2009 times
At a higher level, I believe the removal of the J5 pin resolved the measurement inaccuracies of the ESP32-H2 in deep sleep. However, I am still mystified on what the J5 header it, what's it is supposed to do, and how to use it so I accurately measure the power consumption of the ESP32-H2 on deep sleep.

To the best of my knowledge, other than the documentation, I could not find any resource that could explain to me what the J5 pin is actually doing, and what steps I can take to properly configure the PPK2 to accurately measure the current of the ESP32-H2.

As a result, I have the following questions:
  • What is the purpose of the J5 pin? Did the removal of the J5 header solve my issue, and if so why? At a higher level, what do I need to do in order to properly configure both the PPK2 and ESP32-H2 such that I can get accurate current measurements of the ESP32-H2 under deep sleep?
  • I am getting ~7.86 uA on the PPK2, but Espressif got ~7.6 uA on the Joulescope. Furthermore, page 34 of the ESP32-H2 datasheet: https://www.espressif.com/sites/default ... eet_en.pdf, states that the current consumption under deep sleep is 7 uA. As a result, I want to ask if my measurements being off ~7.86 uA means my measurement setup is incorrect, or is this slightly inaccuracy expected of the PPK2? If so, am I better off using an oscilloscope, rather than the PPK2, to measure current?
Any guidance, feedback, and advice on what I can do to configure both the PPK2 and ESP32-H2 so that I can accurately measure the current of the ESP32-H2 would be greatly appreciated.

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby ESP_Sprite » Mon May 27, 2024 12:49 am

I can't help you with the current measurement itself, but the page for the devkit has some more information: "Remove the jumper: Power supply between the module and peripherals on the board is cut off. To measure the module’s current, connect the board with an ammeter via J5 headers." The schematics shows that the jumper specifically sits between the 3V3 rails and the Vcc of the ESP32-H2. If you remove the jumper, the ESP32H2 doesn't receive power directly anymore, but it may still turn on because of voltages on other GPIOs.

siatran
Posts: 7
Joined: Sat Mar 02, 2024 4:04 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby siatran » Mon May 27, 2024 8:01 pm

Hello ESP_Sprite,

I greatly appreciate you taking the time to answer my questions, and for clarifying what the J5 pin does. At the same time, I have two follow-up questions.

My first question I would like to ask is, given the quote from https://docs.espressif.com/projects/esp ... -1-current:

Remove the jumper: Power supply between the module and peripherals on the board is cut off. To measure the module’s current, connect the board with an ammeter via J5 headers.

whether or not am I using the J5 cable correctly. So far, what I did is to remove the J5 header and plug jumper cables between the PPK2 to the GND and 3V3 pins of the ESP32-H2. Is this the correct way to do this, or should I plug the jumper cables to the pins on the J5 directly - this is what it seems to be implied by the documentation.

Furthermore, I would like to ask if I should still use the PPK2, or am I better off using a Joulescope - the tool that is used in the ESP32 documentation https://docs.espressif.com/projects/esp ... connection. That seems to be what they used to measure the current for their deep sleep example: https://github.com/espressif/esp-idf/bl ... mption.png. My goal is to measure currents as low as 7 uA, the power consumption of the ESP32-H2 on deep sleep.

I know you may not be able to answer my questions about current directly, but any guidance would be greatly appreciated. Or instead, would you recommend me to ask in the NRF forums about current measurement, as I'm using the PPK2?

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby ESP_Sprite » Tue May 28, 2024 6:13 am

I think if you put the PPK2 in the mode where it generates 3.3V, you should connect it to the ground and the correct pin of J5. Note that you do need to use USB or something to power the rest of the logic as well.

On PP2 vs Joulescope - both should be usable, from what I remember one just is a much higher investment than the other.

siatran
Posts: 7
Joined: Sat Mar 02, 2024 4:04 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby siatran » Tue May 28, 2024 7:05 pm

I greatly appreciate your reply ESP_Sprite. I just have one more question. I understand that if I pull out the J5 pin, I must use 3.3 volts. But I want to ask about the case of 5 volts. I was initially doing my measurements at 5 volts with the J5 header inside, but this made me get wrong results. However, I got the correct measurements using 3.3 volts AND pulling the J5 pin out. If I did 5 volts with the J5 pin out, I would still get inaccurate measurements (it would tell me the average is ~12 uA).

Is the fact that I got it working with 5 volts instead of 3.3 volts just a coincidence, or should I properly be measuring it with 3.3 volts with the J5 pin out instead? In other words, is my original method measuring with 5 volts with the J5 header inside a valid way to measure the current of the ESP32-H2? If so, then it will allow me to deduce that there is something else going on causing my current measurement inaccuracies.

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby ESP_Sprite » Wed May 29, 2024 1:07 am

You must use 3.3V on the J5 pin. If you don't, depending on where you applied the 5V, you either fry the ESP32 or you also measure the quiescent of the LDO.

siatran
Posts: 7
Joined: Sat Mar 02, 2024 4:04 am

Re: What does the J5 Pin Specifically Do on the ESP32-H2?

Postby siatran » Wed May 29, 2024 4:07 am

Thank you very much for the clarification ESP_Sprite. Just to make sure I understand, in order to measure the current of the ESP32-H2, I must use the J5 pin and I must power it at 3.3 volts? And this is the only way to properly measure the current of the device? I just want to ask to double check my understanding is correct. If so, then I know what I need to do, and I will have all my questions answered.

Who is online

Users browsing this forum: No registered users and 36 guests