Can an Ra-02 handshake a NRF24l01

The quick question is can I input a string of data from an RF24l01 to and Ra-02 unit?
The reasons why
with a lot of help from this forum over the past two or three years I managed to build a unit to monitor our water tanks at our remote cottage.
Using an ultrasonic HS04 (waterproof) unit I measure the water level in the tank. The processor is a nano. The nano passes the info on to the LoRa. The Lora sends the data to the cabin, where a LoRa in receiver mode receives the data. The LoRa is physically attached to an ESP8266 that connects to the internet (Internet is not available at the well, but is at the cabin). The data is sent to the Blynk cloud, and then down to my phone. Works great. Thanks again.

HOWEVER... there are four tanks. We don't keep them all on at the same time. So I switch between them, and they are at slightly different levels. Only one tank at a time is connected to the distribution system.

I created a "mini" tank. A six foot piece of ABS pipe that is placed vertically and attached to the main system, so that no matter which tank is "on" the mini tank will read the level. However if I change from one tank to another, the "0" level changes, so I've had to build a "Fudge" factor into the system to add a specified figure depeneding on which tank is used. Cumbersome, but works.

I got to thinking that if I could build self contained mini sensors and place them on top of each tank it would work better. The tanks are not too far apart, but running wires between them would be messy.

I began to think that if I could use NRF24L01 as the transmitters on each tank, send then data to a nearby NR24L01/nano "hub", process the data and send it as a "string" to the cabin, it would be a superior system. The problem is that NRF24L01 won't go through the forest to the cottage. I've tried it - it doesn't work. But the Ra-02 works great!

