This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 ble_app_uart example using PCA10059 high current consumption

I have modified the ble peripheral example - ble_app_uart to run on the PCA10059 USB dongle and the demo I developed using that as a starting point works very well. The problem I am experiencing is that the I am powering the dongle with 2 - AAA batteries but they are only lasting ~3 weeks connected to a raspberry Pi 0 W. I modified the traces to configure the power input to be compatible with 3.0 Volts input and enabled the DC/DC converter to try and improve the battery life but after 2 weeks the batteries are already down to 1.4 volts per cell. The dongle is connected to the Pi 100% of the time, the communications are limited to a "proof of life" check once a minute but for the most part that's the only communications besides maintaining the connection to the Pi. I disabled the HW uart used in the example to attempt to reduce the current further but I haven't experienced much improvement. Is there something in the example that could cause excessive current draw? Should the dongle not be continuously connected?

Thanks in advance.

Dan

Parents
  • Hi Dan,

    Have you modified the connection interval configurations in the example? By default, this is set to between 20ms (MIN) and 75ms (MAX) in the ble_app_uart example. If it gets set to 20ms, the average current of maintaining the connection will be between 226-320uA (with/without DCDC enabled) according to our Online Power Profiler for BLE. If you can accept longer latency in transfers, you can increase these parameters to reduce the current consumption, or you could enable slave latency to allow the slave to ignore a given number of connection intervals.

    What is the capacity of the AA batteries you have tested with, to allow us to give better calculations of battery life?

    Have you measured the current consumption by the example when running on the Dongle? Note that use of the LEDs will also increase the current consumption of the system.

    Best regards,
    Jørgen

  • The connection intervals depends on how low current consumption you want, and how much latency you can accept.

    You can play around with the numbers in the Online Power Profiler yourself to see how the average current is affected by different numbers. For instance 100ms will give 48uA average current, while 500ms will give 12uA. The interval can be increased up to 4000ms.

  • Hi,

    30 mA sounds a bit excessive. The radio would need to be transmitting constantly with highest output power to get close to this current draw.

    How have you modified the Dongle for use with 3.0V? Did you follow the instructions in External regulated source? Note that if the dongle have been connected to USB power with SB1 soldered and SB2 not cut, that could cause damage to the chip, with possible higher current draw fra REG0 regulator.

    If you could post a diagram of all your connections for powering the dongle, in addition to the current measurement, we can try to help you determine what is going on.

    I would also recommend that you consider getting a nRF52840 DK for development. This is prepared for current measurements of the nRF52840 power domain only, and you can easily disable other parts on the board to measure current draw from external sources. The PPK is also a great tool for measuring current in real-time in applications.

    Best regards,
    Jørgen

  • Yes, I modified the dongle following the guide to use an external source. SB1 is shorted and SB2 is open for use with the AAA alkalines. I swap open SB1 and close SB2 when I connect USB for code updates.

    The .1 ohm shunt is connected to the red wire just before the dongle. The alkaline batteries are housed underneath. I'll consider ordering a DK in the near future. Like I mentioned, I'm currently just evaluating the nRF52 at this point

  • please disregard my current measurements. I was using a USB scope and after further analyzing I have found an offset in the measurement. I am moving to a DSO scope and will return with results from that test

  • I measured the voltage across the shunt with a benchtop HP precision DMM and the current is ~10mA while connected to my phone running the Nordic Connect APP. Not sure what else I can do so I give up

  • 10mA still sounds high for the average current, but it could correspond well with the radio currents during RX/TX (given that DCDC is disabled, and you are using the default output power.

    Again, I would recommend considering the PPK for measuring currents, it gives you real-time measurements over time, and is great for debugging current issues in your application. It is also not limited to Nordic products, and can be used for measuring current from any device within the specs.

    Regarding your evaluation, I am confident that the numbers in the Online Power Profiler can be trusted for evaluation current consumption from BLE applications. If you wanted to evaluate other peripherals as well, that would be a bit harder without the DK.

Reply
  • 10mA still sounds high for the average current, but it could correspond well with the radio currents during RX/TX (given that DCDC is disabled, and you are using the default output power.

    Again, I would recommend considering the PPK for measuring currents, it gives you real-time measurements over time, and is great for debugging current issues in your application. It is also not limited to Nordic products, and can be used for measuring current from any device within the specs.

    Regarding your evaluation, I am confident that the numbers in the Online Power Profiler can be trusted for evaluation current consumption from BLE applications. If you wanted to evaluate other peripherals as well, that would be a bit harder without the DK.

Children
  • I have enabled the DCDC in my code.

    Is there any reason the ble_app_uart example would be continuously transmitting? I assume it doesn't TX unless data is being transferred across the BLE link. I disabled the HW uart so that shouldn't be an issue. I don't think I can budget the PPK without an active project to put it against. Thanks

  • catfish said:
    Is there any reason the ble_app_uart example would be continuously transmitting?

    No, not without large modifications to the example and sending/receiving data over UART.

    The softdevice will only enable the radio at the configured connection interval, but it is possible to configure it to send/receive more data to increase the time the radio will be on. This is an example where I reduced the connection interval to 7.5ms, increased the output power to +4dBm, and increased packet lengths to transmit and receive 251 bytes of data every connection interval:

    catfish said:
    I assume it doesn't TX unless data is being transferred across the BLE link.

    It will transmit an ACK to the central on each connection interval (unless slave latency is enable), to tell the central that it is still present and the connection should be kept active.

  • I have been reviewing the current profile with a scope and the TxRx events appear to match the current draw you noted. My issue appears to be the steady state current in between BLE events. When not actively communicating or maintaining the connection, the nrf52840 should idle, correct? I have included a GPIOTE instance in the code, other than that my code is essentially the same as the example code (with the HW uart disabled). Can you suggest what "things" can prevent the chip from entering idle mode and result in a constant 3mA draw?

    Also, I validated my test measurements by compiling and loading the PCA10059 BLE_APP_Blinky example and disabled the LED that is On while connected. I was able to confirm that while connected the current draw is ~ 40 to 50 uA. Is there something inherent in the BLE_APP_UART example that prevents low current?

    thanks in advance

  • Woohoo, figured it out. the nrf_pwr_mgmt _run() was never executing because of the NRF_LOG_PROCESS check. I commented out the check and now it runs low current between the BLE events. I'm now measuring ~ 20 to 30 uA !!!!  

  • Great to hear that you figured out the issue! However, it sounds a bit strange that NRF_LOG_PROCESS should prevent your from entering sleep, as this should return false once the logs have been processed and then put the CPU to sleep. Have you modified any other parameters that would prevent the logs from being processed, e.g. set RTT options to blocking if FIFO is full?

    // <o> SEGGER_RTT_CONFIG_DEFAULT_MODE  - RTT behavior if the buffer is full.
     
    
    // <i> The following modes are supported:
    // <i> - SKIP  - Do not block, output nothing.
    // <i> - TRIM  - Do not block, output as much as fits.
    // <i> - BLOCK - Wait until there is space in the buffer.
    // <0=> SKIP 
    // <1=> TRIM 
    // <2=> BLOCK_IF_FIFO_FULL 
    
    #ifndef SEGGER_RTT_CONFIG_DEFAULT_MODE
    #define SEGGER_RTT_CONFIG_DEFAULT_MODE 2
    #endif

    I assume that you do not require logging while connected to the battery, so you can disable logging as well:

    // <e> NRF_LOG_ENABLED - nrf_log - Logger
    //==========================================================
    #ifndef NRF_LOG_ENABLED
    #define NRF_LOG_ENABLED 0
    #endif

    Then NRF_LOG_PROCESS() should always return false.

Related