Skip to the content
PCBKitNew board
2 layers90 × 34 mmLoRa Node, the printed circuit board in 3D

An open-source monitoring system designed for use in greenhouses, orchards or other agricultural environments

Size
90 × 34 mm
Copper layers
2
Thickness
1.6 mm
Parts
78
Nets
65
Pads
255
Tracks, vias
571, 217
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
12 Aug 2024
Updated
27 Sep 2025

Overview

LoRa Node is an open-source printed circuit board by TilenTinta, from the TilenTinta/Greenhouse_LoRa_Node repository on GitHub, published under the MIT licence. It is a 2-layer board of 90 × 34 mm with 78 parts on 65 nets, routed with 571 tracks and 217 vias.

It is built around the STM32L151C8T6, BME280 and SX1308, with the RFM95W-868S2, SPX5205M5-L/TR and AO3401A among its other parts. Its parts include 29 capacitors, 24 resistors, 6 ICs, 6 connectors and 2 crystals. It belongs with the radio and wireless boards and the STM32 boards of this library.

Main components

7

README

README.md

Greenhouse LoRa Node

Greenhouse LoRa Node is an open-source monitoring system designed for use in greenhouses, orchards or other agricultural environments. This project includes all the necessary components to build the system, including:

  • A custom PCB for the node (supports LoRa or SIM card communication),
  • Firmware for the PCB,
  • PCB casing,
  • Server terminal application,
  • GUI template using Grafana.

Greenhouse LoRa Node


PCB

The PCB is a two-layer board that integrates essential hardware components. It is versatile and supports different communication modules. Users can choose between a LoRa module or a SIM card module (both cannot be used simultaneously).

Features

  • LDO voltage regulator - 3.3V for mcu and sensors.
  • Direct battery power if STM32L151 is used,
  • Step-up converter - 4V for SIM module only,
  • Battery voltage monitoring,
  • Battery cell holder for 18650 cells,
  • Three connectors:
    • Earth humidity probe
    • AUX1 (I2C interface)
    • AUX2 (SPI interface),
  • Support for LoRa module (RFM95W / SX1276) or SIM module (SIM800L),
  • u.FL antenna connector,
  • BME280 sensor (measures air temperature, humidity, and pressure),
  • MCU: STM32F103C8T6 or STM32L151C8T6,
  • 10-pin JTAG programming connector.

Firmware

The firmware is written entirely in C using STM CubeIDE. It is designed to be easily updated or modified. The MCU supports multiple sleep modes for power optimization, which can be configured directly in the code.

The project does not include the keys.h file, as it contains user-specific information. The structure of the keys.h file is as follows:

c
#ifndef KEYS_H_
#define KEYS_H_

#define DEVICE_ID            1       // ID number of the node

#define DEVICE_ADDRESS       {0x01, 0x23, 0x45, 0x56}
#define APPSKEY              {0x01, 0x23, 0x45, 0x67, 0x89, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20}
#define NWKSKEY              {0x01, 0x23, 0x45, 0x67, 0x89, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20}

#endif

The library for the RFM95W LoRa module is based on the repository linked below, with slight modifications made for this project: https://github.com/henriheimann/stm32-hal-rfm95

[!CAUTION] When using the RFM95W LoRa module and the graphical peripheral editor in CubeIDE, additional code modifications are required. After saving changes in the IDE, the auto-generated code will be overwritten, re-enabling all IRQs by default. The RFM95W module generates a 1 MHz digital signal on one of its IRQ pins at boot. If interrupts are not properly initialized, this can trigger errors in the MCU. To prevent this issue, all interrupts must be disabled until the module is fully initialized.

This project includes two firmware versions for two different microcontrollers. The firmware in the Firmware_F103 folder was written for the STM32F103xx microcontroller and represents the initial version of the firmware. Due to issues with power consumption, the microcontroller was replaced with an STM32L151xx. The firmware in the Firmware_L151 folder is the latest version, incorporating all modifications made to the PCB.

Current consumption:

The current firmware is optimized for the LoRa module and uses Standby sleep mode. In this configuration, the PCB draws ~60 µA while asleep. This isn’t ideal yet, but it’s sufficient for initial tests. Bench measurements suggest the remaining overhead lies between the MCU and the RFM95W. At 60 µA, a 3500 mAh 18650 cell yields a theoretical battery life of ~6 years, not accounting for self-discharge, temperature...


Case

The PCB case is 3D printed using PETG filament on a standard FDM 3D printer. When deploying the node outdoors, ensure the filament can withstand UV exposure. Materials like ASA or ABS might be more suitable for such environments.

