Found my content useful? Please donate:

DIY Long-Range Wireless Temperature Monitor (LoRa + PIC + NodeMCU + ThingSpeak IoT System)

πŸ“‘ Overview

In this project, we build a long-range wireless temperature monitoring system using LoRa radio communication, a PIC microcontroller, and a NodeMCU ESP8266.

The system allows you to monitor temperature from remote locations such as a garden, shed, greenhouse, or outdoor enclosure β€” and view live data anywhere in the world using the ThingSpeak cloud platform.

Unlike typical WiFi-based sensors, this system does not require WiFi at the sensor location, making it significantly more secure and much higher range.

🧠 System Architecture

The project is split into two main parts:

[ Sensor Node (Outdoor) ]
PIC16F628 β†’ DS18B20 Temperature Sensor β†’ LoRa Transmitter
↓
Wireless Long-Range Link (LoRa)
↓
[ Base Station (Indoor) ]
LoRa Receiver β†’ NodeMCU ESP8266 β†’ ThingSpeak Cloud

🌍 How It Works

1. Sensor Node (Outdoor Unit)

The outdoor unit is built around a PIC16F628 microcontroller connected to a DS18B20 temperature sensor.

The PIC reads temperature data and formats it into a simple packet structure:

T24E

Where:

  • T = start of packet
  • 24 = temperature value (Β°C)
  • E = end of packet

This data is transmitted via LoRa at a fixed interval (e.g. every 5 minutes).

To conserve power, the microcontroller spends most of its time in a low-power state between transmissions.

2. Receiver Node (Indoor Unit)

The base station uses a NodeMCU ESP8266 connected to a LoRa receiver module.

It:

  • Receives incoming LoRa packets
  • Extracts the temperature value between T and E
  • Validates and processes the data

Once decoded, the value is passed to the WiFi stage.

3. Cloud Upload (ThingSpeak IoT)

The NodeMCU uploads the processed temperature value to ThingSpeak, allowing:

  • Real-time graphs
  • Historical data logging
  • Remote access from any device with internet

No custom app is required β€” just open your ThingSpeak channel in a browser.

πŸ“Š ThingSpeak Dashboard

ThingSpeak provides:

  • Live updating temperature graph
  • Automatic data logging
  • Mobile and desktop access
  • Long-term data storage (ideal for monitoring trends)

Once configured, the system continuously logs sensor data at your chosen interval.

⚑ Power & Efficiency Design

To make the system suitable for outdoor battery operation:

  • PIC microcontroller sleeps between transmissions
  • LoRa module remains inactive when not sending data
  • System wakes periodically to transmit readings

This approach significantly reduces power consumption and allows long-term battery operation.

🧩 Key Features

  • Long-range wireless communication using LoRa
  • No WiFi required at the sensor node
  • Secure remote sensing (no exposed credentials outdoors)
  • Cloud-based monitoring via ThingSpeak
  • Low-power design for battery operation
  • Simple and reliable packet protocol (TxxE)
  • Easily expandable to multiple sensor types

πŸ”§ Possible Upgrades

This system can be expanded to include:

  • Humidity monitoring
  • Soil moisture sensing
  • Battery voltage tracking
  • Multi-node sensor networks
  • Alerts via ThingSpeak webhooks or email

πŸ’‘ Why This System Is Useful

Most off-the-shelf IoT sensors rely entirely on WiFi, which limits range to a typical home network and requires storing credentials on the device.

This design solves that problem:

  • The sensor node does not store WiFi credentials
  • Communication range is significantly extended using LoRa
  • The system can operate in remote outdoor environments
  • Data is still accessible globally via the cloud

πŸ—οΈ Hardware Overview

Sensor Node:

  • DS18B20 temperature sensor
  • PIC16F628 microcontroller
  • LoRa transmitter module

Base Station:

  • LoRa receiver module
  • NodeMCU ESP8266 (ESP-12E)
  • WiFi connection to ThingSpeak

πŸ”— Build Process

You can assemble this project using a breadboard or prototype setup by following the schematics.

PCB design files will be added in a future update.

βš™οΈ Setup Summary

  1. Create a ThingSpeak account
  2. Create a new channel and enable Field 1 (Temperature)
  3. Copy your Channel ID and API Key
  4. Flash the PIC with the provided HEX firmware
  5. Upload the NodeMCU Arduino sketch (insert WiFi + API credentials)
  6. Power both units and begin logging data

πŸ“¦ What’s Included in the Download

This project pack includes:

  • PIC assembly source code (for reference)
  • Pre-compiled PIC HEX firmware (ready to flash)
  • NodeMCU Arduino IDE sketch
  • Full wiring diagrams (both nodes)
  • ThingSpeak setup guide
  • Packet format documentation (TxxE)
  • Step-by-step build instructions

πŸš€ Real-World Applications

A temperature data logger like this is widely used in:

  • Cold chain logistics
  • Pharmaceutical storage monitoring
  • Food safety (HACCP compliance)
  • Laboratory temperature mapping
  • HVAC system optimisation
  • Agricultural and greenhouse monitoring

πŸ“Œ Final Notes

This project demonstrates how low-cost embedded systems can be combined to create a long-range IoT monitoring solution without relying on WiFi at the sensor location.

By combining:

  • PIC microcontroller processing
  • LoRa long-range communication
  • ESP8266 cloud connectivity

…you get a flexible, scalable remote monitoring system that can be deployed almost anywhere.

Download the full project here

What is a temperature logger?

A temperature data logger is a portable device used to automatically measure and record environmental temperatures over a specific period. It ensures that sensitive goods remain within safe limits by providing a reliable, automated alternative to manual thermometer checks.

They are essential tools across various industries, fulfilling the following primary uses:

  • Cold Chain Shipment Monitoring: Tracking perishable goods (e.g., produce, dairy) and pharmaceuticals in transit to guarantee that conditions remain within safe parameters. 
  • Pharmaceutical and Vaccine Storage: Ensuring drugs, blood samples, and vaccines are kept at required temperatures (e.g., +2Β°C to +8Β°C) to prevent spoilage and maintain their efficacy. 
  • Food Safety and HACCP Compliance: Monitoring refrigerators, freezers, and processing facilities to ensure strict food safety regulations are continuously met. 
  • Laboratory and Equipment Mapping: Performing temperature mapping in scientific environments, incubators, or industrial ovens to identify hot and cold spots. 
  • Building Management & HVAC: Optimizing climate control systems in commercial and agricultural buildings for efficiency and product quality. 
Found my content useful? Please donate: