Reducing power consumption for ble mesh sensor server node using LPN mode

Hi, 

I am using nrf mesh sdk v5.0.0 and am using sensor server model example to build our own application on top of it. SOC we are using is  nRF52832.  I have enabled the LPN mode in the example and I am also able to establish friendship with a nearby friend node. And am also receiving messages intended to the LPN node when the LPN node polls its friend node. The purpose for LPN node is to reduce battery consumption by disabling the scanner. But the device is consuming a solid 5 - 8 mA after establishing friendship. Is it possible to reduce the battery consumption in the micro amperes range. Any guidance on how to achieve it would be really great. I am also interfacing an LED, I2C sensor and a switch with the SOC. Before and after establishing friendship, I am seeing same amount of current being consumed. 

Parents
  • Hi Hariharan, 

    Could you describe how did you do the test ? How did you do provisioning ? 


    Have you tested with the LPN example with no modification ? In the example the power consumption should drop down to few uA after it provisioned and get a friendship. 

    Which current do you see exactly after you establish friendship ? Have you verified that the CPU was not being kept awake by other modules ? 

  • I am provisioning the sensor node using an ESP32(acting as a provisioner). Once the provisioning and model configuration is done, I am initiating the friendship establishment procedure. The current consumption goes as low as 150ua after establishing friendship. But it increases to 3ma after publishing data once. And it should return to low power consumption mode right? But its not. The sensor node is constantly consuming 3ma after publishing. I dont know why this is happening. Can you please guide me?

  • Hi again, 
    What I'm suspecting is that the CPU is stuck in a dead loop somewhere in the code. Besides high current consumption everything works ? 


    Even at 400uA , it's high current consumption in my opinion. I don't know how you configure the node, have you checked if 400uA is the idle current or it's the average current ? 

    Could you try doing I2C communication in the main loop (set a flag in the callback and execute the I2C activity in the main loop and go to sleep after that) and check if it make it high current consumption ? 
    Could you provide the minimal code (for example modify the LPN example) so that we can test here ? 

  • Hi,
    Yes. Besides higher current consumption, everything else is working as expected.

    Yes, it is a higher current consumption. Can you please tell me which node configuration you are referring to? When the CPU goes to sleep after friendship is established, the current goes down to around 400ua. When publishing it goes to upto 600-700ua and then back to 400. I am using multimeter to measure current consumed.

    So you are suggesting me to do the i2c read in main loop instead of in the callback itself without deinitializing and reinitializing it?

    Sure. Will provide one tomorrow. Its past 9 in the eve here.
  • Hi Hariharan, 
    I did a quick test here with the LPN example. What I found is that after LPN established friendship the current consumption should be around 16uA. What you have of 150uA or 700uA is still too high. 
    Please try to test with the LPN example again. Did you test using our nRF52 DK ? 

    Have you keep RTT logging when testing ? If you do please disconnect RTT or disable logging in the code. 

    Do you have a PPK2 (power profiler kit) ? If you do, you can capture the current consumption , for example here is what I have : 

    You can find the consumption is around 16uA with a peak every 2 seconds for polling friend node. 

    The idle current consumption is about 9uA: 

    If you see a peak of 100ms , it was because of RTT_INPUT_POLL_PERIOD_MS = 100ms. If you set RTT_INPUT_ENABLED = 0 in nrf_mesh_config_app.h you will not have this 100ms wake up period. 

    So if you see anything above dozen of uA , there must be something wrong. If you don't have a PPK2 I would strongly suggest to get hold of one. 

  • Hi,

    Previously, I have written our application using senor_server example as our base application and integrated all the peripherals and low power node in the sensor_server example. Now, I was integrating the peripherals and sensor models with the low power node example as our base application. 

    And it seems to be working so far. The device is consuming low current of 150ua (which is more than enough in our use case) when no peripherals were integrated. When the peripherals were integrated and initially in the unprovisioned state, the device was consuming around 1.8ma as a timer and LED is used to indicate the unprovisioned state. After provisioning, I disable the timer(I use timer's handler to toggle led - reason for higher current consumption) and the node goes to low power state immediately. 

    Now, I want to integrate the sensor models into the application. When I tried to initialize the sensor models in the low power node example with the API - "app_sensor_init(&m_sensor_server_0, APP_SENSOR_ELEMENT_INDEX);" , the return code which I am getting is 4 (which corresponds to NRF_ERROR_NO_MEM). Can you help me troubleshoot this issue?

    And we don't have a PPK2 with us.

  • Hi Hariharan,

    Could you please test with the unmodified LPN example ? As I mentioned in the last reply, 150uA is too high, you should see around 16uA. 

    Even if you don't have a PPK or a oscilloscope to measure the current/voltage drop , you can use a simple multiple meter and should see the similar average current. 

    If you don't there must be something wrong with your board. Please try to compare the current consumption on a Dev Kit and check why there is a difference. 150uA without doing any activity (except for polling the friend node) is not normal. 
    Even if you use a timer (RTC not the TIMER) 150uA is high. If you use a timer (RTC) the current should increase only a few uA and the timer (RTC) is already used by the mesh 

    Regarding your issue of NRF_ERROR_NO_MEM, if you read the description of the function , you can find this: 

    You may want to increase ACCESS_MODEL_COUNT or ACCESS_SUBSCRIPTION_LIST_COUNT. Please try to debug if you see an error, you can step into the code and check why the function throws an error. 

Reply
  • Hi Hariharan,

    Could you please test with the unmodified LPN example ? As I mentioned in the last reply, 150uA is too high, you should see around 16uA. 

    Even if you don't have a PPK or a oscilloscope to measure the current/voltage drop , you can use a simple multiple meter and should see the similar average current. 

    If you don't there must be something wrong with your board. Please try to compare the current consumption on a Dev Kit and check why there is a difference. 150uA without doing any activity (except for polling the friend node) is not normal. 
    Even if you use a timer (RTC not the TIMER) 150uA is high. If you use a timer (RTC) the current should increase only a few uA and the timer (RTC) is already used by the mesh 

    Regarding your issue of NRF_ERROR_NO_MEM, if you read the description of the function , you can find this: 

    You may want to increase ACCESS_MODEL_COUNT or ACCESS_SUBSCRIPTION_LIST_COUNT. Please try to debug if you see an error, you can step into the code and check why the function throws an error. 

Children
Related