My understanding (and it's limited) is that the Ra-02 is great for distance - not terribly great for handling lots of data. The other problem is that there is no way of keeping the data on seperate channels or frequencies with Ra-02 as there is with the NRF24l01 - which is great at that job. So I thought my a combo where the NRF24l01 gathers up all the sensor data , packages it as a string, then hands it off to the LoRa which transmits it to the cottage.

I spent most of the day searching the internet to see if anyone had tried this method of having the NRF24l01 handshake with the Ra-02 and came up empty. The rest of the equation looks very doable.
So has anyone seen any projects that have attempted the NRF24L01/Ra-02 combo?
Also any alternative suggestions or approaches would be welcome. ALso I'm happy to share the sketches from my working system.

Several missunderstandings there.

First for the type of monitoring you are doing, LoRa is very likley to fast enough for what you are doing. Whilst you are assuming you need to send a 'lot' of data, you dont say how much. The Ra-02 can achieve an on-air rate of 37,500bps, is that not fast enough for basic monitoring ?

Second the Ra-02 can operate on different frequencies, channels if you like.

Third, the best of both worlds is maybe 2.4Ghz LoRa devices, can operate at 1300kbps, nearly as fast as the max the NRF24 can manage, but has the option of switching to long range mode where several kms is possible, distance record currently 89km I believe.

You could operate an Ra-02 and NRF24 on the same Arduino, but the devices cannot talk to each other.

Maybe tell us how much data you need to send and how often ?

Thanks for taking the time to share your expertise with me. It's very much appreciated. I don't know where I picked up the (mis) information regarding the capabilities of Ra-02. I am currently using them on two of my projects, but had I known I could network them, it would have made life so much easier.

As I mentioned, I am currently monitoring the water level in four tanks, but I only have one sensor that is "shared" between them.

As per your question of how much data and the time line. The maximum distance I'm monitoring is 200cm or 72 inches. Therefore I figure three significant figures for each transmitter. The receiver would have to handle the four streams. As I'm monitoring water levels and not car speeds, I would think if they transmitted once a minute, that would be sufficient.

I haven't seen examples of how to set frequencies or channels on the Ra-02 so the transmitters don't talk over each other.

Here is the code of the transmitter side. It's working fine. In case your curious, the relay is to shut the water off if the water level drops below a predetermined level.
Again thanks for any help or advixe.


// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module

//#include <SPI.h> // Not actually used but needed to compile
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4 
Adafruit_SSD1306 display(OLED_RESET);

#include <Ultrasonic.h>

#define TRIGGER_PIN  7  // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN     8  // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
int LEDPin=5; //Relay and LED pin

Ultrasonic ultrasonic(7,8); //Ultrasonic ultrasonic(Trig,Echo);

void setup()

display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //initialize with the I2C addr 0x3C (128x64)
  while (!Serial);
  pinMode(LEDPin, OUTPUT); 
 Serial.println("LoRa Receiver");
  if (!LoRa.begin(433E6)) 
 //   Serial.println("Starting LoRa failed!");
    while (1);
    // LoRa.setTxPower(20);

void loop()
        display.println("Tank Depth");
        display.setTextColor(BLACK, WHITE);
     display.println(ultrasonic.Ranging(INC) );
     display.println(" inches");

if (ultrasonic.Ranging(INC) >=28 ) //ALARM
    digitalWrite(LEDPin,HIGH); //ALARM
 else {
  digitalWrite(LEDPin,LOW);              // play tone of 400Hz for 500 ms
  // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
 // Serial.print("Distance is: ");
 Ultrasonic ultrasonic(7,8); //Ultrasonic ultrasonic(Trig,Echo);
//  Serial.println(" inches");
  LoRa.beginPacket(); ///send packet

To answer that question, you could use the longest LoRa range setting the Ra-02 @ 433Mhz can do reliably, bandwidth 62500hz, spreading factor 12.

An 8 byte packet would take circa 2 seconds to send at such long range settings, but with 4 stations and needing a reading once a minute thats OK. The line of sight range of those, workable, settings would be in the 850km+ range.

Thats a silly example maybe, but clearly you could send the data a bit faster and still get more range that you need.

You really have all the time in the World to collect such a small amount of data. Rather than have the sensors transmit at random and possibly collide and corrupt, just use the 'receiver' to poll the 'transmitters' for data when required.

The line in your code;

if (!LoRa.begin(433E6))

Sets up the LoRa device for 433Mhz, adjust as needed.

That makes sense. Are you aware of any sketch examples out there I can look at in terms of how to set up the receiver to poll the various transmitters? I assume the receiver would have to poll them individually which means the transmitters would some how have have a unique identifier?

Further upon searching the net it looks lie the frm95w might be a better solution for me than the Ra-02's I've been using. Any thoughts on that?

If you actually mean the RFM95, then why would you think that ?

It is the same LoRa device, but designed for 868Mhz, so around half the range\distance of the 433Mhz Ra-02.

There are examples of sending data requests to a specific adressable LoRa device that is listening here;

Look in the \examples\SX127x_examples\Reliable folder.

I suppose I was considering them, because of several youtube examples I've seen. THe fact that they are European explains that. I'm not terribly concerned about range now. I have Ra-02 set on minimum and they still push through nearly a km of bush. I'll look at StuartsProjects and see if that can set me on my way.

Thanks for the library. It's very interesting. It will take me some time to explore and understand it. I think what you're suggesting is to have the "receiver" unit request data from each of the transmitters so they won't "talk" over each other. The receiver unit then passes it on to the ESP8266 which sends it on to my Blynk application. Is that basically it?

I think something like this could be adapted:

Possibly, but treat with a great deal of suspicion.

Those articles describe connecting SX1278 modules direct to 5V Arduinos, UNO and Nano.

SX1278 modules are 3.3V devices and should not be connected direct to 5V logic Arduinos, this is fairly basic stuff that you need to get right.

The last article also confusingly describes the connections as 'LORAWAN' but the LoRa library used cannot be used for LoRaWAN, that is a completly different setup to the simple point to point LoRa actually described.

I think what you're suggesting is to have the "receiver" unit request data from each of the transmitters so they won't "talk" over each other. The receiver unit then passes it on to the ESP8266 which sends it on to my Blynk application. Is that basically it?

Yes, in the example pointed to the master requestor builds this packet;

//build the request payload
    LT.startWriteSXBuffer(startaddr);           //initialise SX buffer write at address 0
    LT.writeUint8(RequestGPSLocation);          //identify type of packet
    LT.writeUint8(RequestStation);              //station to reply to request
    TXPayloadL = LT.endWriteSXBuffer();         //close SX buffer write

Which is a request to node 'RequestStation' to send its 'RequestGPSLocation'.

The requestor then waits for the GPS location in a reply from that particular slave. Explained here;

Again, thanks for all the time you're giving to this. Hopefully the project will be of benefit to others as well. You've given me a lot to chew over. I think the next step will be for me to build a simple prototype. One node, one master(receiver) and see if I can get that going. I'll keep the forum apprised.