CoAP vs MQTT vs others (regarding Power Consumption)

Hi,

Could you please give us some power budget comparison regarding connections using CoAP vs MQTT and other protocols (UDP socket...)?

We are thinking on a nRF9151 design, with around 5min connection period. Which protocol would you recommend to minimize power consumption?

Thanks!

  • FMPOV, you will need to provide some more infos:

    - do you consider to use TLS/DTLS?

    - do you operate the device in good radio conditions?

    - are the 5min an first approach, which may change later?

    Considering you don't need encryption and operate the device in good radio conditions and the 5min are in "stone", it's rather probable, that you will not need to reconnect on the TCP layer. With that the advantage of UDP (at least in my experience) is the usage of RAI. How much energy that saves, depends on a timeout provided by the network-operator (in my experience 5-20s). That is some energy, but not that huge.

    If you consider TLS one issue will be, that a reconnect will come with extra costs. For DTLS the CID extensions overcomes that.

    It's hard to foresee, how stable your device will run TCP, but if that disconnects too often, then the energy consumption will be higher.

    One downside when choosing TCP may also be the support for "NB-IoT/deep building penetration". In order to operate on weak signals, NB-IoT reduces the frequency bandwidth and uses more repetitions. That may cause a RTT of 10s. That will get hard for TCP.

    In other cases, e.g. every hour, MQTT/TLS vs. CoAP/DTLS 1.2 CID, PSM, the results are about 100µA/h for UDP, and 400µA/h for TCP (assuming drooping the connection).

    (Edited: sorry, I mixed up the units, it's about 100 mAs/h (or mC/h) and 400 mAs/h.)

    And just to add:

    Using the PPK II and some of the sample applications makes it easy to do own measurements, which then includes your intended radio signal quality, if you operate it at that intended location.

    For "long/mid term" tests it's also easy to use the battery voltage to compare the energy consumption over a couple of weeks. 

    E.g. using my CoAP/DTLS 1.2 CID app enables you to get some of the networks "key values" (e.g. PSM and RAI support and signal level) and monitoring them over a couple of weeks. That gives the best forecast, how long that will run on battery. Sending every hour, the Thingy:91/91X runs on good radio signals for a year, on less good ones 6 months and less, and with "perfect radio conditions" (Malta close to the Melita's Home-Base-Station ;-) ) up to 500 days.

  • Thanks!

    Everything in line with previous customer analysis, there are several factors to consider.

    For the moment this answer is enough, we might do some tests (including PPK2) to have more data for future decision on changing current protocol (MQTT).

  • From my experience:

    It's not that hard to use a larger battery, in some case the additional costs are acceptable.

    But if the radio signals are weak, then CoAP does a better job.

Related