Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Sending Ra-07 LoRaWAN Node Data to The Things Network Server
IoT Projects LoRa/LoRaWAN Projects

Sending Ra-07 LoRaWAN Node Data to The Things Network Server

Mamtaz AlamBy Mamtaz AlamUpdated:August 20, 20222 Comments7 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this project, we will take a look at a Ra-07 LoRaWAN Node from Makerfabs & send some sensor data to The Things Network Server with LPS8 LoRaWAN Gateway from Dragino. The setting configuration and method to connect LoRa Gateway to The Things Network Server is explained in previous article.

LoRa termed as Long Range is a spread spectrum modulation technique derived from chirp spread spectrum (CSS) technology. LoRaWAN is the network system architecture and communication protocol specification for LoRa, developed by the LoRa Alliance. LoRaWAN is a Media Access Control (MAC) layer protocol that enables LoRa in wider applications. The LoRa Alliance defines the networking layer and the system architecture for the network.

The Ra-07 LoRa based board called Maduino Zero LoRaWan is a solution based on the ATSAMD21G18 microcontroller. The Ra-07 Maduino LoRaWan acts as a LoRaWAN node to transmit/receive the local data to the network by connecting LoRaWAN Gateway. With this module, users can easily prototype the LoRaWAN projects without any complications. The board is Arduino compatible hence we can program it using Arduino IDE.



Bill of Materials

We need following tools and components to work with the Ra-07 LoRaWAN Node.

S.N.Components NameQuantityPurchase Links
1Ra-07 LoRaWAN Node1Makerfabs
2DHT11 Sensor1Amazon | AliExpress
3Jumper Wires1Amazon | AliExpress
43.7V, 100mAH Lithium-Ion Battery1Amazon | AliExpress
5Micro-USB Cable1Amazon | AliExpress

Ra-07/Ra-07H Module

Ai-Thinker Ra-07/Ra-07H module is a LoRaWAN module that supports long-distance communication, ultra-low power consumption, high sensitivity, and high-cost performance.

Ra-07/Ra-07H Module

The chip ASR6501 of the module integrates a LoRa radio transceiver, a LoRa modem, and a 32-bit RISC MCU. MCU uses ARM Cortex M0 + core, the operating frequency is 48MHz. The operating frequency range of ASR6501 can support continuous coverage from 150MHz to 960MHz. It supports LoRa modulation and (G)FSK modulation.


Features

  • With super anti-interference ability, it can work normally in a complex interference environments.
  • Minimum receiving sensitivity: -137dBm (SF=12/BW=125KHz)
  • Maximum transmit power +21dBm
  • Working frequency: (Ra-07) 410mhz ~ 525mhz (default), (Ra-07h) 803mhz ~ 930mhz (default)
  • Power supply voltage input: 3.3V
  • Transmitting working current: 107mA (full load power consumption)
  • Receive working current: 6mA
  • Sleep current: 3uA




Ra-07 Based Maduino Zero LoRaWAN Board

The Maduino Zero LoRaWan Board is a solution based on the ATSAMD21G18 microcontroller and LoRaWAN module Ra-07H. The Maduino LoRaWan acts as a LoRaWAN node to transmit/receive the local data to the network by connecting LoRaWAN Gateway. With this module, you can prototype LoRaWAN projects easily in a few hours.

Ra-07 Based Maduino Zero LoRaWAN Board

On the top side of the board the Ra-07 LoRa Module is interfaced with ATSAMD21G18 MCU via UART Pins. The Reset switch on the board is used for resetting the microcontroller. The slide witch on the board turns ON/OFF the module. You can either power the board through a single cell 3.7V Lithium-Ion Battery or through a Micro-USB port. The board has a USB to UART Chip, therefore you can directly program the chip through the USB port. On the left and right sides of the board, there are analog/digital input-output pins. OLED pins are given on the board where you can connect an 0.96″ I2C OLED Display.

Maduino Ra-07 LoRaWAN Module

On the backside of the board, there is an SD Card socket, where you can insert an SD Card and use it as a data logger.

The LoRaWAN module Ra-07H has two kinds of firmware which work with 868Mhz frequency and 915Mhz frequency. The default firmware on the board supports 868MHz frequency. If you want to change the firmware of the Ra-07H module, you need a J-Link tool. The firmware is available on GitHub.

Regarding the firmware or coding part, you can use Arduino IDE as Maduino LoRaWan is compatible with Arduino. Using this module we can communicate directly with The Things Network Server. For this, we will need a LoRaWAN router. In this demo, I will use Dragino LP8 Indoor LoRaWAN Gateway.


