Skip to the content
PCBKitNew board
2 layers56 × 47 mmAgriot sensor, the printed circuit board in 3D

Open Source hardware/software platform for the rapid and low-cost development of LoRaWAN sensor nodes

Size
56 × 47 mm
Copper layers
2
Thickness
1.6 mm
Parts
30
Nets
38
Pads
105
Tracks, vias
201, 54
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
27 Oct 2019
Updated
26 Oct 2025

Overview

Agriot sensor is an open-source printed circuit board by AngelJMC, from the AngelJMC/agriot-sensor-node repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 56 × 47 mm with 30 parts on 38 nets, routed with 201 tracks and 54 vias.

It is built around the RFM95W-868S2. Its parts include 4 resistors, 4 connectors, 2 ICs, 1 capacitor and 1 diode. It belongs with the radio and wireless and sensors and measurement boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

AGRIOT LoraWAN sensor node

Build Status

The aim of this project is to provide an Open Source hardware/software platform for the rapid and low-cost development of LoRaWAN sensor nodes. It consists of an Arduino Pro Mini module, a LoRa RMF95W communications module, a Buck DC-DC converter and a few components to simplify connection to different sensors.

MarineGEO circle logo

Table of contents

Features

Hardware

  • 5-24v Power supply through a screw terminal block.
  • 2 GPIOS accessible from screw terminal blocks, one of them with interrupt.
  • 1 IC2 interface in the botton layer, with soldering pad.
  • 4 Analog inputs in the top layer, with soldering pad.
  • A switch to force the sending of LoRaWAN messages.

LoRaWAN Features

  • OTAA activation. It is not necessary to add the OTAA activation keys in the code. They are stored in the EEPROM and the configuration is done from the serial port.
  • Adaptative Data Rate according to the SNR of periodical downlink messages.
  • Using Arduino-LMIC lowpower library, a modified version of Arduino-LMIC to work with the low-power modes of the Atmega328P microcontroller.

List of supported sensors

  • DHT series of low-cost temperature/humidity sensors.
  • DS18S20, DS18B20, DS1822 temperature sensor.
  • GPS with NMEA Standar.
  • ADC121 Analog-to-digital converter with I2C interface.

Get the source code

Download repository and update submodules:

text
$ git clone https://github.com/AngelJMC/agriot-sensor-node.git
$ cd agriot-sensor-node
$ git submodule update --init --recursive

Directory Structure

text
.
├── docs          # Documentation files
├── firmware      # FW source code (Visual Studio Code)
├── hardware      # HW design files (Kicad)

Firmware

If you want to modify the source code or program your devices, it is highly recommended to use Visual Studio Code and the Platformio plugin. Just open the "firmware" directory with Visual Studio Code and the whole project will be ready for use.

How to add new sensor support

You must create a new .cpp file in which you implement the communication routines with the sensor. If you use the following scheme you will only have to add the communication with the sensor. The sensors_update() function is executed periodically and once the sensor acquisition is finished the data is sent by the LoRaWAN communication layer.

text
#ifdef SENS_SENSORNAME
#include "protocol.h"
#include "sensors.h"
#include <CayenneLPP.h>

/* Schedule sensore measurement every this senconds */
#define SENSOR_INTERVAL (5*60) //seconds

static osjob_t sensjob;
CayenneLPP lpp(51);


