logo elektroda
logo elektroda
X
logo elektroda

DX-LR02 & DX-PJ15-V1.1 LoRa Setup for Garage Temperature Sensor – Arduino Integration, 500ft Range

User question

I have a DX-LR02 connected to a dx-pj15-v1.1 I want it to send temperature readings from my garage, which is 500 feet away. How do I set up the device and program it?

Artificial Intelligence Response

Direct answer to the question

• You need two DX-LR02 LoRa radios – one in the garage and one in the house – plus a small micro-controller to read the temperature sensor in the garage.
• Configure both radios with identical LoRa parameters (frequency, spreading factor, bandwidth, network-ID, UART speed) over the DX-PJ15-V1.1 USB-TTL adapter using simple AT commands.
• Wire the garage radio to the micro-controller, connect a temperature sensor (e.g., DS18B20), and run a short sketch that reads the sensor and writes an ASCII string to the radio every minute.
• At the house end connect the second radio to a micro-controller or directly to the DX-PJ15-V1.1 + PC; whatever arrives on its UART is the temperature text sent from the garage.
• With modest 3–5 dBi whip antennas, SF 10-12, and 22 dBm output, 500 ft (≈150 m) is well inside the link budget even through typical garage and house walls.


Detailed problem analysis

  1. Hardware roles
    • DX-LR02 – pure LoRa transceiver with an AT-command UART interface (Semtech SX1276/SX1278 inside).
    • DX-PJ15-V1.1 – CH340-based USB-TTL board used for (a) configuring the LR02, or (b) flashing / talking to the micro-controller.
    • Micro-controller – any 3.3 V device with a spare UART: Arduino Nano/Pro Mini (3.3 V), ESP32, STM32, etc.
    • Temperature sensor – robust, digital, and long-cable-friendly → DS18B20 (1-Wire) is the usual choice.

  2. Minimum component list
    – 2 × DX-LR02
    – 2 × 3–5 dBi antennas cut for the module’s band (433 / 868 / 915 MHz – printed on the can)
    – 1 × micro-controller plus DS18B20 in the garage
    – (Optional) 2nd micro-controller in the house, or simply a PC running a terminal
    – One DX-PJ15-V1.1 (you can time-share it for configuration and programming)

  3. Wiring example (Arduino Nano Every, 3.3 V version)

    ┌──────── Garage Node ────────┐ │Nano ↔ DX-LR02 │ │ D9 → RXD (module) │ │ D8 ← TXD │ │ 3V3 ↔ VCC │ │ GND ↔ GND │ │ │ │DS18B20 DATA → D4 (4.7 kΩ pull-up to 3V3)│ │DS18B20 VCC → 3V3, GND → GND │ └─────────────────────────────┘

    Receiver wiring is identical, or plug the module into DX-PJ15 and open a serial terminal at the configured baud rate.

  4. Radio configuration (AT commands, 9600 baud by default)
    Connect the LR02 to DX-PJ15, open PuTTY/Arduino Serial Monitor at 9600 8 N 1, and issue:

AT+FREQ=915000000 # 915 MHz US; use 868 MHz EU or 433 MHz AS
AT+PARAMETER=12,7,1,4 # SF12, 125 kHz BW, CR 4/5, preamble 4
AT+ADDRESS=1 # garage node
AT+NETWORKID=7
AT+CRFOP=22 # 22 dBm (legal ISM max in US)
AT+UART=9600,8,1,0,0 # 9600 N 8 1
AT+SAVE

Repeat for the house unit, only change ADDRESS to 2.
Both radios must share FREQ, PARAMETER, NETWORKID, UART.

  1. Garage sketch (Arduino/ESP32) – skeleton
