Arduino LoRa Communication Project Using Adafruit RFM95W LoRa Radio

Arduino Nano LoRa Communication System (RFM95 SX1276) – Full Tutorial | MakeMindz
LoRa / RF Arduino Nano IoT

Arduino Nano Long-Range LoRa Communication SystemUsing RFM95 SX1276 Module

Build a reliable, low-power, kilometer-range wireless system using the Arduino Nano and the RFM95 LoRa radio. Ideal for IoT networks, remote sensing, and smart agriculture.

📅 February 2026 ⏱ ~30 min 🎯 Intermediate 🔧 SPI · LoRa · IoT

📡Project Overview

This project uses the compact Arduino Nano and the RFM95 LoRa module (Semtech SX1276) to build a reliable long-range wireless communication link. Using Chirp Spread Spectrum (CSS) modulation, LoRa achieves kilometers of range with minimal battery drain — perfect for remote IoT, sensor networks, and field monitoring.

ℹ️

LoRa vs LoRaWAN: This project uses raw point-to-point LoRa. LoRaWAN adds a cloud-network layer on top for large-scale deployments via gateways like The Things Network.

🔩Components Required

🧠
Arduino Nano
ATmega328P, 5V logic
📻
RFM95 (SX1276)
LoRa module, 3.3V
🔋
3.3V Regulator
AMS1117 or LDO
📡
SMA Antenna
915 or 868 MHz
🔀
Level Shifter
5V → 3.3V logic
🔌
Jumper Wires
M-F and M-M
⚠️

Voltage Warning: The RFM95 is 3.3V only. Connecting it to 5V will permanently destroy it. Use a logic-level shifter on MOSI, SCK, CS, and RST lines.

🔗Pin Wiring

Arduino NanoRFM95 PinFunctionNote
D11 (MOSI)MOSISPI Data OutLevel shift ↓
D12 (MISO)MISOSPI Data InDirect (safe)
D13 (SCK)SCKSPI ClockLevel shift ↓
D4NSS/CSChip SelectRFM95_CS
D2RESETModule ResetRFM95_RST
D3DIO0IRQ (TX/RX)RFM95_INT
3.3VVCCPowerStable 3.3V only
GNDGNDGround

🗺️Wiring Diagram

Arduino Nano ↔ RFM95 SX1276 Wiring Diagram ARDUINO NANO ATmega328P 5V Logic D11 MOSI D12 MISO D13 SCK D4 CS D2 RST D3 DIO0 3.3V OUT GND USB RFM95 SX1276 SX1276 LoRa · CSS 3.3V only MOSI MISO SCK NSS RESET DIO0 3.3V GND SMA Antenna 915 / 868 MHz MOSI MISO SCK CS RST DIO0 ⚠️ Use 3.3V level-shifter on MOSI, SCK, CS, RST · Always attach antenna before power-on
💡

The Nano's 3.3V pin supplies only ~50 mA. If powering other sensors too, use a dedicated AMS1117-3.3 regulator from the 5V rail.

📋Step-by-Step Instructions

1

Install the LoRa Library

In Arduino IDE: Sketch → Include Library → Manage Libraries. Search LoRa, install by sandeep.mistry. SPI is built-in.

2

Wire the Hardware

Follow the pin table and diagram above. Power RFM95 from stable 3.3V. Use a logic-level shifter on MOSI, SCK, CS, and RST.

3

Attach the Antenna

Connect a 915 MHz (or 868 MHz for India/EU) SMA antenna before powering on. Running without one can damage the RF front end.

4

Select Board & Upload

Set board to Arduino Nano, processor to ATmega328P (Old Bootloader) if needed. Paste the code below and Upload.

5

Set Up a Second Board (Receiver)

Upload the same sketch to a second Nano + RFM95. The loop handles both TX and RX, so both boards can send and receive.

6

Open Serial Monitor

Set baud to 9600. You'll see "LoRa Initialization Successful!", then "Sending packet…" every 2 s. The receiver shows "Received packet: Hello, LoRa!" plus RSSI.

7

Test Range

Move outdoors. Expect 2–5 km in urban areas and up to 10–15 km in open rural environments with good line-of-sight.

💻Full Source Code

arduino_lora_comm.ino
/*
 * Arduino LoRa Communication Project
 * Board:  Arduino Nano (ATmega328P)
 * Module: RFM95 SX1276 LoRa
 * By:     MakeMindz — makemindz.com
 *
 * Sends "Hello, LoRa!" every 2 s
 * and listens for incoming packets.
 */

#include <SPI.h>
#include <LoRa.h>

// ── Pin Definitions ──────────────────
#define RFM95_CS   4   // Chip Select (NSS)
#define RFM95_RST  2   // Reset
#define RFM95_INT  3   // DIO0 interrupt

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("LoRa Communication Initializing...");

  // Hardware reset the RFM95
  pinMode(RFM95_RST, OUTPUT);
  digitalWrite(RFM95_RST, HIGH); delay(100);
  digitalWrite(RFM95_RST, LOW);  delay(10);
  digitalWrite(RFM95_RST, HIGH); delay(10);

  // Assign custom pins
  LoRa.setPins(RFM95_CS, RFM95_RST, RFM95_INT);

  // 915 MHz for US · use 868E6 for India / EU
  if (!LoRa.begin(915E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
  Serial.println("LoRa Initialization Successful!");
}

void loop() {

  // ── Transmit ─────────────────────────
  Serial.println("Sending packet...");
  LoRa.beginPacket();
  LoRa.print("Hello, LoRa!");
  LoRa.endPacket();
  delay(2000);

  // ── Receive ──────────────────────────
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    Serial.print("Received packet: ");
    while (LoRa.available()) {
      Serial.print((char)LoRa.read());
    }
    Serial.print("  RSSI: ");
    Serial.println(LoRa.packetRssi());
  }
}
ℹ️

For India and EU regions change 915E6 to 868E6 and use an 868 MHz antenna to meet local regulations.

🎮Run the Simulation

Test this project online — no hardware needed.

🔵 Wokwi Simulator

Supports Arduino Nano and LoRa radio simulation. Import the diagram.json above and paste the sketch into the editor.

🟠 Cirkit Designer

Full SPI simulation with RFM95 breakout. Add Arduino Nano and RFM9x from the components panel and wire per the diagram.

Key Features

📡 Long-range (2–15 km)
🔋 Ultra-low power
🔒 High noise immunity
🌐 IoT network ready
💬 Two-way comms
⚙️ SPI reliable link
🌿 Agriculture ready
🔌 Battery-powered nodes

🚀Applications

🌾
Smart Agriculture
Field sensor monitoring
🌡️
Weather Stations
Remote temp/humidity
🏭
Industrial IoT
Factory sensor networks
🏠
Home Automation
Long-range control
📍
GPS Tracking
Asset management
🏙️
Smart City
Infrastructure sensors

Possible Enhancements

🌡️
Sensor Data Payload
Attach a DHT22 or BME280 and transmit temperature, humidity, and pressure inside the LoRa packet.
😴
Deep Sleep Mode
Use the AVR low-power library to sleep between transmissions and extend battery life to months.
🌐
LoRaWAN Integration
Switch to the MCCI LMIC library and connect to The Things Network for full cloud connectivity.
📊
Web Dashboard
Forward received packets via serial to a Pi running Node-RED or MQTT and visualise on Grafana.

© 2026 MakeMindz · Arduino, IoT & Robotics Tutorials · All Rights Reserved

Comments

try for free