LoRa long-range radio lesson plan
Two Unos, two SX1278 radios and no wire: chirps and spreading factors, an SX1278 driver from its datasheet, real airtime math, binary packets with IDs, duty cycle and dwell rules, what LoRaWAN adds, and an ocean buoy reporting to a shore station.
Objectives and materials
By the end, students can
- Chirps, spreading factors and the SX1278 from its registers.
- What every packet costs, and how to make each byte count.
- Duty cycle and dwell time rules, and the network LoRaWAN builds on top.
- An ocean buoy reporting to a shore station.
Materials for the whole unit
- Arduino Uno R3 x 2
- Character LCD with I2C backpack
- LED
- LoRa module, SX1278 (Ra-02) x 2
- Potentiometer
- Pushbutton
- Resistor
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
The radio
Chirps, spreading factors and the SX1278 from its registers.
| Lesson | Time | What students do |
|---|---|---|
| Spread spectrum: chirps across the seaTwo Unos, two LoRa radios and no wire: a buoy pings the shore every two seconds. What a chirp is, what the spreading factor buys, and how LoRa hears signals below the noise. | 55 min |
|
| SX1278 setup, register by registerNo library: the buoy sets up its SX1278 from the datasheet with plain SPI. Reset, version check, LoRa mode, the frequency in three bytes, the modem config, and a packet sent through the FIFO. | 65 min |
|
Materials
- Arduino Uno R3 x 2
- LoRa module, SX1278 (Ra-02) x 2
Check for understanding
Each student finishes "SX1278 setup, register by register" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "On a real bench".
Airtime and packets
What every packet costs, and how to make each byte count.
| Lesson | Time | What students do |
|---|---|---|
| Spreading factor and airtimeThe datasheet formula for time on air, worked out for SF7 to SF12 and two coding rates: why one packet at SF12 takes as long as twenty-four at SF7, and why both ends must agree. | 55 min |
|
| Packets and IDsLoRa has no addresses: everyone hears everything. Pack readings into eight binary bytes with a destination, a source, a sequence number and a type, drop what is not yours, and count lost packets. | 55 min |
|
Materials
- Arduino Uno R3 x 2
- LoRa module, SX1278 (Ra-02) x 2
Check for understanding
Each student finishes "Packets and IDs" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Design your own frame".
Sharing the air
Duty cycle and dwell time rules, and the network LoRaWAN builds on top.
| Lesson | Time | What students do |
|---|---|---|
| Duty cycle and the lawThe airwaves are shared, and the law says how much of them you may use. A 1 percent duty cycle guard as the EU 868 MHz rules require, and the US 915 MHz 400 ms dwell limit checked with the airtime formula. | 55 min |
|
| What LoRaWAN addsLoRa is the radio; LoRaWAN is the network on top. A LoRaWAN-shaped exchange on two plain radios: the frame, the frame counter, Class A receive windows, a queued downlink and an ACK. Explained and modeled, not run. | 75 min |
|
Materials
- Arduino Uno R3 x 2
- LoRa module, SX1278 (Ra-02) x 2
Check for understanding
Each student finishes "What LoRaWAN adds" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What the network server does".
Boss project
An ocean buoy reporting to a shore station.
| Lesson | Time | What students do |
|---|---|---|
| Boss: an ocean buoyA buoy at sea reads its wave sensor and reports to a shore station with an LCD: binary frames, a duty cycle budget, a storm mode that reports faster and lights the shore's storm lamp, and an acknowledged SOS. | 65 min |
|
Materials
- Arduino Uno R3 x 2
- Character LCD with I2C backpack
- LED
- LoRa module, SX1278 (Ra-02) x 2
- Potentiometer
- Pushbutton
- Resistor
Check for understanding
Each student finishes "Boss: an ocean buoy" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Taking it to sea".
Teach this unit as a class
Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.