Arduino Uno + HopeRF RFM95W

I simply cannot replace the sx1272/6 module with HopeRF RFM95W in my design (issue mentioned here in details) so I have decided to make a working end-node using an Arduino
This way I can be sure my HopeRF modules are working, and I can reverse engineering it with the CRO on SPI and take it from there.

Even though I have a fair bit of embedded programming experience and electronics design I still struggle with Arduinos :slight_smile: . Can somebody forward me to an article or a how to on correctly wring an Arduino Uno to a HopeRF module so that would be my starting point?

I have looked into this one,

But honestly I am not sure how he is directly connecting the UNO to the HopeRF module without level shifting the 5v from UNO to 3.3 in HopeRF. The HopeRF absolute max is 3.7

After I have level shifted, I am getting the following error.

Starting
FAILURE
C:\Users\mehrad.CAMPBELLSCI\Documents\Arduino\libraries\arduino-lmic\src\lmic\radio.c:689

I am also aware of the lines responsible for this issue but the lack of break point and watch window in Arduino IDE is making it so hard to actually be able to see what values are returned for the Semtech Chip revision.

So I really need a simple guide to follow and make sure it is going to work.

The HopeRF module has been driving me crazy in the past couple of months as I had multiple attempts to make it work and it doesn’t really want to. This would be a great help.

1 Like

sure

1 Like

I’ve recently hooked up a RFM95 to a STM32 to test LoRaMac-Node, and I’ve noticed a couple things:

  • Generally speaking, it is possible to use the RFM95 as a drop-in replacement for a SX1276: both the pins and the main registers are identical
  • The RFM95 datasheet is filled with mistakes and contradictions, so don’t trust it
  • Using 5V won’t immediately fry the RFM95 but it’s definitively not rated for it - level shifters are the way to go

Furthermore, I tested a couple SX1278 with Arduino Uno & Nano. I used the RadioHead library:
http://www.airspayce.com/mikem/arduino/RadioHead/
There’s no LoRaWan stack but you might want to try a barebone PHY layer first.

Good luck!

EDIT: I’ve took a look to your other thread, and you CAN use the Semtech stack with SX1276 drivers with RFM95. It’s a bit broken (I can’t get retrieve the RSSI or the SNR for the life of me - see my note about that $!ù datasheet earlier) and I had to kludge a few things (I bypassed the TX power methods and forced the registers to the highest value, among other things), but OTAA works, unconf/conf TX works, RX works, ADR works, and I got some crazy range with it.

1 Like

Hi,

If you are looking for an arduino compatible board with an RFM95W builtin check this one:

The schematics is also available here:

It is a very compact board.

2 Likes

Gig, could you elaborate on the details of the changes you have done to make RFM95 to work with the Semtech Stack ?

Anything could be useful in this stage. HopeRF itself not being much helpful and so far other than you, I haven’t found any other people attempting to use the Semtech Stack with RFM95W. When I drop in replace the RFM95 with SX1276, from the probing I am doing with the CRO I can see that radio thinks it sent the join request but nothing leaves the Antenna. I am certain it is a simple hidden point that I am forgetting but I honestly cannot find it no matter how much I look into the problem.

Where is the rfm95w on that board? I don’t see it anywhere on the pictures.

Kim

on the other side ? :sunglasses:

Yes, that’s logical. None of the three photos have that showing. But never mind, it’s not important. You probably just have better eyesight than me if you saw it.

Kim

uhhhhhhh … no probably NOT :sunglasses:

if I look here it’s not a RFM95 based pcb …
https://www.tindie.com/products/luisgonc/lora-hack-mchp/?

so maybe @luisgonc can explain ?

probably the PCB can hold 2 different radio’s