Design Features:

  • The case has a dedicated section with perforations to allow airflow near the sensor, enabling accurate air parameter measurements while protecting the rest of the PCB from external conditions.
  • A groove runs along the perimeter of the lower part of the case, designed to fit a 3D-printed seal made from flexible materials like TPU or TPE. This ensures a better seal to protect the internal components.

Notes:

  • The design is optimized for easy replication using commonly available 3D printing materials and techniques.
  • Consider using higher-temperature and UV-resistant materials for long-term outdoor use.

Server Application

The server application is entirely written in Python and is terminal-based. Every operation performed by the application is logged into a log file for future inspection in case of issues.

Features

  • Connects to your LoRaWAN devices on TTN via MQTT.
  • Configurable ttn_config.json for easy integration.
  • Configurable InfluxDB_config.json for easy integration.
  • Supports multiple devices under a single application.

Configuration Files

Upon boot, the application requires two JSON files to load all the configurations for the database and MQTT connection to the TTN broker:

  1. InfluxDB_config.json
    Configuration file for connecting to the InfluxDB database:

    json
    {
        "_comment": "JSON config file for database connection",
        "url": "http://localhost:8086",
        "org": "tinta",
        "token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "bucket": "bucket_name",
        "timezone": "Europe/Ljubljana"
    }
  2. ttn_config.json

    json
    {
        "_comment": "JSON config file for mqttTTN connection",
        "app_id": "lora-home-node",
        "username": "lora-home-node@ttn",
        "access_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXX",
        "mqtt_broker": "eu1.cloud.thethings.network",
        "mqtt_port": 1883,
        "topic": "v3/lora-home-node@ttn/devices/+/up" 
    }

Prerequirements

Before running the application, ensure you have the required dependencies installed. The following packages are necessary:

bash
pip install json paho-mqtt psycopg2 influxdb-client pytz logging socket base64

Database

This project utilizes InfluxDB as its primary database solution. InfluxDB was selected due to its high efficiency in handling time-series data and its seamless integration with Grafana, which simplifies data visualization and analysis. By leveraging InfluxDB's ability to store data in a time-series format, this project ensures scalability for managing and analyzing temporal data.

Notes:

  • Ensure that InfluxDB is properly configured to handle the expected volume of data from the monitoring nodes.

Grafana

This repository contains pre-configured Grafana UI files designed to read and present data from sensors in an intuitive and visually appealing way. These files provide a basic setup to help you quickly get started with monitoring and analyzing your sensor data using Grafana's powerful dashboard capabilities.

Requirements:

  • Grafana and InfluxDB should be installed on either a Raspberry Pi or a home server (depending on your setup).
  • Ensure the terminal application is run on the same machine where the database and Grafana are installed.

Docker Setup

This repository includes Docker support for easier and faster deployment on the server-side. The Docker setup contains:

  • InfluxDB (Database)
  • Grafana (Visualization Tool)
  • Python Server Application (server_app)

[!CAUTION] Before running the Docker setup, the docker-compose.yml file must be modified to suit your specific preferences, such as:

  • Network configurations,
  • Volume mappings,
  • Environment variables for InfluxDB, Grafana, and the Python application,
  • Ports for external access,
  • etc.

Building the Container

To build the Docker containers, first navigate to the Docker folder in your terminal:

bash
cd /path/to/Docker

then run:

bash
docker-compose build

Once the container is build start it and set it up as you want.

bash
docker-compose up -d

Acces containers

After running the containers, you can access:

Make sure your Grafana instance is properly configured to read from InfluxDB.

Parts

