Here is a comprehensive overview of SX1262 CAD preamble detection.
Channel Activity Detection (CAD) is one of the most powerful but misunderstood features of the Semtech SX1262 LoRa chip.
If you are building battery-powered sensor nodes, understanding how CAD detects a preamble can save you massive amounts of power. Here is a breakdown of how it works, from the basic concepts to advanced optimization.
1. The Core Problem: Battery vs. Listening
LoRa chips use a lot of power when they are sitting in continuous receive (RX) mode just waiting for a packet.
- The solution: Put the chip to sleep, wake it up briefly to check if a signal is coming, and go back to sleep if the air is clear.
- The challenge: How do you know a signal is actually a LoRa packet and not just background noise?Project went from previous low of 149 µA in Deep Sleep with WOR to 21.26 µA in Deep Sleep with WOR (Ebyte’s EoRa-S3-900TB development board) using CAD preamble detection. Link to 21.26 µA sketch
2. What is CAD Preamble Detection?
Every LoRa transmission starts with a preamble—a sequence of unmodulated “up-chirps” that acts like a doorbell, warning the receiver that data is coming.
Instead of measuring raw radio signal strength (RSSI), which can easily be triggered by random noise, the SX1262’s CAD mode performs a hardware-level mathematical calculation (FFT correlation) to look specifically for these LoRa chirps.
If the chip finds a chirp, it throws a CAD_DETECTED interrupt, telling your microcontroller to wake up and read the incoming data.
3. Step-by-Step: How the SX1262 Executes CAD
When you trigger a CAD command, the SX1262 automatically handles a 4-step sequence:
- Wake and Tune: The chip exits sleep and locks onto the configured frequency.
- The Sampling Window: The receiver turns on for a highly calculated, brief moment to listen to the air.
- Calculation: The chip performs a correlation check to see if the energy matches the expected LoRa modulation.
-
CAD_DONE: The check is complete.CAD_DETECTED: A LoRa preamble was successfully found. The Verdict: The chip drops back into sleep (or goes to RX) and fires an interrupt:
4. Advanced Tuning: The SX1262 CAD Parameters
Unlike older LoRa chips (like the SX1276), the SX1262 gives you granular control over the CAD process via the SetCadParams() command. You need to configure three main variables:
A. CAD Symbols (cadSymbolNum)
This defines how long the chip listens during its sampling window. Options include 1, 2, 4, 8, or 16 symbols.
- Fewer symbols (1 or 2): Fast check, lowest power consumption, but higher risk of missing a packet if timing isn’t perfect.
- More symbols (4 or 8): Much higher reliability and better sensitivity, but uses more battery.
B. CAD Det Peak & Det Min (cadDetPeak and cadDetMin)
These are the hardware thresholds that determine how “sure” the chip must be before declaring a match.
- If thresholds are too low: Random noise triggers false positives, wasting battery.
- If thresholds are too high: You will miss weak, long-range packets.
- Tip: Semtech provides standard lookup tables for these values based on your Spreading Factor (SF) and Bandwidth (BW).
C. CAD Exit Mode (cadExitMode)
This tells the chip exactly what to do after the check finishes:
CAD_ONLY: Go back to sleep immediately regardless of the result.CAD_RX: If a preamble is detected, automatically switch to RX mode to capture the packet.
5. Pro-Tips for Implementation
- Preamble Length Matters: If your transmitter sends the default 8-symbol preamble, and your receiver only wakes up every few seconds, they will miss each other. For aggressive power saving, increase the transmitter’s preamble length (e.g., to 32 or 64 symbols) so the receiver has a wider window to catch it via periodic CAD.
- Beware of False Positives: Expect a small percentage of false alarms due to environmental noise. Your firmware code should always include a timeout mechanism when switching to
RXmode so the microcontroller doesn’t hang forever waiting for a packet that isn’t actually there.
Hopefully, this helps clear up how to implement CAD on your SX1262 projects!
Heating System Monitor IV –Complete project
73’s,
William
Hi.
Thanks for sharing.
Going from 149 µA to 21.26 µA is very impressive! Such a significant power saving.
Regards,
Sara
08/04/2026
Channel Activity Detection with Wake-On-Radio and Deep Sleep is reliably working now!!!
Everyone; AI(s) and myself contributed to the project, they all told be it could not be done. I persisted, contacted RadioLib Library creator Jan Gromes; who provided “radio.resetOnStartup = false;” that was a one of the keys to getting it to work. Project use ESP32 Core 3.3.10; legacy methods of conserving power have change. Everything in the project now depends on using 3.3.10 Core. ESP-NOW has changed and more…
I have create a set of Nordic PPK2 embedded images that I will post later; putting finishing touches to the markdown document.
Here is the code for SX1262 that uses CAD + WOR + Deep Sleep, config files being used are Ebyte’s boards.h and utilities.h Download from links on EbyteIoT.com product page for EoRa-S3-900TB.
Complete Heating System Monitor IV CAD Update
Nordic Power Profiler Kit 2 CAD Observations
73’s
William
08/05/2026 CAD Update
Methodology note — CAD supersedes autoDutyCycle: The Hackster write-up’s published figures (51.30 µA average, ~83.5 months) were measured under the earlier autoDutyCycle WOR detection method. The project has since moved to CAD (Channel Activity Detection) as the pre-check ahead of the WOR receive window, which measurably reduces average current — 38.19 µA vs. 51.30 µA (a 25.6% reduction), improving theoretical battery life by 34.3% (~107.7 months vs. ~80.2 months) on the same 3000 mAh LiPo. The 51.30 µA / ~83.5-month figures should be considered superseded, not a number to reconcile against.
73’s,
William