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

Esimate CoAP over BLE power consumption

Hi, I want to estimate easily, without measure it, the power consumption of sending an array of 256 float32_t elements (4 bytes each) through CoAP NON protocol using the nRF52 DK's BLE to a Raspberry Pi. I have found this very useful tool. My idea is to divide the array's byte size (256x4 bytes) by the BLE maximum payload for a BLE transmission packet (27 bytes). We can know the number of packets needed 1024/27=37,92 and we can round up it to 38 (doing another little approximation). Now using the nRF52 Online Power Profiler using:

  • BLE event type: Peripheral connection -Voltage: 3.6 V -BLE interval: 25 ms (1080 bytes/sec that I like to reach, obtained rounded down 1000ms / 38 packets) -TX payload: 27 bytes
  • TX power: 4 dBm

I have as result: 240 uA for 25ms.

Can I assert that my project during the BLE transmission of my array, for a time period close to 1 sec will use 240 uA more than what I have in the IDLE?

Thanks in advance for the help and explanations.

Marco

Parents
  • Hi, your estimation seems reasonable, you just have to add the header data.

    First you have the L2CAP header. Then the 6LoWPAN and UDP header. I tried to illustrate this here:

    L2CAP Header:
      Length          2 B
      CID             2 B
      SDU length      2 B
      L2CAP payload:
        6LowPAN IPHC  2 B
        Source addr   16 B
        Dest addr     16 B
        UDP header    1 B
          Src port    2 B
          Dst port    2 B
          Checksum    2 B
          Payload:
            Coap head 6 B
            Payload   Your data
            End       2 B
        
    Sum               55 B
    

    So the headers alone will require 2 additional packets.

Reply
  • Hi, your estimation seems reasonable, you just have to add the header data.

    First you have the L2CAP header. Then the 6LoWPAN and UDP header. I tried to illustrate this here:

    L2CAP Header:
      Length          2 B
      CID             2 B
      SDU length      2 B
      L2CAP payload:
        6LowPAN IPHC  2 B
        Source addr   16 B
        Dest addr     16 B
        UDP header    1 B
          Src port    2 B
          Dst port    2 B
          Checksum    2 B
          Payload:
            Coap head 6 B
            Payload   Your data
            End       2 B
        
    Sum               55 B
    

    So the headers alone will require 2 additional packets.

Children
Related