78
QtyValueFootprintReferences
810kResistor_SMD:R_0603_1608MetricR1, R13, R16, R17, R18, R19, R20, R24
61uFCapacitor_SMD:C_0603_1608MetricC17, C19, C23, C25, C27, C28
5100Resistor_SMD:R_0603_1608MetricR2, R4, R5, R8, R9
510nFCapacitor_SMD:C_0603_1608MetricC18, C20, C24, C26, C29
4100nFCapacitor_SMD:C_0402_1005MetricC7, C8, C9, C10
4100nFCapacitor_SMD:C_0603_1608MetricC1, C2, C15, C22
422pFCapacitor_SMD:C_0402_1005MetricC4, C5, C13, C14
44k7Resistor_SMD:R_0603_1608MetricR3, R12, R21, R22
20RResistor_SMD:R_0603_1608MetricR10, R11
220kResistor_SMD:R_0603_1608MetricR6, R14
24.7uFCapacitor_SMD:C_1206_3216MetricC16, C21
2MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2
10.1uFCapacitor_SMD:C_0603_1608MetricC3
110nFCapacitor_SMD:C_0402_1005MetricC12
112MHzCrystal:Resonator_SMD_Murata_CSTxExxV-3Pin_3.0x1.1mmY1
112kResistor_SMD:R_0603_1608MetricR7
118650 Battery holder18650:18650 Battery holderBT1
11kResistor_SMD:R_0603_1608MetricR23
11uFCapacitor_SMD:C_0402_1005MetricC11
12x5_2.00mmConnector_PinHeader_2.00mm:PinHeader_2x05_P2.00mm_Vertical_SMDJ4
132.768kHzCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY2
13k2Resistor_SMD:R_0603_1608MetricR15
14.7uFCapacitor_SMD:C_0402_1005MetricC6
14.7uHInductor_SMD:L_Cenker_CKCS4020L1
1AO3401APackage_TO_SOT_SMD:SOT-23Q1
1BME280Package_LGA:Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumberingU1
1Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1Conn_01x03_SocketConnector_Hirose:Hirose_DF13-03P-1.25DSA_1x03_P1.25mm_VerticalJ7
1Conn_01x04_SocketConnector_Hirose:Hirose_DF13-04P-1.25DSA_1x04_P1.25mm_VerticalJ1
1Conn_01x06_SocketConnector_Hirose:Hirose_DF13-06P-1.25DSA_1x06_P1.25mm_VerticalJ6
1I2C addressJumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabelsJP1
1RFM95W-868S2RF_Module:HOPERF_RFM9XW_SMDU2
1SIM800L-CORESIM800L-Core-Module-KiCad-Footprint-main:SIM800L-COREU4
1SPX5205M5-L/TRSPX5205M5-L-3-3_TR:SOT95P280X145-5NIC1
1SS24Diode_SMD:D_SMAD1
1STM32L151C8T6Package_QFP:LQFP-48_7x7mm_P0.5mmU3
1SW_SPSTButton_Switch_SMD:SW_Push_1P1T_NO_CK_KMR2SW1
1SX1308SX1308:SOT-23-6U5
1SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP2
1UF.LConnector_Coaxial:U.FL_Molex_MCRF_73412-0110_VerticalJ3

The 76 most common of 78 parts.

Questions

How big is the LoRa Node PCB?

It measures 90 × 34 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LoRa Node use?

78 parts, built around the STM32L151C8T6, BME280, SX1308 and RFM95W-868S2. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the LoRa Node KiCad files?

From the TilenTinta/Greenhouse_LoRa_Node repository on GitHub, at the commit this page was made from: the board is PCB/LoRa_Node/LoRa_Node.kicad_pcb and its schematic PCB/LoRa_Node/LoRa_Node.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LoRa Node design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 4 layers55 × 40 mmAmon Link, the printed circuit board in 3D

    Amon Link

    TilenTinta/Amon_Link

    An open-source electronic designed for RF communication between a PC-based Ground Control system and the Amon drone

    106 parts1MIT
  • 4 layers170 × 170 mmAtx, the printed circuit board in 3D

    Atx

    aep/pislice

    62 parts
  • 2 layers24.4 × 77.7 mmGunRadio, the printed circuit board in 3D

    GunRadio

    Kreyl/Generation

    41 parts
  • 2 layers89.3 × 55 mmKh gift hw, the printed circuit board in 3D

    Kh gift hw

    phonght32/kh-gift-hw

    69 partsMIT
  • 2 layers34 × 46 mmNfcemu, the printed circuit board in 3D

    Nfcemu

    solosky/nfc-emu

    NFC模拟器

    58 parts117Apache-2.0
  • 4 layers96.6 × 45.6 mmA133CoreDK LCDdeck, the printed circuit board in 3D

    A133CoreDK LCDdeck

    kitspace-test-repos/kicad6-file-collection

    53 partsMIT
  • 2 layers65.4 × 68 mmS3-27-epaper touch, the printed circuit board in 3D

    S3-27-epaper touch

    Uspizig/WifiWallSwitch

    A WallSwitch with a clever EINK Display that measures your Air Quality, measures Temperature, detects movement, measures Light Conditions... and many more.

    159 parts4
  • 2 layers35 × 38 mmAetherPhylax, the printed circuit board in 3D

    AetherPhylax

    LukaJer/AetherPhylax

    Tiny Energy Harvesting Environment Monitior

    39 parts1GPL-3.0