Communication Arduino nano and RAK3172 used as Lora transceiver to send data over TTN

Hello everyone, I’m working on an IoT project and I’d like to use the RAK3172 module. My concern is that I would like the data to be processed by an Arduino nano board and sent to TTN via the RAK3172 module. In other words, the RAK3172 will be used as a Lora transceiver to communicate with the Gateway. My problem is how do I go about it, what are the different steps and how do I get there? I’ve already downloaded the code to my Arduino nano and it works fine. I started my research and I had to make a circuit that I would like you to examine with me for error correction. I’ve checked that the logic voltage on the UART pins is 3.3V, so I’m going to use a logic converter. Here’s the schematic, please help me
fig

Hi @Anytoutcourt12

Well I’m working on quite similar project but with an ESP32 to get to communicate with RAK3172.
On the Arduino side, you have to configure it to send datas you want through an UART port and on RAK3172 use the UART avalaible to link it with Arduino and receive datas from Arduino.
Are you using the RAK3172 module alone ? or on a Wisblock board ? On Wisblock board you have access at an UART you can use for it and named Serial1 in programming.
Be careful to setup the UART port with same settings at both end (similar speed/baudrate, parity, stop bit).

Vincèn

1 Like

Thank you very much, it would help me a lot if we could exchange ideas. Please take a look at the diagram and tell me what you think.

I use the rak3172 alone

Well your design is very basic but should work so long your Arduino board is using 3.3V levels on UART port or you might damage the RAK3172 GPIO :wink:

Sure, thank you! I could use a logic level converter to step down the voltage level.Can you help me with the code please? I already have the basic code for data processing with arduino nano, but I’m struggling to write the code that would allow me to send the data to the rak3172 via UART.

Well I would advise then to look at some code samples as it’s quite simple and you would do that probably with a Write on the serial port of the Arduino and then check with a Read on RAK3172 side to check you are receiving datas. Once that is working, you can then go into more complex code to handle properly the communication between both and more complex logic.

While I am not using those particular modules. I have successfully interfaced RAK19001/RAK11310 with Arduino Uno without any circuitry. Instead, I use an RPi programmed as a USB Hub. This allows me to observe the dataflow as part of the development/debugging process. Once “cast in stone” circuitry could certainly be used to link the two devices.

The Uno hosts a camera and sends the picture row by row to the RAK. The RAK broadcasts the messages via LoRaP2P. A basestation receives and displays the image.

This is all part of transitioning a larger LoRaP2P project to RAKwireless devices. The Uno is used to provide a camera interface. Originally, a LoRaP2P transceiver plugged directly into the Uno but the manufacturer stopped making that unit. The replacement did not perform to my satisfaction.

If there is interest, I can post what has been accomplished and documented so far on GitHub and replace the old project now rather than later.

Hey @SoothingMist

How do you transmit pictures through LoRa ? In very low resolutions I guess ?

Thanks

In the end, LoRa is designed to send messages that are 256 bytes long, maximum, as I understand things. For this application, I view “pictures” as three-dimensional numerical grids. Going row by row, I compose messages containing numbers from that grid and broadcast those messages.

Yes. numerous messages are required and the basestation has to reconstruct the image from those messages. Resolution is not an issue, nor is the number of values associated with a single pixel, except that more messages are required as the resolution and the number of values associated with each pixel increases. It is true that real-time video is not supportable since too much time is required to send a single picture.

Thanks @SoothingMist for the explanations, quite a job to succeed to transmit “pictures” through LoRa but interesting way to do it :+1:

Thank You. All documentation and software will eventually be posted to GitHub. Was inspired first by those who claimed it was not possible to send images via LoRa. Further inspiration came from those who asked for a way to take a “look” at remote sites where third-party services were not available and drones were not practical. It is just one of many possible solutions.

1 Like