Sx1278 on Nano(TX) and Nano(RX)

Hi Folks,
i did a test code to send and receive - as a range test. And it worked with this code. The i soldered the hardware and nothin works and even the lora module sometimes cant initialize. On USB sender sont work. On 9V block - looks ok, but i have no serial monitor for debugging... :confused:
This is all very strange. Maybe you can spot a mistake, that i missed.
I checked volage to take care of the 3.3v for the sx1278. Even used the Nano-provided 3.3v pin in 2nd try.

/// TEST RX

#include <SPI.h>
#include <LoRa.h>

///##################///
const int unitID = 3;       // Einheits-ID
///##################///

int VibPin = A2;
String inString = "";
String MyMessage = "";
bool newMessang = false;

void setup() {
  pinMode(A2, OUTPUT);

  delay(4000);

    Serial.begin(57600);
  while(!Serial);
  Serial.println("Setup ready");

    if(!LoRa.begin(433E6))
  {
    Serial.println("LoRa failed");
    while(1);
  }

}

void loop() {

  int packetSize = LoRa.parsePacket();
  if(packetSize){
    while(LoRa.available()){
      int inChar = LoRa.read();
      inString += (char)inChar;
      newMessang=true;
    }
    MyMessage = inString;
    LoRa.packetRssi();
  }
  if(newMessang){
    Serial.println(MyMessage);
    inString="";
    MyMessage="";
    newMessang=false;
    analogWrite(VibPin, HIGH);
    delay(200);
    analogWrite(VibPin, LOW);
    delay(200);
  }
  
}

/// TEST SENDER

#include <SPI.h>
#include <LoRa.h>

///##################///
const int unitID = 3;       // Einheits-ID
///##################///

void setup() {
  Serial.begin(57600);
  while(!Serial);
  Serial.println("Setup ready");

  if(!LoRa.begin(433E6))
  {
    Serial.println("LoRa failed");
    while(1);
  }
}

void loop() {

  String Message = "402x";

  LoRa.beginPacket();
  LoRa.print(Message);
  LoRa.endPacket();
  Serial.println("Message sent!");
  delay(3000);

}

Nano is a 5V logic level devices.

LoRa devices are 3.3V logic level device.

Do not connect the both directly, you could damage the LoRa device.

i know, never did.

The schematic says otherwise.

i never saw someone using a ligic converter on the sx1278.

It looks like it works. i. but i guess the sx1278 needs more power then the nano 3.3v pin can provide?!?

Ok looks like the stop Dpwn converter makes all kinds of distortions. Could a capacitor help to balance the current?

edit: i did attach a 220mf capacitor right before the 3.3v in of the sx1278 on a not functional pice. And it works fine now. Just like the HT-12, the sx1278 seams to benefit from it.

Look harder, there are companies that sell shields for using the 3.3V LoRa devices on 5V logic Arduinos. These shields include the required logic level conversion circuits.

"Each radio comes with some header, a 3.3V voltage regulator and levelshifter that can handle 3-5V DC power and logic so you can use it with 3V or 5V devices"

Interesting. but not an option.
i need to stay on 433mhz. Until now no module burned using spi with 5v
I did not look for 3.3 logic because it seams to be working just fine.
thx!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.