#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define LORA_RX 8 // from LR02 TXD
#define LORA_TX 9 // to LR02 RXD
#define ONE_WIRE 4
SoftwareSerial lora(LORA_RX, LORA_TX); // 9600-baud UART to LR02
OneWire oneWire(ONE_WIRE);
DallasTemperature sensors(&oneWire);
void setup() {
Serial.begin(115200);
lora.begin(9600); // must match AT+UART
sensors.begin();
}
void loop() {
sensors.requestTemperatures();
float t = sensors.getTempCByIndex(0);
if (t != DEVICE_DISCONNECTED_C) {
char buf[16]; // "23.4"
dtostrf(t, 4, 1, buf);
lora.print("AT+SEND=2,"); // dest addr, length follows
lora.print(strlen(buf));
lora.print(",");
lora.println(buf); // LR02 ends packet on CR/LF
Serial.print("Sent "); Serial.println(buf);
}
delay(60000); // 1-min interval
}
  1. House (receiver) options
    a) Plug LR02 into DX-PJ15, open terminal; strings like Temp:23.4 will scroll every minute.
    b) Use second MCU; any bytes arriving on its UART can be sent to LCD, MQTT, InfluxDB, etc.

  2. Link-budget sanity for 500 ft
    SF12, BW 125 kHz, 22 dBm Tx, 0 dBi Rx antenna:
    • Link budget ≈ 22 dBm – (–140 dBm sensitivity) = 162 dB.
    • Free-space loss at 915 MHz, 150 m ≈ 81 dB.
    Leaves > 80 dB margin – enough for two walls and foliage. Reduce to SF10 (~148 dB) for faster packets if margin allows.


Current information and trends

• Most hobby projects today replace the discrete LR02 + µC pair with a LoRa-WAN capable ESP32-SX1276 combo board (Heltec, LilyGo T-Beam). Same wiring but SPI rather than AT-UART, deeper sleep modes (<10 µA) and native MQTT via Wi-Fi when in range.
• Semtech’s new LR-FSS (FiFo Spread Spectrum) / LoRa-Edge line (LR1120) adds multi-band GNSS and Wi-Fi sniffing for asset-tracking – promising for future garage sensors needing location or power harvesting.
• Regulators are tightening duty-cycle limits (e.g., ETSI EN300-220 1 % or 0.1 %) – stick to sub-second packets every few minutes to stay compliant.


Supporting explanations and details

• Why AT commands? The LR02 already wraps the SX127x radio with a small MCU; you avoid SPI and the RadioHead/LoRa libraries.
• Why DS18B20? Long cable, 9-12-bit resolution, only one pull-up resistor, tolerant of 3.0 – 5.5 V.
• Power: garage node typically <25 mA during Tx, <2 mA idle. Add deep-sleep to reach <100 µA average if battery-powered.
• Antenna height matters more than gain; 1 m above roof-line can double range vs. inside wall mounting.


Ethical and legal aspects

• Operate within ISM band limits (433 / 868 / 915 MHz) and regional EIRP caps (e.g., 30 dBm ERP for US 915 MHz, 14 dBm for EU 868 MHz unless LBT/AFA implemented).
• Do not exceed duty-cycle regulations; periodic temp telemetry is fine.
• If personal data (e.g., occupancy) is added later, consider encryption (LoRa supports AES128) to protect privacy.


Practical guidelines

• Configure both radios on the bench first; verify packets at 1 m before mounting.
• Label each module with its ADDRESS to avoid swapping later.
• Use heat-shrink or weatherproof boxes; condensation in garages is the #1 field failure.
• If serial “garbage” appears, mismatch in UART baud or newline mode – reissue AT+UART?.
• Keep sensor cable away from motor inrush currents (garage opener) or use shielded CAT-5.


Possible disclaimers or additional notes

• The DX-LR02’s AT firmware revisions differ; some use AT+CRFOP, some AT+POWER. Run AT+VERSION to see which syntax applies.
• Range estimates assume no metal siding. Steel roofs reduce RSSI ≈ 10 dB; add external antenna or higher SF.
• Long USB leads to the DX-PJ15 may pick up RF; use ferrite or keep under 1 m.


Suggestions for further research

• Experiment with LoRa-WAN gateways (TTN) – you can feed the same sensor to cloud dashboards without changing RF hardware (requires LMIC-based firmware).
• Test chirp-stack or Helium if you later need miles-wide coverage.
• Compare DS18B20 vs. SHT-30 (temp + humidity) for HVAC projects.
• Read Semtech AN1200.22 for deep dive into SF/BW/Coding-rate vs. link budget.


Brief summary

Set up a pair of DX-LR02 radios with matching frequency and network settings via DX-PJ15.
Attach one to a 3.3 V micro-controller in the garage along with a DS18B20, flash a simple sketch that sends a formatted string over UART every minute.
Place the second radio in your house on the same UART settings; anything it prints is your temperature reading.
With proper antennas and SF10-12 the 500-ft hop is straightforward, while staying within legal ISM limits and leaving room for battery operation, encryption, or future LoRa-WAN migration.

Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.