Specifications

  • LoRaWAN Protocol Class A/B/C
  • ATSAMD21G18, 32-Bit ARM Cortex M0+
  • Interface: I2C/SPI/UART/18*GPIO
  • With super anti-interference ability, it can work normally in complex interference environments.
  • Minimum Receiving Sensitivity: -137dBm (SF=12/BW=125KHz)
  • Maximum Transmit Power +21dBm
  • Working Frequency: (Ra-07) 410mhz ~ 525mhz, (Ra-07h) 868mhz (default)
  • Power Supply Voltage of the Board: 3.6V~5V(normally 5V)
  • Power Supply Voltage of the Module/MCU: normally 3.3V
  • Transmitting Working Current: 107mA (full load power consumption)
  • Receive Working Current: 6mA
  • Sleep Current: 3uA
  • LDO: AP7361
  • Charger: MCP73831



Preparation before Test & Usage


Hardware

  • !!!Note The LoRaWAN node does not transmit the data to TTN by LoRaWAN without the LoRaWAN gateway router which has been set as the TTN gateway.
1. The LoRaWAN gateway router used in the demo is a Dragino LPS8.
2. Configure the router as a TTN Gateway discussed in the previous post (LP8S Setup)
3. Configure the frequency you need.
  • Please plug the LoRa antenna into the board.

Software/Coding

  • Install Arduino IDE for programming.

Setting up The Things Network

For transmitting the Ra-07 LoRaWAN Node data to TTN(The Things Network), it is necessary to learn the use of TTN in advance, such as how to set an application, etc. After setting your application of TTN, there are three parameters that are important: Device EUI, APP Key, APP EUI.

Enter the TTN website: https://console.thethingsnetwork.org/, and log in your account. Then go to the console, select a cluster to start adding devices. In my case I selected EU cluster.

Select Application on the page and add a new application. Then fill in the application ID and other information, then create it.

Add an End device, select frequency plan, and the LoRaWAN version.

LoRaWAN The Things Network

Select manually to choose the active mode for OTAA and LoRaWAN version, then follow the reminders to type in the parameters. Then generate Device EUI, App EUI and AppKey. Then click on register end devices

Now the end node is successfully created. Hence you can see three parameters that had to be put into the code.

App EUI Device EUI AppKey

On the device page, it is necessary to set the payload formatters to decode the payload LoRaWAN node transmitted. Choose the Uplink and select the Javascript. Type in the following code and save.

1
2
3
4
5
6
7
8
9
function Decoder(b, port) {
  var var1 = b[0];
  var var2 = (b[1] << 8) | b[2];
 
  return {
    Humidity: var1,
    Temperature: var2/10
  }
}

Now the TTN application setting is finished.




Ra-07 Based LoRaWAN Node

Ra-07 LoRaWAN Node The Things Network

Connect the DHT11 VCC, GND & Signal pin to the board 3.3V, GND & D7 Pin.


Setting up Arduino IDE

The ATSAMD21G18A board isn’t pre-installed in the Arduino IDE. So, we need to install “Arduino Zero Board” from the Board Manager.

Open the Boards Manager From the top Arduino IDE menu, select Tools-> Board-> Boards Manager… to open the Boards Manager dialog box. Then install Arduino SAMD Boards(32-bits ARM Cortex-M0+).

Once, the installation completes, you can now select the Arduino Zero board as shown in the image below. To program this Board you need to connect a Micro USB Data Cable.


Source Code/Program

The complete code for using Ra-07 LoRaWAN Node with LPS8 LoRaWAN Gateway and The Things Network Server is given below.

Copy the following code & replace the three parameters(Device EUI, APP Key, APP EUI) with yours in the code.

1
2
3
#define DEVEUI "D896E0FF00000241"
#define APPEUI "70B3D57ED0041DA0"
#define APPKEY "DAC6118A3445572B02EFB73443AF2EB9"

Now you can verify and upload the code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#include <stdio.h>
#include <string.h>
#include "DHT.h"
 
#define DEBUG true
 
//get appeui and appkey from the thing network
#define DEVEUI "D896E0FF00000241"
#define APPEUI "70B3D57ED0041DA0"
#define APPKEY "DAC6118A3445572B02EFB73443AF2EB9"
 
#define DHTPIN 7      // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
 
DHT dht(DHTPIN, DHTTYPE);
 
int PWR_KEY = 9;
int RST_KEY = 6;
int LOW_PWR_KEY = 5;
 
bool ModuleState = false;
long int runtime = 20000;
 