static void sensors_update( osjob_t* j ) {
    os_avoidSleep();

    /*TO-BE Implemented -- Read sensor*/
    float t = readYourSensor();

    /* Update Data Frame using Cayennne Library */
    lpp.reset();
    lpp.addTemperature(1, t); /*Change according your sensor*/
    protocol_updateDataFrame( lpp.getBuffer(), lpp.getSize() );
    

To compile the code for this new sensor, you will have to add to the platformio.ini configuration file a new build environment.

text
[env:pro8MHzatmega328_SENSORNAME]
platform = atmelavr
board = pro8MHzatmega328
framework = arduino
build_flags = -DSENS_SENSORNAME

Now you will be able to select the build environment from the Visual Studio Code.

Command Line Interface

The device configuration is done through the command line interface (CLI) implemented in the device.

First, connect your device to the Arduino Serial Monitor over USB. Since the Arduino Pro Mini does not have an on-board FTDI chip, you will need to use a USB-TTL adapter. Set the baud rate to 9600 and open the serial port to establish connection. IMPORTANT: To reduce the device power consumption, the serial interface is only available for 10 minutes after the device power-up.

Commands

Command IDTypeDescription
DRDEVEUI - Unique device identifier.
ER/WAPPEUI - Unique identifier of the application.
KR/WAPPKEY - Used in OTAA to generate session keys.

Connect your Device to LoRaWAN - The Things Network.

To use the default Over The Air Activation (OTAA) you will need to register your device with its Device EUI

Get your Device EUI

The Device EUI is a unique address provided by the Atmega328P microcontroller. To retrieve this, type in the serial console:

D

Go to The Things Network and open the application to which you wish to add a device and click register device.

  • For Device ID, choose a - for this application - unique ID of lower case, alphanumeric characters and nonconsecutive - and _.
  • For Device EUI, copy-paste the one you retrieved from your device.
  • Leave the App Key to be generated.
  • For App EUI, select the generated EUI from the list.

TTN Register Device

Activate your Device

Now that we have registered the device, we can activate the connection from our device itself. Activation means that the device will use the generated App Key to negotiate session keys for further communication.

Go to Device Overview and copy the 8-byte Application EUI. Now, you have to send the "E" command with the value obtained through the serial port of the device:

E:70B3D57ED0038147

Repeat the same process to send the 16 byte Application key:

K:7B4F7BC85D064898DB39214D7607440E

Now, restart the device and it will automatically register to the network.

TTN Device Overview

Session keys are not stored in non-volatile memory so they are renegotiated each time the device is powered on. This behavior is not the most appropriate, and will be reviewed in future versions.

Hardware

Getting the gerbers for PCB fabrication here.

PCB BOM

NameAnmountDescription
Arduino Pro Mini1Pro Mini Armega328P 3,3V 8MHz
RFM95W1RFM95W 868-915MHz LoRa SX1276 transceiver
DC-DC Buck13.3V Fixed output, Input 5v-24v
Resistor 2.2k12.2K SMD resistor 0805
Resistor 4.7k34.7K SMD resistor 0805
Capacitor 4.7 uF/6.3 v14.7 uF SMD capacitor 0805
SMD LED1LED SMD 0850
Switch DIP1Switch 4 PIN Metal SMD
Screw Terminal 01x0323P - Pitch 3.5/3.96mm Screw PCB Terminal Block Connector
Screw Terminal 01x0212P - Pitch 3.5/3.96mm Screw PCB Terminal Block Connector
Connector U.FL-R-SMT 1Connector U.FL-R-SMT
Antenna 3dbi RP-SMA1Antenna 3dbi RP-SMA Connector + 21cm SMA Male/u.FL Pigtail Cable

Node Examples

Sensor node example Sensor Installation

Parts

30
QtyValueFootprintReferences
4SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmDIO1, DIO2, DIO3, DIO5
34.7kResistor_SMD:R_0805_2012MetricR1, R2, R4
2+3v3TestPoint:TestPoint_Pad_1.5x1.5mm+3V3, A2
2GNDTestPoint:TestPoint_Pad_1.5x1.5mmA7, GND1
2MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2
2SCLTestPoint:TestPoint_Pad_1.5x1.5mmA3, SCL1
2SDATestPoint:TestPoint_Pad_1.5x1.5mmA6, SDA1
2Screw_Terminal_01x03TerminalBlock_4Ucon:TerminalBlock_4Ucon_1x03_P3.50mm_HorizontalJ4, J6
12.2kRResistor_SMD:R_0805_2012MetricR3
14.7uF/6.3vCapacitor_SMD:C_0805_2012MetricC1
1ARDUINO_Pro-MiniALLarduino_shields:ARDUINO_Pro-MiniALLB_AliexpressU2
1Conn_CoaxialConnector_Coaxial:U.FL_Molex_MCRF_73412-0110_VerticalJ1
1DC-DC_Buck_Step_Modulelibrary:DC-DC_Buck_Step_ModuleM1
1LEDLED_SMD:LED_0805_2012MetricD1
1RFM95W-868S2RF_Module:HOPERF_RFM9XW_SMDU1
1SW_DIP_x01Button_Switch_SMD:SW_Push_1P1T_NO_CK_KSC6xxJSW1
1Screw_Terminal_01x02TerminalBlock_4Ucon:TerminalBlock_4Ucon_1x02_P3.50mm_HorizontalJ3

The 28 most common of 30 parts.

Questions

How big is the Agriot sensor PCB?

It measures 56 × 47 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Agriot sensor use?

30 parts, built around the 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 Agriot sensor KiCad files?

From the AngelJMC/agriot-sensor-node repository on GitHub, at the commit this page was made from: the board is hardware/agriot-sensor.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Agriot sensor design in my own project?

Its repository publishes it under the GPL-3.0 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 layers66.3 × 40.2 mmCm4 drone, the printed circuit board in 3D

    Cm4 drone

    dridri/bcflight

    Raspberry Pi based drone flight controller and remote control

    56 parts175GPL-3.0
  • 4 layers83 × 109 mmD4 small pcb panel, the printed circuit board in 3D

    D4 small pcb panel

    unsurv/unsurv-offline

    Offline portable GNSS device based on the ESP32

    522 parts72
  • 2 layers57 × 35.5 mmWARS Birdhouse-2, the printed circuit board in 3D

    WARS Birdhouse-2

    brucemack/WARS-Birdhouse

    LoRa Mesh Network Node

    22 parts66GPL-3.0
  • 2 layers45 × 53 mmLoRa Node, the printed circuit board in 3D

    LoRa Node

    cernohorsky/LoRa-Node

    Simple LoRa Node based on Arduino Pro mini with RFM95W module and PCB antenna.

    35 parts66
  • 2 layers72 × 27 mmLoRaProMini, the printed circuit board in 3D

    LoRaProMini

    foorschtbar/LoRaProMini

    A low power LoRaWAN Node

    37 parts51MIT
  • 2 layers61.5 × 18.7 mmLoRA USBStick, the printed circuit board in 3D

    LoRA USBStick

    ElectronicCats/CatWAN_USB_Stick

    An Open Source USB Stick compatible with LoRa and LoRaWAN with Cortex M0+. To connect, review and analyze packages of LoRa®

    36 parts50GPL-3.0
  • 2 layers79.2 × 68.8 mmEnvironment slave, the printed circuit board in 3D

    Environment slave

    pcbcupid/Lora-Wireless-Sensor-Network

    A wireless sensor network based on Lora and esp32C3. This repo will help you build a complete product from scratch to finish!

    72 parts30MIT
  • 2 layers50 × 25 mmLoRa Environmental Sensors, the printed circuit board in 3D

    LoRa Environmental Sensors

    spielhuus/LoRa-Environmental-Sensors

    ATtiny85 based LoRa atmospheric sensor board with BME280

    5 parts28