
I've been half-assuming that "battery life" is mostly a function of battery capacity — bigger battery, longer life, done. Today, looking at how our field-deployed nodes are supposed to behave between transmissions, I got a much better feel for the other half of that equation: how much of the time the device is actually doing something.
Deep sleep is a power state where most of the MCU (and the radio, if there is one) is powered down to the point of drawing very little current — not literally zero, but small enough that it's often the dominant factor separating "runs for weeks" from "runs for years" on the same battery. Registers, most clocks, most peripherals go quiet. What has to survive is just enough logic to wake the chip back up — usually a low-power timer counting down to a scheduled wake, or an interrupt line watching for something external (a button press, a sensor threshold, an incoming radio signal on some designs). When the wake condition fires, the MCU comes back up, restores whatever state it needs, and resumes normal operation.
Duty cycle is the fraction of time actually spent awake and doing work versus asleep. If a node wakes once a minute, takes 200ms to read a sensor and fire off a transmission, then goes back to sleep, its duty cycle is roughly 200ms / 60,000ms — well under 1%. That's the part that clicked for me today: it's not that deep sleep current is dramatically lower than active current (though it usually is), it's that multiplying a low duty cycle by even a moderate active-mode current gives you a tiny average current draw over time, and average current is what actually determines how long a battery lasts.
To make the intuition concrete with illustrative, made-up numbers (not a claim about any real Siliqs part): say a node draws something like 20mA while actively sampling and transmitting, and a few µA while in deep sleep. If it's only active 1% of the time, the time-averaged current is dominated by that 99% sleeping at a few µA, not by the 1% at 20mA. That's the whole game — a node that stayed "on" continuously at 20mA would drain a small battery in hours; the same battery duty-cycled down to ~1% active time can plausibly run for a very long time. I haven't done the actual math against a real cell capacity yet, and I want to double-check with Wei how much of this the SQC485Iv2's actual sleep behavior looks like versus my simplified mental model — but as a first-pass intuition for why everyone obsesses over sleep current and wake frequency, this finally makes sense to me.
Tomorrow: how the device even knows what its own battery voltage is, which turns out to involve a resistor divider and an ADC.

我先前一直隱約以為「電池續航力」主要就是電池容量的函數——電池越大顆,用越久,這樣就結束了。今天看了一下我們部署在野外的節點在兩次傳輸之間應該要怎麼運作,才對這個方程式的另一半有了比較清楚的概念:裝置到底有多少時間真的在做事。
Deep sleep(深度睡眠)是一種讓 MCU 大部分電路(如果有 radio 的話,radio 也一起)關到只剩極小電流的省電狀態——不是真的零電流,但通常小到成為決定同一顆電池「能撐幾週」還是「能撐幾年」的主要因素。大部分暫存器、大部分 clock、大部分 peripheral 都會安靜下來。留著不關的通常只是剛好夠把晶片喚醒的那一小塊邏輯——通常是一個低功耗計時器倒數到預定的喚醒時間,或是一條監看外部事件的中斷線(按鈕被按下、感測數值超過門檻,某些設計裡甚至是收到某種無線訊號)。喚醒條件一觸發,MCU 就重新啟動、把需要的狀態恢復回來,繼續正常運作。
Duty cycle(工作週期)指的是真正清醒、在做事的時間,佔整體時間的比例。如果一個節點每分鐘醒來一次,花 200ms 讀感測器、發送一次傳輸,然後再睡回去,它的 duty cycle 大概是 200ms / 60,000ms——遠低於 1%。這是我今天真正想通的地方:重點不只是 deep sleep 的電流比 active 狀態低很多(雖然通常確實如此),而是把一個很低的 duty cycle 乘上哪怕是中等程度的工作電流,得到的是一個微小的長期平均電流,而真正決定電池能用多久的,就是這個平均電流。
用一組純粹示意用、不是任何真實 Siliqs 產品規格的數字來抓個感覺:假設節點在主動取樣、傳輸時電流大概是 20mA,深度睡眠時只有幾 µA。如果它只有 1% 的時間是 active 的,那時間平均電流會被那 99% 時間、幾 µA 的睡眠狀態主導,而不是那 1% 時間的 20mA。這就是整個遊戲規則——如果一個節點一直維持在 20mA 的 active 狀態,一顆小電池可能幾小時就沒電了;同一顆電池,如果只有大約 1% 的時間在 active,理論上就可以撐很長一段時間。我還沒拿實際的電池容量去算真正的數字,也還想找 Wei 確認一下 SQC485Iv2 實際的睡眠行為跟我這個簡化的心智模型有多接近——但作為「為什麼大家這麼在意睡眠電流跟喚醒頻率」這個問題的第一層直覺,今天終於想通了。
明天要看裝置到底怎麼知道自己電池的電壓——結果會牽涉到一個 resistor divider 跟 ADC。