Which LoRa-Module for Arduino Mega 2560 using UART

Hello everybody,

I want to use the LoRa-Technology to send hourly means of sensor measurements from my node to TTN. My Mega will be packed with sensors and other elements (GPS module, SD card module). I also have to use the SPI pins on my Mega for a micro sd card module.

The picture below kinda illustrates my issue. The sketch isn’t completely finished yet though. I want to put some more sensors into my setup, which I have to connect to the analog pins of the Mega. I also need a GPS module for my project, which I will connect through I2C to my Mega (Is there possibly a LoRa Module, which comes with a GPS module too?).

Air_Quality_Box_Steckplatine

I’ve checked the following page: https://www.thethingsnetwork.org/docs/devices/arduino/usage.html

I guess I need a LoRa-Module with RN2483 or RN2903 to make use of the remaining RX1 pin and TX1 pin on my Mega to send my data using LoRa? I’m open for any advice or other possible options using LoRa!

As far as I am aware the only UART connected LoRa device that supports TTN is the RN2483 or RN2903.

Is there a reason why you cannot have an SPI connected LoRa device sharing the SPI bus with the Micro SD card ?

Actually almost any stand-alone LoRa node would with trivial firmware changes to accept a message payload over a serial port rather than invent one themselves.

Also the Murata module’s stock firmware should?

SD cards are notorious for not playing nice with other devices on an SPI bus, it’s basically assumed they need a unique one. That said if the capacity needed doesn’t rule it out it would be worth considering a more predictable and better behaved SPI flash instead of an SD card.

Hey Lora Tracker. Thank you for your response. I was afraid of using anything else on my SPI bus, because of what cslorabox said. So I basically only have my last remaining UART port as an option to play it safe.

You could basically take any working TTN node and modify it for a serial connection so your Arduino could basically say “if possible, please pass this message to TTN”

Where it starts to get more complicated if you want feedback about the state of connectivity to TTN, etc.

But if your messages are brief and infrequent its fairly simple.

I use SD card logging (SPI based) quite often with SPI LoRa devices at the same time, there are issues with some particular SD cards, but with most it works OK.

If the SD card is just for logging sensor data, use an Openlog which will log serial data of the type sent to the Serial Monitor. Just needs power and a single logic pin to drive it, costs around £5. You can use a UART pin or there is a send only software serial library out there.

Then the SPI is free for a normal LoRa device.

1 Like

Which SD card module and SD card do you use, If may ask? I need a combination, which works reliably for a year at least. At the moment, I’m using a SD card module from Catalex, which is fairly cheap: SD Card module

And a SD card from Kingston: SD Card

Indeed, that’s the purpose. I want to log sensor data for a later analysis. That method sounds actually interesting. I’ve googled openlog, but only found one module from Sparkfun so far, which is more expensive than £5. Could you give me a link or name of that cheap Openlog you recommended?

I think I will try both setups in the end using a shared SPI and the openlog method to see how well both methods far with my hardware.

I dont use modules, most all of my stuff is 3.3V based, so I use plain micro SD card holders, not other parts needed.

I dont see that there will be much difference between the quality of the SD card boards for megas and the like, they are just a regulator and some logic level converters.

For Openlogs, search eBay, currently on offer for £3.32 (delivered) from China.

That’s an interesting suggestion.

The purpose for using LoRa is to send hourly means of my sensor data during the day and that’s it. I’m not interested in checking the state of the connectivity for instance.

Thank you for your advise. I really appreciate it.

I will buy the sparkfun OpenLog and another OpenLog called GY-Openlog-Cleanflight-Naze32-F3-Blackbox, which seems to be a clone of the sparkfun one. It’s half the price of the sparkfun Openlog, if you buy it in Germany.

As I said, I will also test a setup, where I use multiple devices sharing the SPI bus.

Now that my SPI slot is free from any device, any suggestion for a LoRa device for my Mega? I’ve thought about getting the Adafruit RFM95W LoRa Radio, because it already includes a 3.3V voltage regulator and levelshifter, so I can hook it up with the pins of my 5V Mega directly.

I could not recommend a 5V tolerant LoRa modules, never used them.

I would however avoid using ‘cheap’ logic level converters that come form China, when I have tested some on a scope, the signals looked very marginal for reliable SPI operation.

Okay. I will give the adafruit radio a shot then.

No worries. I’m using sparkfun logic level converters named BOB-12009 for my level shiftings.

That’s mostly a function of the pull-up resistors, which typically default to 10K. One can add smaller resistors (not necessarily on the board) and/or use a slower clock. There’s not going to be a big difference in performance between different builds of the same idea - which indeed is one aimed more an I2C than SPI. But SPI has no minimum clock, the only real issue is taking any slowdown in the setup of receive operations into account in timing them.