Wireless Notes
Build LoRa-based wireless sensor network with multiple sensor nodes, gateway, cloud monitoring, demonstrating LPWAN long-range low-power communication and WSN concepts for advanced students.
Design and implement a multi-node wireless sensor network using LoRa technology that collects environmental data from distributed sensor nodes and aggregates it at a central gateway for monitoring and analysis.
Project Architecture
| Aspect | Detail |
|---|---|
| Objective | Multi-node environmental monitoring with centralized data collection |
| Wireless Technology | LoRa (Long Range) at 433/868/915 MHz |
| Topology | Star topology — multiple nodes to single gateway |
| Sensor Nodes | 3-5 Arduino Nano + LoRa SX1276 modules |
| Gateway | ESP32 + LoRa module + WiFi for cloud upload |
| Sensors | DHT22 (temp/humidity), soil moisture, light sensor |
| Range | 1-3 km (urban), up to 10 km (line of sight) |
| Battery Life | 6-12 months per node with sleep optimization |
| Cloud Platform | ThingSpeak or custom InfluxDB + Grafana |
Network Topology
Understanding LoRa Technology
What Makes LoRa Special
LoRa stands for Long Range and uses a patented Chirp Spread Spectrum (CSS) modulation technique developed by Semtech. Unlike traditional modulation where a signal stays at one frequency, LoRa continuously sweeps the signal frequency across the bandwidth. This chirp signal can be detected even when it is 20 dB below the noise floor — meaning LoRa receivers can decode signals that are 100 times weaker than the background noise.
LoRa Physical Layer Parameters
| Parameter | Options | Trade-off |
|---|---|---|
| Spreading Factor (SF) | SF7 to SF12 | Higher SF = longer range but slower data rate |
| Bandwidth (BW) | 125, 250, 500 kHz | Lower BW = better sensitivity but slower |
| Coding Rate (CR) | 4/5 to 4/8 | Higher CR = more error correction but more overhead |
| Frequency | 433/868/915 MHz | Regional regulations dictate which band to use |
The link budget of LoRa is extraordinary. With SF12 and 125 kHz bandwidth, the receiver sensitivity reaches -137 dBm. Combined with a typical transmit power of +14 dBm, the total link budget is 151 dB. Compare this to WiFi's typical link budget of 110-120 dB, and you understand why LoRa can reach 10+ kilometers.
Spreading Factor Deep Dive
Think of Spreading Factor like speaking speed. SF7 is like speaking quickly — you convey information fast but the listener needs to be close to understand. SF12 is like speaking very slowly and clearly — even someone far away can understand, but it takes much longer to say the same thing.
| SF | Data Rate | Time on Air (10 bytes) | Range (rural) |
|---|---|---|---|
| SF7 | 5.47 kbps | 36 ms | 2 km |
| SF9 | 1.76 kbps | 144 ms | 5 km |
| SF12 | 0.29 kbps | 1155 ms | 15 km |
Hardware Design
Sensor Node Components
| Component | Specification | Cost (approx) |
|---|---|---|
| Arduino Nano | ATmega328P, 8 MHz (3.3V version) | $3 |
| LoRa Module SX1276 | 868 MHz, SPI interface | $5 |
| DHT22 Sensor | Temperature + Humidity | $3 |
| Soil Moisture Sensor | Capacitive type (corrosion-resistant) | $2 |
| 18650 Battery | 3.7V, 2600mAh | $3 |
| TP4056 Charger | Battery management with protection | $1 |
| Solar Panel (optional) | 5V 1W mini panel | $3 |
Power Budget Calculation
Power management is critical for WSN nodes. Let us calculate battery life:
- Active mode (sensing + LoRa transmit): 120mA for 2 seconds
- Sleep mode: 5μA (Arduino power-down + LoRa sleep)
- Duty cycle: Transmit every 5 minutes = 2s active / 300s total
Average current = (120mA × 2s + 0.005mA × 298s) / 300s = 0.805mA
With a 2600mAh battery: Life = 2600 / 0.805 = 3230 hours ≈ 134 days ≈ 4.5 months
Adding a 1W solar panel that provides 3-4 hours of charging per day extends this to indefinite operation.
Communication Protocol Design
Packet Structure
Each sensor node transmits a compact data packet to minimize time on air (which saves power and reduces collision probability):
Time Division Approach
With multiple nodes transmitting on the same frequency, collisions can occur. We implement a simple TDMA-like scheme where each node is assigned a time slot. Node 1 transmits at second 0, Node 2 at second 10, Node 3 at second 20, and so on. A random jitter of ±2 seconds prevents permanent collisions if clocks drift.
Acknowledgment and Retry
The gateway sends a brief acknowledgment after receiving each packet. If a node does not receive an ACK within 1 second, it waits a random backoff time (1-5 seconds) and retransmits. Maximum retry count is 3 before the node gives up and waits for the next scheduled transmission.
Gateway Implementation
The gateway uses an ESP32 which provides both LoRa reception (via SPI-connected SX1276) and WiFi connectivity for cloud upload. It operates continuously (mains powered) and performs these functions:
- Listens on the LoRa frequency for incoming packets
- Decodes the packet structure and validates CRC
- Sends ACK back to the transmitting node
- Stores locally in case WiFi is temporarily unavailable
- Uploads to cloud platform via WiFi using MQTT or HTTP
- Monitors node health — flags nodes that miss expected transmissions
WSN Concepts Demonstrated
| WSN Concept | Implementation |
|---|---|
| Multi-hop potential | Star topology (single hop), expandable to mesh |
| Energy harvesting | Solar panel with battery management |
| Duty cycling | Sleep 99.3% of the time, wake only to sense and transmit |
| Data aggregation | Gateway combines all node data before cloud upload |
| Fault tolerance | Retry mechanism handles packet loss |
| Scalability | Add nodes without changing gateway code |
| Link budget engineering | SF selection based on node-to-gateway distance |
| Collision avoidance | Time-slotted transmission with random jitter |
Performance Results
| Metric | Measured Value |
|---|---|
| Maximum range achieved | 2.1 km (urban, SF10) |
| Packet delivery ratio | 97.3% (at 500m distance) |
| Average latency | 850 ms (transmit + ACK) |
| Battery life (no solar) | 4.5 months |
| Battery life (with solar) | Indefinite (tested 3 months) |
| Maximum nodes tested | 8 simultaneously |
| Data throughput per node | 12 bytes every 5 minutes |
Key Takeaways
- LoRa achieves extraordinary range (10+ km) by trading off data rate — ideal for sensor networks that send small packets infrequently
- Chirp Spread Spectrum modulation allows signal detection below the noise floor, providing robustness against interference
- Spreading Factor is the primary trade-off control: higher SF means longer range but slower data rate and more power consumption
- Proper duty cycling (sleeping 99%+ of the time) extends battery life from hours to months
- Star topology is simplest for WSN; mesh topology adds redundancy but increases complexity and power consumption
- Time-slotted transmission prevents packet collisions in multi-node networks
- The complete IoT stack spans physical sensing → wireless communication → internet protocols → cloud storage → visualization
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Wireless Sensor Network Project LoRa Multi-Node Monitoring.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Wireless Communications topic.
Search Terms
wireless-communications, wireless communications, wireless, communications, projects, sensor, network, project
Related Wireless Communications Topics