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

foundations
math-foundations
calculation-audit
coap
Ada 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.

Try

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.

Observe

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.

Explain

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.

ACK Listen Window changes ideal con battery life A three-part teaching diagram connects ack listen window, the rule radio charge = (500 + 5 x wait) / 3600 microAh; life = 220 mAh / annual charge, and ideal con battery life. INPUT ACK listen window APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrow. A longer receive window spends charge even when no useful byte arrives.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 100 ms.

  2. 2

    Name the relationship. radio charge = (500 + 5 x wait) / 3600 microAh; life = 220 mAh / annual charge

  3. 3

    Substitute with units. at 100 ms, radio charge is 0.2778 microAh/message and life is 1.16 years

  4. 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.

100 ms
Chapter baseline
Ideal CON battery life

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?
Answer: Predict its direction, apply the displayed relationship, keep the units, and compare the reset value with the chapter’s worked baseline.
What does this small model leave out?
Answer: Only ack listen window moves here. The ideal con battery life calculation excludes field effects listed below.

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 is 1.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 sleep 0.005 mA x 24 x 365 = 43.8 mAh; total 189.8 mAh.
  • NON radio: 525,600 x 0.1389 uAh = 73.0 mAh; plus the same 43.8 mAh sleep; total 116.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.