We are trying to reduce the nRF91 chip to its lowest possible power consumption (a few µA).
There are several topics:
- a few µA is only the case in sleeping mode. That is usually entered with PSM, or, if available, with eDRX.
- using PSM is switching off the SIM, writing data to the SIM (usually limited by around 500 000 writes), using eDRX keeps (a common) SIM in “idle” which adds about 20µA.
- using TCP comes with two flavors: one is trying to keep the connection, the other one is closing the connection. With PSM it’s more about to close, with eDRX it is also possible to keep the connection.
You will find some arguments for each, so you need to make your own experience, what’s the best match in your case.
Anyway, overall, you will recognize, that TCP will take more energy than UDP. How much depends a lot on your use-case. About 3 times more is usually not a bad assumption/result.
One, maybe irritating point seems to be, that it’s hard to get some data about what energy consumption is reached in reality with MQTT. Maybe you share your values, when you have them.
For UDP (CoAP/DTLS 1.2 CID) the values are:
98-06:34:10 [d-hh:mm:ss], Thingy:91 v0.8.101+0, 02279, 160, 2132, 32, failures 0
NCS: 2.4.2, HW: B0A, MFW: 1.3.5, IMEI: 352656101079724
!3801 mV 51% (188 days left) battery
!CE: down: 8, up: 2, RSRP: -126 dBm, CINR: 3 dB, SNR: 4 dB
Stat: tx 2131 kB, rx 171 kB, max 893 B, avg 473 B
That’s from a Thingy:91 v1.4.0. I t runs now for 98 day, has about 2460 messages exchanged, some (about 200) required a retransmission or two (usually, that’s less, but this device runs at low radio conditions of about -126dBm). After 100 days, the battery is down to 50%. The forecast reflects the near past, while the 100 days also include two periods, where the device was doing more network search. I guess, it will be only 100 days left. That result in 200 days overall, exchanging an message every hour.)
Just if you’re interested to make also experience with CoAP/DTLS 1.2 CID, I’ve setup and “nRF9160 - CoAP-S3-Proxy” integrated demonstration, see Zephyr - Coaps Demo Client with Eclipse/TinyDtls and Californium (Cf) - Cloud CoAP-S3-Proxy Server.