What the ACK Costs Over a Year
What the ACK Costs Over a Year
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
What the ACK Costs Over a Year
Sending one CoAP message every 60 s for a year — 525,600 messages — a confirmable (CON) exchange spends 1.0 mAs of radio charge because it waits out a 100 ms ACK, while a non-confirmable (NON) message spends exactly half. On a 220 mAh CR2032 that works out to 1.16 years of life for CON against 1.88 years for NON. This audit re-runs the arithmetic at full precision and asks whether the panel’s headline saving really is 63%, and where every bit of it comes from.
Companion to the chapter CoAP Resource API Design — every number here comes from that chapter.
Sending one CoAP message every 60 s for a year — 525,600 messages — a confirmable (CON) exchange spends 1.0 mAs of radio charge because it waits out a 100 ms ACK, while a non-confirmable (NON) message spends exactly half. Calculate this case.
This audit re-runs the arithmetic at full precision and asks whether the panel’s headline saving really is 63% , and where every bit of it comes from. Check shows this.
The design meaning is that the entire battery advantage traces to one deleted line: the 100 ms ACK reception, which is fully half of each message's radio charge. That is why the chapter reserves CON for actuator commands and alerts, where confirmed delivery is worth burning the second half of the radio budget, and hands periodic telemetry to NON, where a dropped reading isreplaced by the next periodic sample. Check confirms it.
See the relationship before changing it
The figure reads from left to right. The blue input is ack listen window. The middle card names the page’s rule. The green output is ideal con battery life. The arrow matters: change the input, apply the rule once, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 100 ms.
- 2
Name the relationship. radio charge = (500 + 5 x wait) / 3600 microAh; life = 220 mAh / annual charge
- 3
Substitute with units. at 100 ms, radio charge is 0.2778 microAh/message and life is 1.16 years
- 4
Read the result. Keep the unit beside the value, then use the result only inside the technical boundary below.
Predict, then change ack listen window
Try Predict how ideal con battery life responds when ack listen window moves. Calculate ack listen window; compare ideal con battery life with that prediction.
Observe Return to 100 ms. Recheck ideal con battery life with ack listen window at its chapter value.
Explain A longer receive window spends charge even when no useful byte arrives.
Check yourself
What should you do before trusting a moved-slider result?
What does this small model leave out?
Technical boundaries
Excluded from the “What the ACK Costs Over a Year” calculation are packet loss, retransmission backoff, DTLS, radio tail energy, server processing, or changes in request frequency; “What the ACK Costs Over a Year” therefore reports only its named fixtures.
Ada: The “Putting Numbers to It” panel concludes that NON gives “63% longer battery life” than CON. The chain of steps is sound, but let me re-run it at full precision to see where the saving actually comes from — and to pin the final percentage.
Per message, the only difference between the two types is the 100 ms ACK reception that a CON exchange waits for:
- CON:
(50 ms x 10 mA) + (100 ms x 5 mA) = 500 + 500 = 1000 mA-ms = 1.0 mAs, which is1.0 / 3.6 = 0.2778 uAh. - NON:
50 ms x 10 mA = 500 mA-ms = 0.5 mAs = 0.1389 uAh— exactly half, because the ACK window is gone.
Over a year of one message every 60 s, that is 365 x 24 x 60 = 525,600 messages:
- CON radio:
525,600 x 0.2778 uAh = 146.0 mAh; plus sleep0.005 mA x 24 x 365 = 43.8 mAh; total189.8 mAh. - NON radio:
525,600 x 0.1389 uAh = 73.0 mAh; plus the same43.8 mAhsleep; total116.8 mAh.
On a 220 mAh CR2032 that is 220 / 189.8 = 1.16 years for CON against 220 / 116.8 = 1.88 years for NON. The gain is 1.88 / 1.16 - 1 = 0.62, so about 62% longer life — the panel’s “63%” is the same result carried through the rounded 190 and 117 mAh totals.
The design meaning is that the entire battery advantage traces to one deleted line: the 100 ms ACK reception, which is fully half of each message’s radio charge. That is why the chapter reserves CON for actuator commands and alerts, where confirmed delivery is worth burning the second half of the radio budget, and hands periodic telemetry to NON, where a dropped reading is superseded by the next one anyway.
Every number above is taken from the chapter’s own material and re-derived step by step.