EmbeddedRelated.com

Private LoRaWAN Temperature Sensor Node with RAK Gateway Integration

A private LoRaWAN temperature-sensor node prototype that reports temperature to an existing RAK LoRaWAN gateway/network.

Intermediate Project — This is an intermediate prototype because it combines low-power firmware, I2C sensor integration, and LoRaWAN radio/network setup, plus some RF and power-budget attention even though the parts themselves are straightforward.
Assumptions:
  • The node only needs to measure temperature and send periodic LoRaWAN uplinks; no display, logging, or local user interface was requested.
  • The existing RAK3272 and RAK7268V2 are already owned and will be used as the LoRaWAN radio/node and gateway ecosystem, so I am not recommending them again.
  • Prototype means a small, easy-to-build design using breakout/dev-board style parts rather than a custom RF-certified product.

Bill of Materials

Microcontroller
Top Pick ESP32-C3-DEVKITM-1 Espressif Systems From our database
ESP32-C3-DEVKITM-1 is the best prototype choice here because it gives you a ready-to-use USB-programmable controller with a large support ecosystem, while still being easy to pair with the an alternative part over UART or AT-style control.
Digikey $8.00
Dev Board ESP32-C3-DEVKITC-02U Espressif Systems
Ready-to-use board for prototyping with this chip
STM32L031K6T6 STMicroelectronics From our database
Very low-power Cortex-M0+ MCU that fits battery-powered sensor nodes well. It has enough peripherals for a simple temperature-sensor node and can run from 3.3 V rails used by LoRa modules. Good choice if you want a bare MCU on a custom PCB rather than a dev board.
STM32L072CZT6 STMicroelectronics From our database
More flash/RAM and peripherals than the L031, while still staying in the low-power STM32L family. Useful if you want room for a more complex firmware stack, sensor calibration, or future expansion. Still a sensible fit for a battery-powered LoRaWAN node.
Temperature Sensor
Top Pick MCP9808 Microchip From our database
MCP9808 is the best overall pick because it gives you the most accurate and stable temperature readings of the three, which matters more than extra features for a dedicated temperature node.
Digikey $1.40 (4,830 in stock) Mouser $1.40 (3,112 in stock)
TMP112 Texas Instruments From our database
Low-cost I2C temperature sensor with a simple digital interface and low part count. Good for a compact node where you want reliable temperature readings without extra features. It is a practical budget option for prototypes.
Power Supply
Top Pick MCP1700-3002E/TO Microchip Technology From our database
MCP1700-3002E/TO is the best default for a simple battery-powered prototype because its low quiescent current helps preserve battery life and it keeps the power tree very simple.
Mouser $0.50 (1,468 in stock)
BQ24040 Texas Instruments From our database
Single-cell Li-Ion/Li-Poly charger with power-path management, which is useful if you want a rechargeable battery prototype powered from USB. It simplifies battery charging and load sharing, making bench testing easier. Better than a plain LDO if you want a self-contained portable node.
Connectivity
Top Pick 3072 Adafruit From our database
3072 is the best prototype connectivity choice because the breakout format makes bring-up much easier, and it is a straightforward SPI LoRa module for a custom sensor node.
Mouser $19.95 (27 in stock)
CMWX1ZZABZ-078 Murata Electronics From our database
Compact LoRa transceiver module for 868/915 MHz bands with a proven module form factor. Good if you want a small, integrated radio front end for a custom node and are comfortable handling SPI and RF layout. It is a practical module-level choice for LoRa connectivity.
RFM95W-868S2 RF Solutions From our database
LoRa transceiver module for the 868 MHz band with SPI control and a 1.8 V to 3.7 V supply range. Good if your private network is in the EU/868 MHz region and you want a compact module. Suitable for a simple sensor node with external antenna support.

Compatibility Notes

  • The recommended MCU, sensor, and LoRa module all operate in the 3.3 V class, so level shifting should not be needed if you keep the rail at 3.0 V to 3.3 V.
  • If you use the ESP32-C3-DEVKITM-1, verify that the chosen LoRa module is wired to a free SPI bus and that the UART pins do not conflict with USB programming or boot strapping.
  • The MCP1700-3002E/TO provides a 3.0 V rail, which is compatible with the MCP9808 and the LoRa modules listed, but you should confirm the radio module's minimum supply voltage before finalizing the battery design.
  • The ESP32-C3-DEVKITM-1 you already own can be used as the LoRaWAN radio path instead of a separate LoRa module if you prefer a simpler firmware split; in that case the MCU only needs to talk to it over UART or AT commands.

You'll Also Need

  • A battery holder or USB cable/power source is still needed depending on how you want to power the prototype.
  • You will need pull-up resistors for I2C, decoupling capacitors, and likely an antenna or antenna pigtail depending on the exact LoRa module path you choose.
  • If you build on a custom PCB, you will need the PCB itself, connectors, and RF matching/antenna layout details.
  • Enclosure, mounting hardware, and any environmental sealing are not included.
Estimated BOM Cost: $35-40 (based on live distributor pricing)
Add to Digi-Key Cart

Design Considerations

Power Budget
For a battery node, the sleep current matters more than the active current. An MCU like the ESP32-C3-DEVKITM-1 is convenient for prototyping, but a bare low-power STM32L part plus MCP1700-3002E/TO will usually give much better standby life. If you sample temperature once per minute and transmit briefly, the average current can be driven into the tens of microamps if the radio and MCU spend most of their time asleep.
Radio Integration
If you use the ESP32-C3-DEVKITM-1 as the LoRaWAN endpoint, keep the firmware architecture simple: wake, read sensor, send uplink, sleep. If you instead add a separate LoRa module like 3072, make sure the SPI wiring is short and the antenna is kept away from ground pours and noisy digital traces. For a private network, confirm the regional band and data rate settings match the gateway configuration on the ESP32-C3-DEVKITM-1.
Temperature Measurement Accuracy
The MCP9808 is a better fit than a generic sensor if you care about absolute temperature accuracy and repeatability. Place the sensor away from the MCU, regulator, and radio module because self-heating can bias readings by several tenths of a degree. If the node is enclosed, expect the enclosure air temperature to lag ambient changes, so validate with a real thermal soak test.
Firmware Architecture
Use a simple state machine with explicit states for boot, sensor read, radio join, transmit, and sleep. Add a watchdog and a retry limit so the node does not get stuck if the radio link or sensor bus fails. For a prototype, log error counters over serial so you can distinguish sensor faults from LoRaWAN join failures.
RF and Mechanical Layout
Even with a module, antenna placement is critical. Keep the antenna edge clear of copper and batteries, and avoid placing the temperature sensor directly next to the radio or regulator. If you use an external antenna, strain relief and connector choice matter because repeated handling is a common failure mode in prototypes.
Validation Strategy
Test the node in three stages: bench power/current measurement, short-range gateway communication, and then real placement in the intended environment. Measure sleep current with the radio fully disabled and then with periodic wakeups to confirm your battery-life estimate. Also test worst-case conditions such as cold start, weak RSSI, and gateway downtime so you know how the node behaves when the network is unavailable.

Want to customize this project or build something different?

Try the Project Advisor