Well, I haven’t documented everything, so it’s hard to pinpoint what I changed exactly.
Here’s what I did:

  • I use a STM32F405-based board and a RFM95 straight out of eBay
  • I hand-soldered the RFM95 to a perma-proto board. The pins used are ANA, GND, 3.3V, MISO, MOSI, SCK, NSS, DIO0, DIO1, DIO2, DIO3
  • I grabbed the LoRaWan stack from ST’s website (here) because it had drivers for STM32 HAL
  • I used the STM32L476RG-Nucleo End_Node project as a basis, with sx1276mb1mas driver. I modified the drivers to fit my STM32F405 (mostly changes to the RCC and some pins that weren’t available)
  • I simplified some parts of the code, removed things I didn’t use (like the sleep functionalities…). I also added a simple abstraction layer.
  • I changed/hacked EU868 parameters to bypass limitations that got in the way of my tests
  • I completely bypassed SX1276SetRfTxPower(int8_t) to set the TX power by hand, because there was some issues with registers being incorrect and I couldn’t be bothered fixing it properly

I’m sending you the relevant files, maybe they’ll be of some help.

1 Like

Hi @BoRRoZ and @kiwiclan,

Yes, Borroz is right the board can hold both radios (one at a time) and is sold in two different variants. One variant is named the Lora Hack - MCHP (with RN2483A) and the other variant is named Lora Hack - HPRF (With Radio RFM95W).

You can find all the photos for the RFM95W variant here:

But if you are looking just for the bottom with the RFM95W check this:

__
Luisgonc

2 Likes

hi,

i have connected Arduino Uno + Dragino Lora shield V1.3. using LMIC library i loaded the program in the arduino. But the device which i registered in the Console Application, the Status was Never seen. but my gateway receives encrypted message from Node, but i’m not able to see in the TTN console.
what is the problem? how to fix this problem?

wrong topic / … pls use search for DRAGINO

How do I transmit 8 variables in a single transmission via Lora?

How you do that depends on what software or microcontroller type and libraries you are using to talk to the LoRa device.

There is no one ‘universal’ method.

Got it. I am using an arduino uno to do the communication, but I could not make it work. I’m trying to unpack the data to Thingspeak, but it could be through TTN.
Would you recommend a library?

Are you doing LoRa direct node to node or are you using TTN ?

on the node:

     mydata[0]  = byte(counter >> 8);
     mydata[1]  = byte(counter);
     mydata[2]  = highByte(BattSend);
     mydata[3]  =  lowByte(BattSend);
     mydata[4]  = highByte(SolarSend);
     mydata[5]  =  lowByte(SolarSend);
     mydata[6]  = highByte(temp1_i);
     mydata[7]  =  lowByte(temp1_i);
     mydata[8]  = highByte(hum1_i);
     mydata[9]  =  lowByte(hum1_i);
     mydata[10] = highByte(temp2_i);
     mydata[11] =  lowByte(temp2_i);
     mydata[12] = highByte(hum2_i);
     mydata[13] =  lowByte(hum2_i);
     mydata[14] = highByte(pres1_i);
     mydata[15] =  lowByte(pres1_i); 

on ttn/console (payload formats)

function Decoder(bytes, port) {
  var count      = (bytes[0]  << 8)  | bytes[1];
  var batt       = (bytes[2]  << 8)  | bytes[3];
  var solar      = (bytes[4]  << 8)  | bytes[5];  
  var temp1_x    = (bytes[6]  << 8)  | bytes[7];
  var hum1_x     = (bytes[8]  << 8)  | bytes[9];
  var temp2_x    = (bytes[10] << 8)  | bytes[11];
  var hum2_x     = (bytes[12] << 8)  | bytes[13];
  var pressure   = (bytes[14] << 8)  | bytes[15];

  
  return {
  A_cnt:        count,
	B_batt:       batt / 100.0,
	C_solar:      solar / 100.0,
  D_Tempin:     (temp1_x / 100.0) -50.0,
  E_Humin:       hum1_x / 100.0,
  F_Tempout:    (temp2_x / 100.0) -50.0,
  G_Humout:      hum2_x / 100.0,
  H_Pressure:    pressure
  };
}

on your server side you could receive the values via MQTT and send it from there to ThingSpeak

tsclient.updateChannel(channelId, {field1: battery, field2: solar, field3: temp1, field4: humi1, field5: temp2, field6: humi2, field7: press }, function(err, resp) {

hope that helps

Where did you take that example from? Could you share?

Where did you take that example from? Could you share?