Arduino Pro Mini and Lora RA-01 SX1278

I have two pairs of: Arduino Pro Mini and Lora ra-01 SX1278. I want to make a point-to-point connection between them. (transmitter will transmit the temperature value. Receiver will recieve the temperature value) I want you to tell me if I am on the right way:

  1. I 'm going to use Radiohead library. Is this the one I should use?
  2. According to the library 's readme: 'RH_RF95 Works with Semtech SX1276/77/78/79', So in order to try it: File->Examples->Radiohead->rf95->rf95_server, and this is the sketch (you can view the code here) for the transmitter. Am I on the right way?
  3. I have connected Arduino to Lora this way: Arduino....Lora D2................DIO0 D7................DIO1 D8................DIO2 D10..............SS D11..............MOSI D12..............MISO D13..............SCK A0................RESET

Shouldn't I let the sketch know these connections?

panoss: Shouldn't I let the sketch know these connections?

Its reasonable to assume that the provided examples work, so the required pin definitions must be set elsewhere.

What information about pin connections is in the library ?

Be sure to use 3.3V Pro Minis.

Yes, I 'm using 3.3V arduinos. I suppose the pin definitions must exist somewhere in the library 's files. I 'll search for them and let you know.

I found in file RH_RF95.h:

/// \par Connecting RFM95/96/97/98 and Semtech SX1276/77/78/79 to Arduino /// /// We tested with Anarduino MiniWirelessLoRA, which is an Arduino Duemilanove compatible with a RFM96W /// module on-board. Therefore it needs no connections other than the USB /// programming connection and an antenna to make it work. /// /// If you have a bare RFM95/96/97/98 that you want to connect to an Arduino, you /// might use these connections (untested): CAUTION: you must use a 3.3V type /// Arduino, otherwise you will also need voltage level shifters between the /// Arduino and the RFM95. CAUTION, you must also ensure you connect an /// antenna. /// /// \code /// Arduino RFM95/96/97/98 /// GND----------GND (ground in) /// 3V3----------3.3V (3.3V in) /// interrupt 0 pin D2-----------DIO0 (interrupt request out) /// SS pin D10----------NSS (CS chip select in) /// SCK pin D13----------SCK (SPI clock in) /// MOSI pin D11----------MOSI (SPI Data in) /// MISO pin D12----------MISO (SPI Data out) /// \endcode /// With these connections, you can then use the default constructor RH_RF95(). /// You can override the default settings for the SS pin and the interrupt in /// the RH_RF95 constructor if you wish to connect the slave select SS to other /// than the normal one for your Arduino (D10 for Diecimila, Uno etc and D53 /// for Mega) or the interrupt request to other than pin D2 (Caution, /// different processors have different constraints as to the pins available /// for interrupts).

So I should have connected them this way:

Arduino RFM95/96/97/98 GND----------GND (ground in) 3V3----------3.3V (3.3V in) interrupt 0 pin D2-----------DIO0 (interrupt request out) SS pin D10----------NSS (CS chip select in) SCK pin D13----------SCK (SPI clock in) MOSI pin D11----------MOSI (SPI Data in) MISO pin D12----------MISO (SPI Data out)

It looks like I have connected them correctly!!!!

Now install the server on one of your devices, client on the other, and let them talk to one another.

I did this but it doesn't work... :(

The transmitter outputs absolutely nothing in the Serial Monitor Window (no matter which baud rate I selected in the baud rate list). Not even garbage.

In the program I changed from 'Serial.begin(9600);' to 'Serial.begin(4800);'. When I remove the Lora from the board the Serial Monitor works (9600 in the baud rate list). When I put Lora in it's place on the board, the Serial Monitor does not work.

So I have to issues: 1. I have to put in the program Serial.begin(4800) in order the Serial Monitor to work at 9600. 2. Serial Monitor doesn't work with Lora on the board.

I 'm using Arduino Mini Pro, exactly like this one.

I 've checked all connections between Arduino and Lora, everything seems ok. (also checked all connections in general)

EDIT: I replaced it with the Arduino I use in the receiver and the Serial Monitor works. So, problematic Arduino board?

But, again, the receiver outputs in the serial monitor:

init failed Sending to rf95_server

This means that it cannot initiate the Lora?

panoss:
This means that it cannot initiate the Lora?

Probably

Yes, no initialisation, no communication with he board established.

Potential causes: - software setup wrong (wrong pins selected), - wiring wrong (poor solder joint, bad breadboard contact, miswired), - LoRa board faulty.

If you have an Arduino board that doesn't print anything to the Serial monitor (use some minimal example to try this out and make sure the baud rates in the sketch and the Serial monitor match), it itself may be faulty.

Maybe try a different (less complex) library. I use this one for my Arduinos (32U4) and ESP32 and it works well.

There is a LoRa device test program here;

LoRa_Register_Test_ATmega

Prints the LoRa device registers, if the device is found.

Standalone program.

I managed to make it work! (with the arduino-Lora library suggested by Riva) I had two mistakes on my boards: 1.no GND for Loras on both pcbs 2. one track was shorte to GND

But now I have another problem: they communicate only at a distance of 10 cm!!! If I move them to 15cm from each other they don't communicate!

Let me stress that from the very beginning I had soldered their antennas, I never worked them without their antennas because I had read they could get damaged. What now?

Check the soldering to your antennas.

I suppose you're talking about basic spring antennas?

Yes, the basic spring (helical, spiral shaped).
You can see it in the atachment:

As you see I 've made a breakout board for the Lora.
I think it’s quite well soldered.

LoRa modules fit perfectly on the ready-made breakout boards for the ESP-12 modules. Same width, number of pins and spacing.

Hi, What are you using as your power supplies?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Any reason you didn't breadboard and get your project running before going straight to a PCB unproven.?

Thanks.. Tom.. :)

For the transmitter I use a Lipo battery with a voltage of 3.6V (not 4.2V).
For the receiver I use a 1117 with 3.3V output.

I did not breadboard it because with breadboards it becomes super complicated with lots of errors.
In order to avoid errors I made it directly on a pcb. And I made 2 errors!!

The circuit is in the attachment.

panoss: But now I have another problem: they communicate only at a distance of 10 cm!!! If I move them to 15cm from each other they don't communicate!

Classic symtom of modules with damadged RF outputs.

srnet: Classic symtom of modules with damadged RF outputs.

Oh 4$$$$it!!! I did everything for this not to happen and it happened! :( As I mentioned earlier, a track was by mistake, grounded. This track was connected to MOSI pin of the Lora. Could this damage the RF?

panoss:
As I mentioned earlier, a track was by mistake, grounded. This track was connected to MOSI pin of the Lora.
Could this damage the RF?

That’s an input, grounding it should be safe (as that’s exactly what is done during normal communication).