void setup()
{
 
    Serial1.begin(115200);
    SerialUSB.begin(115200);
 
    dht.begin();
 
    SerialUSB.println("Now turnning the Lorawan on.Please wait.");
 
    pin_init();
    SerialUSB.println("Init over");
 
    //set DEVEUI
    //sendData("AT+CDEVEUI?", 3000, DEBUG);
    sendData("AT+CDEVEUI=" + String(DEVEUI), 3000, DEBUG);
 
    //set APPEUI and APPKEY
    sendData("AT+CAPPEUI=" + String(APPEUI), 3000, DEBUG);
    sendData("AT+CAPPKEY=" + String(APPKEY), 3000, DEBUG);
 
    //set join mod "OTAA"
    sendData("AT+CJOINMODE=0", 3000, DEBUG);
 
    //join lorawan
    sendData("AT+CJOIN=1,0,10,1", 30000, DEBUG);
 
    //set one message to webgate
    //sendData("AT+DTRX=1,2,5,FF 00 88", 3000, DEBUG);
}
 
void loop()
{
    if (runtime - millis() > 10000)
    {
        float h = dht.readHumidity();
        float t = dht.readTemperature();
        int hum = (int)(h);
        int temp = (int)(t * 10);
        char msg[30] = "";
        sprintf(msg, "AT+DTRX=1,2,5,%02x%04x", hum, temp);
        SerialUSB.println(msg);
        sendData((String)msg, 3000, DEBUG);
 
        runtime = millis();
    }
    while (Serial1.available() > 0)
    {
        SerialUSB.write(Serial1.read());
        yield();
    }
    while (SerialUSB.available() > 0)
    {
        Serial1.write(SerialUSB.read());
        yield();
    }
}
 
void pin_init()
{
    pinMode(PWR_KEY, OUTPUT);
    pinMode(RST_KEY, OUTPUT);
    pinMode(LOW_PWR_KEY, OUTPUT);
 
    digitalWrite(RST_KEY, LOW);
    digitalWrite(LOW_PWR_KEY, HIGH);
    digitalWrite(PWR_KEY, HIGH);
 
    digitalWrite(PWR_KEY, LOW);
    delay(3000);
    digitalWrite(PWR_KEY, HIGH);
    delay(10000);
}
 
String sendData(String command, const int timeout, boolean debug)
{
    String response = "";
    Serial1.println(command);
    long int time = millis();
    while ((time + timeout) > millis())
    {
        while (Serial1.available())
        {
            char c = Serial1.read();
            response += c;
        }
    }
    if (debug)
    {
        SerialUSB.print(response);
    }
    return response;
}




Results & Testing

Now open the Serial Monitor after uploading the code. The node will try establishing connection with the Gateway.

When the LoRaWAN module work in OTAA mode, the operation frequency will be automatically set to the same frequency as the matching router, if your router frequency is 868Mhz, the module will work in the 868Mhz that the LoRaWAN module support.

Now open the live data section on your TTN. Then wait for a minute, you can view something received in the dashboard.

As the picture, the original payload is 3400FA, and the date after the format decoded is 52 and 25, which means the temperature is 25℃ and humidity is 52%.

This is how you can use Maduino Ra-07 LoRaWAN Module with The Things Network Server and monitor the sensor data wirelessly.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleSetting up Dragino LPS8 Indoor LoRaWAN gateway with TTN Server
Next Article Interfacing R502/R503 Capacitive Fingerprint Sensor with Arduino

Related Posts

IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

Updated:May 10, 20261K
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

Updated:May 2, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

Updated:April 27, 20261K
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

Updated:April 27, 20262K
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

Updated:February 1, 20261K
View 2 Comments

2 Comments

  1. ender vural on May 19, 2022 4:27 PM

    Hello. There is something I don’t understand. There is also a processor in the RA-07 module. (MCU: ASR6502 + Lorawan: SX1262). Why is a second processor needed? A similar module, Heltec CubeCell – Dev-Board” also does not use a processor.( https://heltec.org/project/htcc-ab01/)

    Reply
  2. endy on May 23, 2022 2:27 PM

    I love the projects here. You publish the whole project from end to end. If possible, I have a request from you. Can you also make a project example to be used only with the internal processor (ASR6501 ) in RA-7 and opensource chirpstack lorawan server? (For example, rs485 data can be transferred.) Thus, we get rid of an extra processor cost. We also gain experience in using opensource chirpstack lorawan server.

    Reply

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

May 31, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • Designing of MPPT Solar Charge Controller using Arduino
    Designing of MPPT Solar Charge Controller using Arduino
  • ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
    ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
  • How to use INA226 DC Current Sensor with Arduino
    How to use INA226 DC Current Sensor with Arduino
  • IoT Based Electricity Energy Meter using ESP32 & Blynk
    IoT Based Electricity Energy Meter using ESP32 & Blynk
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • How to use INA219 DC Current Sensor Module with Arduino
    How to use INA219 DC Current Sensor Module with Arduino
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.